ATS FOR OS/2

Version 3

Users Guide






 
Software And Consulting






























MHR Software And Consulting can be reached
by phone at	(908) 821-0359 or 
by fax at	(908) 821-0350 or 
by mail at 	2227 U.S. Highway # 1
		Suite 146
		North Brunswick, New Jersey 08902

ATS for OS/2 is a valuable trade secret of MHR Software And Consulting and is not to be used 
or disseminated in any manner, or by any means whatsoever, without the express written consent 
of MHR Software And Consulting.

Windows is a trademark of Microsoft Corporation.
 IBM and OS/2 are registered trademarks of International Business Machines 
Corporation.
 C Set++ is a trademark of International Business Machines Corporation.

Copyright  1993, 1994, MHR Software And Consulting. All Rights Reserved.


Table Of Contents
1. Introduction	1
2. System Configuration	5
2.1. Maintaining System Configuration Options	6
2.2. Timers	6
2.3. Preferences I	9
2.4. Preferences II	10
2.5. Restart	13
2.6. Business Days	16
2.7. Snapshot	17
3. Holidays	19
3.1. The Year 0000	20
3.2. Maintaining Holidays	20
4. Events	23
4.1. Maintaining Events	23
4.2. Common Event Attributes	25
4.3. Job Termination Events	26
4.4. File Modification Events	27
4.5. Signal Events	29
4.6. Periodic Events	30
4.7. File Missing Events	31
5. Tasks	33
5.1. Maintaining Tasks	33
5.2. Names & Settings	36
5.3. Months	39
5.4. Dates & Times	40
5.5. Day of Week	41
5.6. Day of Month	42
5.7. Special Days	44
5.8. Session Type	46
5.9. Program Details	49
5.10. Dependencies	52
6. Job Queues	55
6.1. Maintaining Job Queues	55
6.2. Names & Settings	58
6.3. Months	60
6.4. Dates & Times	61
6.5. Day of Week	62
6.6. Day of Month	63
6.7. Special Days	65
7. Job Queue Control	67
7.1. Blocking or Un-Blocking a Job Queue	67
7.2. Flushing Tasks from a Job Queue	67
8. Manually Signaling and Resetting Events	69
8.1. Signaling One Event For All Tasks	69
8.2. Resetting One Event For All Tasks	70
8.3. Signaling All Events For One Task	71
8.4. Resetting All Events For One Task	71
8.5. Signaling One Event For One Task	72
8.6. Resetting One Event For One Task	73
9. Invoking Tasks	75
9.1. Four Steps to Task Initiation	75
9.2. Dates and Times	76
10. Logging	79
10.1. Log File	79
10.2. Log Comment	80
11. ATS Console Display	83
11.1. Log Display Window	83
11.2. Status Display Window	83
11.3. Running Tasks Display Window	85
11.4. Tiling the Display Windows	85
11.5. Setting the Font for the Console Display Windows	86
12. Reports	87
12.1. Defined Holidays	87
12.2. Defined Events	87
12.3. Defined Tasks	88
12.4. Defined Job Queues	88
Appendices	91
A. Glossary	93
B. Shortcut Keys	95
C. Supplied Files	97
D. Migrating The ATS Version 2.0 Data File For Use With Version 3	99
E. Reclaiming Unused Space In The ATS Version 3.0 Data File	101
F. Creative Scheduling with ATS for OS/2 Version 3	103
Alternating Open Job Queues	103
Modifying A Scheduled Tasks Program Parameters	104
Scheduling Two Tasks To Never Run At The Same Time	105
G. ATS Version 3.0 New/Enhanced features	107
H. Watchdog	111
I. Problem Reporting	113

Table Of Figures
1. ATS for OS/2 About Box	3
2. ATS for OS/2 Main Window	4
3. Timers Page of the System Configuration Notebook	7
4. Preferences I Page of the System Configuration Notebook	9
5. Preferences II Page of the System Configuration Notebook	11
6. Restart Page of the System Configuration Notebook	13
7. Business Days Page of the System Configuration Notebook	16
8. Snapshot Page of the System Configuration Notebook	17
9. Holidays Dialog Box	19
10. Job Termination Event Dialog Box	26
11. File Modification Event Dialog Box	28
12. Signal Event Dialog Box	30
13 Periodic Event Dialog Box	31
14. File Missing Event Dialog Box	32
15. Select Page of the Schedule Task Notebook	34
16. Names & Settings Page of the Schedule Task Notebook	37
17. Months Page of the Schedule Task Notebook	39
18. Dates & Times Page of the Schedule Task Notebook	40
19. Day of Week Page of the Schedule Task Notebook	41
20. Day of Month Page of the Schedule Task Notebook	43
21. Special Days Page of the Schedule Task Notebook	45
22. Session Type Page of the Schedule Task Notebook	46
23. Program Details Page of the Schedule Task Notebook	49
24. Dependencies Dialog Box	52
25. Select Page of the Job Queue Configuration Notebook	56
26. Names & Settings Page of the Job Queue Configuration Notebook	58
27. Months Page of the Job Queue Configuration Notebook	60
28. Dates & Times Page of the Job Queue Configuration Notebook	61
29. Day of Week Page of the Job Queue Configuration Notebook	62
30. Day of Month Page of the Job Queue Configuration Notebook	64
31. Special Days Page of the Job Queue Configuration Notebook	66
32. Job Queue Control Dialog Box	67
33. Signal Event Dialog Box	69
34. Reset Event Dialog Box	70
35. Signal Task Dialog Box	71
36. Reset Task Dialog Box	72
37. Signal Task/Event Link Dialog Box	73
38. Reset Task/Event Link Dialog Box	74
39. Open Log File Dialog Box	79
40. Log Comment Dialog Box	80
41. Set Console Font Dialog Box	86



This page intentionally left blank.


1.	Introduction

With the constant increase of processing power on personal computers many 
companies are migrating software systems off of minicomputers and mainframes. 
As more and more systems are migrated, it is becoming increasingly obvious 
that the availability of PC versions of system utilities that have been in use on 
the larger computers for many years is now crucial.

One such utility is a full function job scheduler. Years ago, jobs were scheduled 
in the order that the card decks were placed in the readers. As time went by, 
sophisticated programs were written to manage the scheduling of jobs on 
mainframes and then on minicomputers. With the migration of mission critical 
systems to the PC environment, it is evident that a full function job scheduler is 
required.

Many companies have developed their own in house scheduler to handle the 
most common of their requirements while choosing to ignore the more obscure, 
but yet important, other cases. ATS for OS/2 has been designed to allow you to 
build complete job streams giving complete control of how and when to run each 
program.

Version 2 of ATS for OS/2 provided users with a strong, stable and configurable 
job scheduler that provided the power to execute native OS/2 programs based 
upon various criteria. ATS for OS/2 Version 3 expands upon the feature set of 
the previous version in many ways. These include: starting DOS and Windows 
programs, job queues, additional event types, enhancement of existing event 
types, increased user configurability, restarting and requeueing of tasks, 
enhanced user interface, and enhanced manual signaling. For a complete list of 
the new or enhanced features, refer to Appendix G, ATS Version 3.0 
New/Enhanced features. For more information about the new or enhanced 
features, refer to the individual chapters of this guide.

Here are a few of the features of ATS for OS/2:

I Build complete job streams.
I Define any day to be a holiday.
I Define if a job should run on a holiday, not run on a holiday or run either 
way.
I Define what day of the week a job can run.
I Define what day of the month a job can run.
I Define what months a job can run.
I Define what hours of the day a job can run.
I Define a date range that a job can run within.
I Define if a job should run on the last day of the month, last business day 
of the month, first business day of the month, last business day before 
the 15th, or first business day after the 15th.
I Define if the job should run in an OS/2 window, an OS/2 full screen, as a 
Presentation Manager application, a DOS window, a DOS full screen, a 
common Windows session, a private Windows session, or let the 
application decide itself.
I Define a job to be dependent upon the completion of one or more 
scheduled jobs.
I Define a job to be dependent upon one or more files being created or 
modified or missing.
I Define a job to be dependent upon the receipt of one or more external 
signals.
I Define a job to be dependent upon a regularly scheduled (periodic) 
event.
I Define a job to be run within a certain job queue.
I Define a job to be run at a certain OS/2 priority level.
I Logs all activity to a file and an on-line window.
I Displays a list of all running jobs in an on-line window.
I Specify what days of the week are valid business days for your 
operation.

ATS can be notified that an external event has occurred in one of three ways. 
These methods are:

I an API that can be incorporated into an independently developed 
application program
I a supplied executable that can be executed at an OS/2 command line or 
from within a REXX or OS/2 Command procedure
I a menu option on the ATS main window.

ATS offers three different ways to clear the flag that indicates that an event has 
occurred. They are:

P an API that can be incorporated into an independently developed 
application program
P a supplied executable that can be executed at an OS/2 command line or 
from within a REXX or OS/2 Command procedure.
P a menu option on the ATS main window.

ATS allows you to define an unlimited number of job queues, tasks, 
dependencies, and holidays. ATS logs all activity to disk. In addition, there are 
three console display windows that can be turned on or off at the users 
discretion, Log, Status, and Running Tasks. The log window captures all log 
entries for real time on-line viewing. The status window displays the current state 
of ATS. The Running Tasks window displays a list of all non-independent 
programs that have been initiated by ATS and are currently running as well as, 
for a user specified amount of time, all independent sessions that have been 
initiated by ATS.

ATS for OS/2 requires IBM OS/2 2.0 or later. ATS for OS/2 was compiled using 
the IBM C Set++ Version 2.1 C compiler. It is a native 32 bit OS/2 program.

 

Figure 1. ATS for OS/2 About Box

 

Figure 2. ATS for OS/2 Main Window


ATS for OS/2 is a product of MHR Software And Consulting. We can be 
reached by mail at 2227 U.S. Highway #1 - Suite 146, North Brunswick, NJ 
08902, by telephone at  (908) 821-0359 or fax at (908) 821-0350.
2.	System Configuration
ATS allows you to customize the user interface as well as how often it should 
check to see if any dependent files have been modified, if any tasks should be 
started or if any independent ATS initiated sessions should be removed from 
the Running Tasks console window.

Selecting System Configuration from the ATS main menu displays a note book 
style control that allows you to configure ATS based upon your own 
requirements.

There are six pages in the System Configuration Notebook. They are: Timers, 
Preferences I, Preferences II, Restart, Business Days, and Snapshot.

  The Timers page allows you to configure how often ATS checks 
whether or not to run a job, how often ATS checks to see if any of the 
dependent files have been modified or are missing and how long should 
independent sessions should be listed in the Running Tasks console 
display window.
  The Preferences I page allows you to configure how ATS interacts with 
the user as well as logging preferences.
  The Preferences II page allows you to select what to do with a task that 
can be started if the tasks assigned job queue is either closed or busy 
as well as the size of the on-line log.
  The Restart page allows you to configure what information ATS should 
save when ATS is shut down and subsequently restore when ATS is 
restarted.
  The Business Days page allows you to specify what days of the week 
are valid business days for your operation.
  The Snapshot page allows you to define the name of the files that the 
ATS Log Console Snapshot and ATS Status Console Snapshot 
information get written to.

To display the System Configuration notebook:

  Select Edit from the main ATS menu.
  Select System Configuration from the Edit menu.
The keyboard short cut key is: Ctrl+C.

2.1.	Maintaining System Configuration Options

2.1.1.	Setting Options To Their Default Values

While Editing any page of the System Configuration Notebook, you can have 
ATS reset all of the option values on that page to their default value. To do 
this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Default

2.1.2.	Restore Option Values

While Editing any page of the System Configuration Notebook, you can have 
ATS reset all of the option values on that page to the value that they had 
before you made any changes (i.e. their last saved value). To do this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Undo Changes

2.1.3.	Saving The System Configuration Options

ATS will automatically save the values on each of the System Configuration 
notebook pages when you leave each page. 
Clicking on the Save Changes item on the system menu will also save the 
values.

2.2.	Timers

There are three user configurable timers within ATS. They control how often 
ATS checks whether or not to run a job, how often ATS checks to see if any of 
the dependent files have been modified or are missing and how long 
independent sessions should be listed in the Running Tasks console display 
window.

 

Figure 3. Timers Page of the System Configuration Notebook

2.2.1.	Adjusting Timers

There are two ways that you can adjust the timers The first method is to click 
with the right mouse button on one of the two small arrows to the right of the 
ruler. This will cause the button that is on the ruler to move. The second 
method is to click on the button that is on the ruler and slide it to the left or 
the right. As the button moves, the time interval that is associated with the 
particular timer will be updated and displayed in the text window above the 
appropriate ruler.

2.2.2.	Clock Check Interval

The Clock Check Interval is used by ATS to determine how often to check to 
see if any task should be started. This value can range from 30 seconds to 
10 minutes in thirty second intervals. The default value is 1 minute.

When the Clock Check Interval Timer elapses, ATS examines each of the 
scheduled tasks to determine if it should initiate them. If all of the criteria for 
starting that task are satisfied, ATS will add the task to the assigned job 
queue. Refer to Section 5. Tasks and Section 9 Invoking Tasks for more 
detailed information about task starting criteria and Section 6 Job Queues 
for more information about when a task that is added to a job queue will get 
started.

2.2.3.	File Check Interval

The File Check Interval is used by ATS to determine how often to check to 
see if a file has been modified. This value can range from 30 seconds to 10 
minutes in thirty second intervals. The default value is 1 minute.

When the File Check Interval Timer elapses, ATS examines the OS/2 file 
systems for two things. First, it looks at the statistics for each of the files that 
is defined in a File Modification Event. If the file previously did not exist or if 
the statistics of the file have changed and the file is available, the File 
Modification Event that is associated with the examined file is flagged as 
having occurred. Refer to Section 4.3 File Modification Events for more 
detailed information about File Modification Events. Second, it looks to see if 
any of the files defined in a File Missing event  present. If not, the File 
Missing Event that is associated with the examined file is flagged as having 
occurred. Refer to Section 4.6 File Missing Events for more detailed 
information about File Missing Events.

2.2.4.	Independent Session Display Interval

The Independent Session Display Interval is used by ATS to determine how 
long it should leave an entry in the Running Tasks Console Display window 
for an independent session. Refer to Section 5.8 Session Type for further 
information about independent sessions.

When the Clock Check Interval Timer elapses, ATS will examine each of the 
entries in the Running Tasks Console Display window. Any independent 
session that has been in the window longer than the Independent Session 
Display Interval will be removed.


2.3.	Preferences I

These settings allow you to configure how ATS interacts with the user as well 
as logging preferences. There are seven user configurable settings on the 
Preferences screen.

 

Figure 4. Preferences I Page of the System Configuration Notebook

2.3.1.	Adjusting Preferences

Clicking on the box to the left of the Preference choice will turn on or off that 
option. If a small check mark appears in the box, the option is selected (i.e. 
on) if there is no check mark, the option is not selected (i.e. off).

2.3.2.	Suppress Watchdog Warning

If Watchdog is not running when ATS is started, a message box will appear 
indicating such. Turning this on will prevent the message box from popping 
up. The default value is off.

Note: This warning can also be suppressed by specifying the NOWD option 
when starting ATS.

2.3.3.	Suppress On Line Logging

Turning this on will prevent ATS log messages from being added to the ATS 
Console Log Display. Log information is still sent to the ATS log file. The 
default value is off.

2.3.4.	Suppress All Logging

Turning this on will prevent ATS from logging any information to either the 
Console Log Display or the ATS log file. The default value is off.

2.3.5.	Warn On Edit

Turning this on will cause a warning box to appear each time you try to save 
an event, task, job queue or holiday that has been modified before the 
changes are committed to the ATS data file. The default value is on.

2.3.6.	Warn On Delete

Turning this on will cause a warning box to appear each time you try to delete 
an event, task, job queue or holiday before the object is actually deleted from 
the ATS data file. The default value is on.

2.3.7.	Sound

ATS will beep when certain things happen. These include task initiation, task 
termination, file modification, etc. If this option is not selected, ATS will not 
beep in these cases. The default value is on.

Note:	ATS will always beep when an error or warning message box is 
displayed on the screen regardless of the setting of this option.

2.3.8.	Truncate Log On Startup

Each time ATS is started, the currently selected log file is opened up. If this 
option is selected, all of the entries in the log file will be deleted when ATS is 
started. If this option is not selected, the new log entries are appended to the 
end of the current log file. The default value is off.

2.4.	Preferences II

The Preferences II page allows you to select what to do with a task that can be 
started if the tasks assigned job queue is either closed or busy as well as the 
size of the on-line log.
 

Figure 5. Preferences II Page of the System Configuration Notebook

2.4.1.	Blocked or Closed Job Queue

When the Clock Check Timer elapses, the Blocked or Closed Job Queue 
option is used by ATS to determine what it should do to a task that has met 
all of its criteria to be started but the assigned job queue is either closed or 
blocked. There are three alternatives.

Ignore/No Reset

If this option is selected, the task will not be added to the job queue and its 
dependencies will not be reset. Therefore, the next time the Clock Check 
timer elapses and ATS checks all of the scheduled tasks to see which ones 
can be added to job queues, this one will still be eligible (assuming its 
time/date/day criteria is still satisfied).

Ignore/Reset

If this option is selected, the task will not be added to the job queue and its 
dependencies will be reset. Therefore, the next time the Clock Check timer 
elapses and ATS checks all of the scheduled tasks to see which ones can be 
added to job queues, this one will no longer be eligible (unless all of its 
dependencies have, in the interim, been set on again).

Add To Job Queue

If this option is selected, the task will be added to the job queue as if the 
queue was open and not blocked. This is the default.

Selecting the Blocked or Closed Job Queue State

Clicking on the circle to the left of one the options will turn on or off that 
option and turn off the option that was previously selected. If the circle has a 
large black dot in the middle, the option is selected (i.e. on).

2.4.2.	On-Line Log Size

All of the entries that are written out to the ATS log file are optionally stored 
in memory and displayed in the ATS Log display window. This parameter 
allows you to select how much memory is used to store the log information. 
When the on-line log file is full, ATS will clear it and start fresh. The default 
value is 4K.

Adjusting The Size Of The On-Line Log

There are two ways that you can adjust the size of the on-line log. The first 
method is to click with the right mouse button on one of the two small arrows 
to the right of the ruler. This will cause the button that is on the ruler to move. 
The second method is to click on the button that is on the ruler and slide it to 
the left or the right. As the button moves, the size of the on-line log will be 
updated and displayed in the text window above the ruler.
2.5.	Restart

The Restart page allows you to configure what information ATS should save 
when ATS is shut down and subsequently restore when ATS is restarted.

 

Figure 6. Restart Page of the System Configuration Notebook

2.5.1.	Save ATS Environment

If this option is selected:

When ATS is shut down the physical size and location of the ATS main 
window are saved as are the state (visible or not), size and position of the 
three ATS Console Display windows. Also saved is the currently selected 
ATS Console Display font. Refer to Section 11 ATS Console Display for 
further information. When ATS is started it will be restored to the same state 
it was in when it was last shutdown.

If not:

When ATS is started, it will be in the default size and location and no display 
windows will be opened.

The default value is on

2.5.2.	Save Dependency File Statistics

If this option is selected:

When ATS is shut down, the statistics for all of the files associated with File 
Modification events will be saved. When ATS is started, this information will 
then be used as the base file statistic information.

If not:

When ATS is started, ATS will read the current statistics for each file 
associated with a File Modification event and use that information as the 
base file statistics.

The default value is off.

2.5.3.	Save State of Each Dependency for Each Task

If this option is selected:

When ATS is shut down, the state of each dependency for each task will be 
saved. When ATS is started, the state of each dependency will be restored 
to the previous state.

If not:

The state of each dependency for each task will be initialized to RESET.

The default value is on.

2.5.4.	Requeue Interrupted Tasks

If this option is selected:

When ATS is shut down, the information required to restart any ATS initiated 
task that is still running will be saved. When ATS is started, these tasks will 
be added back to their assigned queues.

If not:

No restart information will be saved.

The default is off.

Note:	ATS will not restart a task from a check point, ATS will simply requeue 
the task (i.e. the task will start from the beginning again unless there is 
some logic built into the task itself).

Note:	Because ATS does not know if an independent session has or has not 
yet terminated, ATS will requeue independent sessions based upon 
whether or not they are listed in the Running Tasks Console window 
regardless of whether or not they are actually running.

Note:	Restarted tasks will not start immediately after ATS is started. These 
tasks are placed back into their assigned job queues. When they 
actually get started is based upon the job queue attributes and the 
setting of the Clock Check Timer. Refer to Section 9 Invoking Tasks 
for further information about when tasks get started.

2.5.5.	Save Job Queues

If this option is selected:

When ATS is shut down, any task that is waiting in a  job queue will be 
saved. When ATS is restarted, these tasks will be added back into their 
assigned queues again.

If not:

Any task that was waiting in a job queue will be not be requeued.

The default is off.

2.6.	Business Days

The Business Days page allows you to specify what days of the week are valid 
business days for your operation.

ATS uses this information when it is calculating the first and last business days 
of the month as well as the last business day before the fifteenth and the first 
business day after the fifteenth.

 

Figure 7. Business Days Page of the System Configuration Notebook

2.6.1.	Selecting Valid Business Days

Clicking on the circle to the left of the names of the days of the week will 
alternately select or deselect that day as a valid business day. If the circle 
has a large black dot in the middle, the day is selected as a valid business 
day.

2.7.	Snapshot

The Snapshot page allows you to define the name of the files that the ATS Log 
Snapshot and ATS Status Snapshot information get written to.

 

Figure 8. Snapshot Page of the System Configuration Notebook

2.7.1.	Selecting an output file

Selecting an output file for either of the snapshots can be done in one of two 
ways. The first is to type in the name of the file where you want the 
information to go. The second is to click on the Find... button to the right of 
the file name field. This will bring up the OS/2 standard file dialog box. Using 
this, you select the file where you want the output to go.

2.7.2.	Selecting the disposition of the selected files current contents

When a snapshot is performed, if the destination file exists, ATS must know 
what to do with the current contents. If the Replace option is selected, the 
current contents are thrown away. If the Append option is set, the current 
contents are left in the file and the new information is added on to the end of 
the file.



This page intentionally left blank.

3. Holidays

ATS uses Holidays to determine when to run a scheduled task. A task can be 
scheduled to run on any combination of days of the week and days of the 
month. In addition, a task can be scheduled to run on a particular day (of the 
week or month) if that day falls on a defined holiday, if it does not fall on a 
defined holiday or regardless of if it falls on a defined holiday. Refer to Section 
5 Tasks for a more detailed explanation of how to schedule a task.

A Holiday definition consists of a date, a name, and a day of the week. Any day 
of the year can be defined as a Holiday. You can define an unlimited number 
of Holidays.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual (ATS_HLDY) for information about defining and deleting 
ATS holidays from an OS/2 command line. Refer to Section 3 Application 
Programming Interface in the ATS for OS/2 Version 3 Reference Manual 
(ATSAddHoliday, ATSRemoveHoliday) for information about defining and 
deleting ATS holidays from an OS/2 program.

To display the Define Holidays screen:

  Select Edit from the main ATS menu.
  Select Holidays from the Edit menu.
The keyboard short cut key is: Ctrl+H.

 

Figure 9. Holidays Dialog Box

3.1.	The Year 0000

ATS accepts 0000 for the value of the year when defining holidays. If the year 
is set to 0000, then the associated date will be considered a holiday every 
year.

3.2.	Maintaining Holidays

3.2.1.	Adding a New Holiday

  Insure that you are in Add Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Add Mode, the title will be "ATS for OS/2 - 
Define Holidays (Add)" and the Mode Change button (located in the 
lower right corner of the dialog box will be labeled "Edit Mode". If you 
are not in Add Mode the mode change button will be labeled "Add 
Mode", click on it.
  Enter a valid date in the Date field. To change the date, you can either 
manually edit the date or use the + (plus) and - (minus) keys to 
increment and decrement the date by one, respectively.
Note:	ATS will validate the date when you click on the OK button.

  Enter text in the Holiday field that describes the holiday. You can enter 
a maximum of 32 characters.
  Click on the Add button.
  If the date that you entered is invalid or is already defined as a holiday, 
an error message will be displayed.
  If the date is valid and is not already defined as a holiday, the day of 
week window will be set, the holiday will be added to the ATS calendar, 
and the entry will appear in the list box.
3.2.2.	Deleting an Existing Holiday

  Insure that you are in Edit Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
Define Holidays (Edit)" and the Mode Change button (located in the 
lower right corner of the dialog box will be labeled "Add Mode". If you 
are not in Edit Mode the mode change button will be labeled "Edit 
Mode", click on it.
  Select the entry in the list box that you wish to delete.
  Click on the Delete button.
  If the "Warn on Delete" option on the Preferences I page of the System 
Configuration notebook was selected, a message box will appear asking 
you to confirm the deletion.
  If "Warn on Delete" is off or if you answered yes to the deletion 
confirmation, the holiday will be removed from the ATS calendar, and 
the entry will be removed from the list box.
3.2.3.	Editing an Existing Holiday

  Insure that you are in Edit Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
Define Holidays (Edit)" and the Mode Change button (located in the 
lower right corner of the dialog box will be labeled "Add Mode". If you 
are not in Edit Mode the mode change button will be labeled "Edit 
Mode", click on it.
  Select the entry in the list that you wish to edit.
  Enter a valid date in the Date field. To change the date, you can either 
manually edit the date or use the + (plus) and - (minus) keys to 
increment and decrement the date by one, respectively.
  Note:	ATS will validate the date when you click on the OK button.
  Enter text in the Holiday field that describes the holiday. You can enter 
a maximum of 32 characters.
  Click on the OK button.
  If the "Warn on Edit" option on the Preferences I page of the System 
Configuration notebook was selected, a message box will appear asking 
you to confirm the changes.
  If the date that you entered is invalid or is already defined as a holiday, 
an error message will be displayed.
  If the date is valid and is not already defined as a holiday, the day of 
week field will be updated, the holiday will be edited in the ATS 
calendar, and the entry will be refreshed in the list box.




This page intentionally left blank.
4.	Events

An event, in ATS, is something that happens that a scheduled task can be 
dependent upon. This can be a file being modified (File Modification Event), a 
file that is not present on the system (File Missing), the completion of a task that 
was scheduled through and initiated by ATS (Task Completion Event), a 
regularly scheduled periodic occurrence (Periodic) or notification that something 
has occurred (Signal Event).

ATS uses events as one of the criteria to base its initiation of scheduled tasks.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual (ATS_EVNT) for information about defining and deleting 
ATS events from an OS/2 command line. Refer to Section 3 Application 
Programming Interface in the ATS for OS/2 Version 3 Reference Manual 
(ATSAddEvent, ATSRemoveEvent) for information about defining and deleting 
ATS events from an OS/2 program.

To display the Define Events screen:

  Select Edit from the main ATS menu.
  Select Events from the Edit menu.
The keyboard short cut key is: Ctrl+E.

4.1.	Maintaining Events

4.1.1.	Adding a New Event

  Insure that you are in Add Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Add Mode, the title will be "ATS for OS/2 - 
Define Events (Add)" and the Mode Change button (located in the lower 
right corner of the dialog box will be labeled "Edit Mode". If you are not 
in Add Mode the mode change button will be labeled "Add Mode", click 
on it.
  Fill in the event attributes as required based upon the type of event.
  Click on the Add button.
  If the name that you entered is already defined or a required field is 
missing or out of range, an error message will be displayed.
  If all required event attributes are filled in and within range, the event 
will be added to the ATS event list, and the event name will appear in 
the Events list box.
4.1.2.	Deleting an Existing Event

  Insure that you are in Edit Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
Define Events (Edit)" and the Mode Change button (located in the lower 
right corner of the dialog box will be labeled "Add Mode". If you are not 
in Edit Mode the mode change button will be labeled "Edit Mode", click 
on it.
  Select the entry in the Events list box that you wish to delete.
  Click on the Delete button.
  If the "Warn on Delete" option on the Preferences I page of the System 
Configuration notebook was selected, a message box will appear asking 
you to confirm the deletion.
  If "Warn on Delete" is off or if you answered yes to the deletion 
confirmation, the event will be removed from the ATS event list, and the 
entry will be removed from the Events list box.
4.1.3.	Editing an Existing Event

  Insure that you are in Edit Mode. The mode is indicated in the title bar of 
the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
Define Events (Edit)" and the Mode Change button (located in the lower 
right corner of the dialog box will be labeled "Add Mode". If you are not 
in Edit Mode the mode change button will be labeled "Edit Mode", click 
on it.
  Select the entry in the Events list box that you wish to edit.
  Enter the changes that you want, insuring that you fill in all of the 
required event attributes.
  Click on the OK button.
  If the "Warn on Edit" option on the Preferences I page of the System 
Configuration notebook was selected, a message box will appear asking 
you to confirm the changes.
  If the name that you entered is already defined or a required field is 
missing or out of range, an error message will be displayed.
  If all required fields are filled in and within range, the events new 
attributes will be saved.

4.2.	Common Event Attributes

Event Name

The name given to a particular event by the user. This name must be unique 
among all events defined to ATS. The Event Name can be up to 12 
characters long.

Event Description

A text description of the event. It is not used by ATS internally. It is displayed 
on the event report and is used to describe the events purpose better than 
the 12 character name. The Event Description can be up to 99 characters 
long.

Event Type

Defines the characteristics of the event and how it is flagged as having 
occurred. The five possibilities are: Job Termination, File Modification, 
Signal, Periodic and File Missing.

Reset On Run

This attribute is used as the default value for the Reset On Run attribute of 
an event when it is linked to a task. If this attribute is set for an event linked 
to a task, then when the task is started by ATS, the state of the event will be 
reset (i.e. off). If this attribute is not set, the state of the event will not be reset 
(i.e. it will remain set or on). Refer to Section 5.10.4 Reset On Run for more 
information on the Reset On Run attribute of an event linked to a task.

4.2.1.	Selecting The Event Type

Clicking on the circle to the left of the event type will set the type of current 
event. If the circle has a large black dot in the middle, that is the selected 
event type.


4.2.2.	Toggling the Reset On Run Setting

Clicking on the box to the left of Reset On Run will turn on or off the events 
default Reset On Run value. If a small check mark appears in the box, Reset 
On Run is the default, if there is no check mark, then do not Reset On Run is 
the default.

4.3.	Job Termination Events

A Job Termination event is an event that will be flagged as having occurred 
when the associated job (a task that is scheduled and executed through ATS) 
completes and the associated job ends with a return code that falls within the 
defined return code range. In order for a task to be used as a Job Termination 
event, it must run as a child process of ATS. Any task that is scheduled 
through ATS and does not have the Independent Session option selected on 
the Session Type page of the Schedule Task notebook will run as a child 
process of ATS. Refer to Section 5.8 Session Type for more information about 
the differences between child processes and independent sessions.

 

Figure 10. Job Termination Event Dialog Box

4.3.1.	Job Termination Event Attributes

Minimum Return Code

The lowest possible value returned by the dependent task that will cause this 
event to be flagged as having occurred. This value can be up to 5 digits or 4 
digits and a leading sign. This value must be less than the Maximum Return 
Code.

Maximum Return Code

The highest possible value returned by the dependent task that will cause 
this event to be flagged as having occurred. This value can be up to 5 digits 
or 4 digits and a leading sign. This value must be greater than the Minimum 
Return Code.

Task

The name of the task which this event is dependent upon. The task is 
specified by selecting one task from the Tasks list box. A scheduled task can 
not be dependent upon its own completion. Therefore, a Job Termination 
Event can not be defined to be a dependency of the task of which it is 
dependent upon.

4.4.	File Modification Events

A File Modification event is an event that will be flagged as having occurred 
when the associated file is updated. The file is checked periodically to see if its 
statistics have changed and if it is available. The interval between file checks 
is determined by the setting of the File Check Interval timer. Refer to Section 
2.2 Timers for further information on setting the File Check Interval.

If the associated file does not exist when ATS is started, ATS will initialize all 
of the files attributes to low values. The first time that the File Check Interval 
elapses after the file is created, ATS will flag the event as having occurred. 
When selecting the availability requirements, keep in mind that OS/2 will 
create base statistics for a new file before the file is completely saved. If you 
create an event that is dependent upon a currently non-existing file, ATS will 
not be able to gather any statistics on that file. As soon as the file is created, 
ATS will then be able to gather statistics and, according to ATS, the file has 
changed. If this file, for example, is being downloaded from a host system, 
when the file first begins to arrive OS/2 will create statistics for the file. At this 
point, the file is not completed and is not available for reading or writing. So if 
the file that is associated with a file modification event is to be used by a 
dependent task, you should ensure that the availability requirements are set 
appropriately.

 

Figure 11. File Modification Event Dialog Box

4.4.1.	File Modification Event Attributes

Full File Name

The drive, path, and name of the file that is being monitored for this event. 
The drive, path and name can contain a maximum of 255 characters.

Modification Types

When determining if a file has been modified, ATS can query various 
attributes of the file. These are: the date of the last file modification, the time 
of the last file modification, the size of the file, the files Read Only attribute, 
the files Hidden attribute, the files System attribute and the files Archived 
attribute. The default is for ATS to query the date and time the file was last 
modified and the size of the file.

File Availability

If ATS determines that a file has been modified, it then checks to see if the 
file is available. You select the availability requirements of the file. The 
options are: available for reading, available for writing, available for reading 
and writing or the file does not have to be available for either (none). The 
default is for the file to be available for both reading and writing.

4.4.2.	Selecting the Modification Types

Clicking on the box to the left of one of the modification types will turn on or 
off that modification type requirement. If a small check mark appears in the 
box, when ATS checks to see if the associated file has changed, it will check 
that attribute of the file, otherwise, it will not.

4.4.3.	Selecting the File Availability Option

Clicking on the circle to the left of the file availability option will select that 
option and turn off the previously selected option. If the circle has a large 
black dot in the middle, that is the selected file availability option.

4.5.	Signal Events

A Signal Event is an event that will be flagged as having occurred when a 
signal is received from one of the following sources:

  a supplied API that has been incorporated into an independently 
developed application program
  a supplied executable, ATS_SGNL.EXE, that has been executed at an 
OS/2 command line or from within a REXX or OS/2 Command 
procedure
  user interaction with the Signal Events menu option on the ATS main 
window

ATS allows you to clear the flag that indicates that an event has occurred. 
ATS will clear the flag when a signal is received from one of the following 
sources: 

  a supplied API that can be incorporated into an independently 
developed application program
  a supplied executable, ATS_RSET.EXE that can be executed at an 
OS/2 command line or from within a REXX or OS/2 Command 
procedure.
  user interaction with the Signal Events menu option on the ATS main 
window
 
Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual for further information about using the supplied 
executables and Section 3 Application Programming Interface in the ATS 
for OS/2 Version 3 Reference Manual for further information about using 
the API's.

 

Figure 12. Signal Event Dialog Box

4.5.1.	Signal Event Attributes

There are no additional attributes for Signal Events.



4.6.	Periodic Events

A periodic event is an event that will be signaled with a user defined regularity. 
The user defines how often the event will be signaled first by specifying the 
interval type (seconds, minutes, hours, days or weeks) and then the interval 
frequency (i.e. every 4 hours).

The user specifies when the periodic event should first be signaled (base date 
and time). ATS will signal the event at that time and then, using the user 
defined information, signal the event on a regular basis. If the specified base 
date and time is later than the current date and time, either when the event is 
created or when ATS is started, the periodic event will not be signaled until the 
specified date and time. If the specified date and time are prior to the current 
date and time, either when the event is created or when ATS is started, ATS 
will calculate when the next time the event should be signaled, based upon the 
base date and time and the frequency interval, and wait until that time before 
signaling the event.

 

Figure 13. Periodic Event Dialog Box


4.6.1.	Periodic Event Attributes

Base Date and Time

These fields define the first time that the periodic event should be signaled. 

Set once every

These fields define the frequency that the event will be signaled.

4.6.2.	Selecting the Base Date and Time and the Set once every settings

Select the field that you want to modify by clicking in the text area with the 
mouse or tabbing to it. Then use the up and down arrows to the right of the 
field to increase or decrease the value by cycling through the valid values. 
For the date, the maximum value for the day of the month will change based 
upon the month selected. The minimum value for the year field is 1993 and 
the maximum value is 2025. The minimum frequency value is 1 (displayed as 
001) and the maximum value is 999. The interval types are: Seconds, 
Minutes, Hours, Days and Weeks.
4.7.	File Missing Events

A File Missing event is an event that will be flagged as having occurred when 
the associated file is not found on the file system. The file is checked 
periodically to see if it exists. The interval between file checks is determined by 
the setting of the File Check Interval timer. Refer to Section 2.2 Timers for 
further information on setting the File Check Interval.

 

Figure 14. File Missing Event Dialog Box

4.7.1.	File Missing Event Attributes

Full File Name

The drive, path, and name of the file that is being monitored for this event. 
The drive, path and name can contain a maximum of 255 characters.

5.	Tasks

A Task is a program that you wish to schedule to be automatically started by 
ATS. The program can be an OS/2 full screen application, an OS/2 windowed 
application, an OS/2 PM application, a DOS windowed application, a DOS full 
screen application or a Windows application. A task can be scheduled to run 
based upon any combination of the following:

  time of day
  day of the week
  month
  day of the month
  holidays or non-holidays
  event dependencies

A task is assigned to run in a particular job queue. The task is also assigned a 
priority within the job queue.

Tasks are created, modified and deleted using the Schedule Task Notebook.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual (ATS_TASK) for information about defining, modifying and 
deleting ATS tasks from an OS/2 command line. Refer to Section 3 
Application Programming Interface in the ATS for OS/2 Version 3 
Reference Manual (ATSAddTask, ATSModifyTask, ATSRemoveTask) for 
information about defining, modifying and deleting ATS tasks from an OS/2 
program.


Note:	If no job queues are defined, ATS will not allow you to define a task.
To display the Schedule Task Notebook:

  Select Edit from the main ATS menu.
  Select Tasks from the Edit menu.

The keyboard short cut key is: Ctrl+T.

5.1.	Maintaining Tasks

The Select Page of the Schedule Task notebook is used to select a task for 
modification, create a new task, delete a task or copy the definition of an 
existing task to a new task.

 

Figure 15. Select Page of the Schedule Task Notebook

5.1.1.	Adding a New Task

To add a new task, click on the New button on the Select page of the 
Schedule Task notebook. When you select this option, the Names & Settings 
page will be displayed.

Note:	If no tasks are currently defined, selecting the Tasks option on the Edit 
menu of the main ATS window will cause this page to be by passed 
and the Names & Settings page will be brought up directly.

5.1.2.	Deleting an Existing Task

  Select a task by clicking on it in the Task Selection list box.
  Click on the Delete button.
  If the "Warn on Delete" option on the Preferences screen was selected, 
a message box will appear asking you to confirm the deletion.
  If "Warn on Delete" is off or if you answered yes to the deletion 
confirmation, the event will be removed from the ATS task list and the 
entry will be removed from the Task Selection list box.

5.1.3.	Editing an Existing Task

  Select a task by clicking on it in the Task Selection list box.
  Select one of the other pages in the notebook to edit the task attributes.

5.1.4.	Copying an Existing Task

ATS provides a facility for you to copy the definition of an existing task to a 
new task. Using this feature, you can use one task as the template for others.

  Select the task to be used as the template by clicking on it in the Task 
Selection list box.
  Click on the Copy button.
  A new task will be created. The name of the new task will be the same 
as the original one with a '$' concatenated on the end. The Names & 
Settings page will be displayed.
  Select one of the other pages in the notebook to edit the tasks other 
attributes.

5.1.5.	Setting Attributes To Their Default Values

While Editing any page of the Schedule Tasks Notebook, you can have ATS 
reset all of the attribute values on that page to their default value. To do this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Default

5.1.6.	Restore Attribute Values

While Editing any page of the Schedule Task Notebook, you can have ATS 
reset all of the attribute values on that page to the value that they had before 
you made any changes (i.e. their last saved value). To do this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Undo Changes

5.1.7.	Saving The Task Information

After you have made any changes to any of the attributes values, you must 
save them in order for them to take effect. There are two ways to do this.

  Click on the system menu icon in the upper left corner of the window.
  Click on Save Changes

or

  Click on the Save button in the title bar.

5.2.	Names & Settings

The Names & Settings page of the Schedule Task Notebook is used to define 
the task name, description, the maximum number of concurrent occurrences of 
the task, which job queue it is assigned to, what priority the task has within the 
job queue and whether or not the task should be deleted after it is run.

This screen also displays the number of dependencies (by type and total) that 
the task has.

 

Figure 16. Names & Settings Page of the Schedule Task Notebook

Task Name

The name given to a particular task by the user. This name must be unique 
among all tasks defined to ATS. The Task Name can be up to 12 characters 
long. This field is required for all task definitions.

Task Description

A text description of the task. It is not used by ATS internally. It is displayed on 
the task report and is used to describe the tasks purpose better than the 12 
character name. The Task Description can be up to 99 characters long.

Concurrent Occurrences

Defines the limit of how many concurrent active occurrences of a scheduled 
task ATS can invoke. i.e. If this number is set to 1 and the task is active, even 
if all of the dependencies and other criteria are satisfied, ATS will not queue 
the task. This does not apply to independent sessions since ATS does not 
know if the task is truly active.

If you set this value to 0 (zero), then ATS will never invoke this task. This can 
be used as a way of archiving a task for a period of time without having to 
remove it from ATS and then rebuild it at a later date. This does apply to 
independent tasks.

To change the Maximum Concurrent Occurrences, click on the up or the down 
arrow to the right of the field.

Job Queue

This is the name of the job queue that the scheduled task will be run from. The 
job queue further defines when a task can be run based upon the queues 
availability. The job queue also defines what operating system priority the task 
will have when it is executed. Refer to Section 6. Job Queues for further 
information about job queues.

To select a job queue for the task, click on the down arrow to the right of the 
job queue name field. This will produce a list of all defined job queues. Select 
one job queue from this list by using the up and down arrow keys or clicking on 
it with the mouse.

Note:	If no job queues are defined, ATS will not allow you to define a task.

Priority Within Queue

The Priority Within Queue field defines the order that queued jobs waiting to 
be executed will be run. The scheduled task in the job queue that has the 
highest priority and the earliest queue entry date and time will be the first task 
released from the queue.

To change the Priority Within Queue, click on the up or the down arrow to the 
right of the field.

Recurring Task/Delete Task When Run

These options define what ATS should do to a scheduled task after it is 
released from the job queue. If the Recurring Task option is selected, the task 
is left in the schedule. If the Delete Task When Run option is selected, the task 
is removed from the schedule.

Click on the button to the left of Recurring Task or Delete on Run to select that 
option. If the radio button to the left of Recurring Task is selected, the task will 
remain in the schedule after being initiated. If the radio button to the left of 
Delete on Run is selected, the task will be removed from the schedule when 
the task is initiated.

Dependencies

This is an information only box that displays the number of dependencies, by 
type, that the current task has. The information in this box is for display only 
and can not be changed by the user.

5.3.	Months

The Months page defines during what months the scheduled task is eligible to 
be run.

 

Figure 17. Months Page of the Schedule Task Notebook

Valid Months

Defines the months that you want the task to be allowed to run.

Click on the button to the left of the month's abbreviation to select or deselect 
the month. If the radio button to the left of the months abbreviation is selected, 
the task is eligible to run in that month. If the month is not selected, the task is 
not eligible to run in that month.

If you fail to select any month, a warning message will be displayed informing 
you that the task will never run.

5.4.	Dates & Times

The Dates & Times page defines during what date ranges and what hours of 
the day the scheduled task is eligible to be run.

 

Figure 18. Dates & Times Page of the Schedule Task Notebook

Dates and Times

Defines the hours during the day that you want the task to be allowed to run 
as well as the dates that you want the task to be allowed to run.

The start and end times can be from 00:00:00 to 23:59:59. The start time 
does not have to be earlier than the end time. If it is not, then the time range 
will be assumed to span midnight.

The start and end dates can be from 01/01/1993 to 12/31/2025. 

The start date must be before the end date or a warning message will be 
displayed.

The allowed date and time ranges are independent of each other.

To change the start or end date, click on the day, month, or year and then 
click on the up or the down arrow to the right of the year field.

To change the start or end time, click on the hour or minute and then click on 
the up or the down arrow to the right of the minute field.

Refer to Section 9 Invoking Tasks for more information on how the date and 
time fields are used to determine when a task will be started.

5.5.	Day of Week

The Day of Week page defines which days of the week the scheduled task is 
eligible to be run.

 

Figure 19. Day of Week Page of the Schedule Task Notebook

Day of Week

Defines the days of the week that you want the task to be allowed to run. You 
can further define if the task should run if the particular day of the week is a 
holiday, if it is not a holiday, or regardless of its holiday status.

You can change the setting for a particular day of the week two ways.  The 
first method is to click with the right mouse button on one of the two small 
arrows below the ruler. This will cause the button that is on the ruler to move. 
The second method is to click on the button that is on the ruler and slide it up 
or down.

If you have set the slider to "Don't Run", then this task is not eligible to run on 
the associated day of the week.

If you have set the slider to "Run", then this task is eligible to run on the 
associated day of the week.

If you have set the slider to "Holiday", then if the associated day of the week 
falls on a defined holiday, the task is eligible to run.

If you have set the slider to "Non-Holiday", then if the associated day of the 
week falls on a day that is not defined as a holiday, the task is eligible to run.

If you set all of the days of the week to "Don't Run", a warning message will 
be displayed informing you that the task will never run.

The following chart summarizes when a task is eligible to run based upon the 
setting of the slider.


Slider 
Setting
Current day of 
the week is a 
holiday
Current day of 
the week is not 
a holiday

Non-Holiday
Can't Run
Can Run

Holiday
Can Run
Can't Run

Run
Can Run
Can Run

Don't Run
Can't Run
Can't Run


5.6.	Day of Month

The Day of Month page defines which days of the month the scheduled task is 
eligible to be run.

 

Figure 20. Day of Month Page of the Schedule Task Notebook

Day of Month

Defines the days of the month that you want the task to be allowed to run.

You can further define if the task should run if the particular day of the month 
is a holiday, if it is not a holiday, or regardless of its holiday status.

You can change the setting for a particular day of the month two ways.  The 
first method is to click with the right mouse button on one of the two small 
arrows below the ruler. This will cause the button that is on the ruler to move. 
The second method is to click on the button that is on the ruler and slide it up 
or down.

If you have set the slider to "Don't Run", then this task is not eligible to run on 
the associated day of the month.

If you have set the slider to "Run", then this task is eligible to run on the 
associated day of the month.

If you have set the slider to "Holiday", then if the associated day of the month 
falls on a defined holiday, the task is eligible to run.

If you have set the slider to "Non-Holiday", then if the associated day of the 
month falls on a day that is not defined as a holiday, the task is eligible to 
run.

If you set all of the days of the month to "Don't Run", a warning message will 
be displayed informing you that the task will never run.

The following chart summarizes when a task is eligible to run based upon the 
setting of the slider.


Slider 
Setting
Current day of 
the month is a 
holiday
Current day of 
the month is not 
a holiday

Non-Holiday
Can't Run
Can Run

Holiday
Can Run
Can't Run

Run
Can Run
Can Run

Don't Run
Can't Run
Can't Run


5.7.	Special Days

The Special Days page defines which special days of the month the scheduled 
task is eligible to be run.

 

Figure 21. Special Days Page of the Schedule Task Notebook

Special Days

There are five special days of the month. They are 1) "L" the last day of the 
month, 2) "LB" the last business day of the month, 3) "FB" the first business 
day of the month, 4) "15B" the last business day of the month before the 
15th, and 5) "15A" the first business day of the month after the 15th. For 
these five special days, holidays are considered to be non-business days. 
Refer to Section 2.6 Business Days for further information on customizing 
valid business days.

The following chart summarizes when a task is eligible to run based upon the 
setting of the slider.


Slider 
Setting

Current special 
day is a holiday
Current special 
day is not a 
holiday

Non-Holiday
Can't Run
Can Run

Holiday
Can Run
Can't Run

Run
Can Run
Can Run

Don't Run
Can't Run
Can't Run


5.8.	Session Type

The Session Type page defines how ATS should start the scheduled task.

 

Figure 22. Session Type Page of the Schedule Task Notebook

Session Type

Defines how the task should be run. The options are Default, OS/2 Full 
Screen, OS/2 Window, PM, DOS Full Screen, DOS Window, Common Win-
OS/2 Session and Private Win-OS/2 Session.

If you select Default, the program that is started will be started in the default 
session type for that program.

Click on the radio button to the left of the session type to select that session 
type and deselect the previously selected type.

Note:	If the CMD option is selected and you the session type is set to 
Default, the command procedure will be started in an OS/2 Windowed 
session.

Background

You can specify that the scheduled task be run in the background. If you do 
not select the background option, ATS will attempt to make the executed task 
the active session. Sometimes this is not possible. 

Clicking on the box to the left of the Background option will turn on or off that 
option. If a small check mark appears in the box, the option is selected (i.e. 
on) if there is no check mark, the option is not selected (i.e. off).

Note:	Starting a task in the background means not making it the active 
session when it is started. This is not the same as starting a detached 
session. A detached session is one that requires no keyboard or 
mouse input and no display output.

CMD File

If the program to be run is an OS/2 Command Procedure or a REXX 
program, then the CMD File option must be selected.

Clicking on the box to the left of the CMD File option will turn on or off that 
option. If a small check mark appears in the box, the option is selected (i.e. 
on) if there is no check mark, the option is not selected (i.e. off).

Note:	If the CMD option is selected and you the session type is set to 
Default, the command procedure will be started in an OS/2 Windowed 
session.

Independent Session

Defines if the task should run as a child process of ATS or as an 
independent session. If the task runs as a child of ATS, then when the 
program ends, the system will notify ATS and provide the return code from 
the scheduled task. ATS will use this information to signal any dependent 
tasks, remove the item from the Running Tasks window, and place an entry 
in the ATS log indicating that the task has ended.

Independent tasks, when initiated, are recorded in the ATS log and in the 
Running Tasks window. However, because the system does not notify ATS 
when the task ends, they are removed from the Running Tasks window not 
when they end but rather after a specified amount of time (Independent 
Session Display Interval) after they were started. Refer to Section 2.1 Timers 
for further information on the Independent Session Display Interval. No 
termination entry is placed in the ATS log. Because ATS can not determine 
when an independent session has ended, it is recommended that all 
scheduled tasks be run as child processes unless it is absolutely necessary 
to run it as an independent session.

If ATS is terminated, whether normally or abnormally, any task that is a child 
of ATS will be terminated by the system. If there are active child tasks 
running and a user attempts to shut down ATS, a warning message will be 
displayed.

Clicking on the box to the left of the Independent Session option will turn on 
or off that option. If a small check mark appears in the box, the option is 
selected (i.e. on) if there is no check mark, the option is not selected (i.e. off).

Minimized

If the Minimized radio button is selected, ATS will instruct OS/2 to start the 
scheduled task in a minimized state.

Maximized

If the Maximized radio button is selected, ATS will instruct OS/2 to start the 
scheduled task in a maximized state.

Default

If the Default radio button is selected, ATS will instruct OS/2 to start the 
scheduled task in its default size and at its default position.

5.9.	Program Details

The Program Details page defines the program that is associated with the 
scheduled task.

 

Figure 23. Program Details Page of the Schedule Task Notebook

Program Name

The drive, path, and name of the executable associated with the task that is 
to be run when all of the dependencies for the task are satisfied. The drive, 
path and name can contain a maximum of 255 characters. This field is 
required for all tasks.

You can select the program associated with this task by clicking on the 
Find... button above and to the right of the Program Name field. This will 
bring up the OS/2 standard file dialog box. If you click on the OK button on 
the OS/2 standard file dialog box, the file name selected there will be placed 
into the program name field.

Note: If you want to redirect the output from a scheduled task, add  > 
outfile to the end of the program name. ATS will warn you that the 
program does not exist and prompt you to save it anyway. Answer yes.

Parameters

A string that is passed to the executable when it is invoked by ATS. The 
Parameters field can contain a maximum of 255 characters. The parameter 
string may contain imbedded ATS variables which will be replaced by ATS at 
run time. These variables allow you to pass the following information to the 
scheduled task: current (execution) date, current time, day of week, holiday 
indicator, and task name. Each of these variables can be passed in various 
formats. The chart below defines the syntax and output of each option. This 
field is optional.

Variable
Syntax
Output

Date
!DI
1991-10-27


!Di
91-10-27


!DU
10/27/1991


!Du
10/27/91


!DE
27.10.1991


!De
27.10.91


!DJ
1991-10-27


!Dj
91-10-27

Time
!TI
13.30.05


!Ti
13.30


!TU
01:30 PM


!Tu
01:30


!TE
13.30.05


!Te
13.30


!TJ
13:30:05


!Tj
13:30

Day Of Week
!XA
SUN


!Xa
Sun


!XF
SUNDAY


!Xf
Sunday


!XN
0 (Sun = 0, Sat = 6)


!X1
1 (Sun = 1, Sat = 7)

Holiday
!HN or !Hn
1 if holiday, 0 if not


!HA
H if holiday, N if not


!Ha
h if holiday, n if not

Task Name
!N
TASK NAME


!n
Task Name

Exclamation Mark
!!
!


	You can use the Replacement Variables list boxes to insert the 
variable that you want to use instead of typing it in. To insert a replacement 
variable:

  From the Name list box, select the type of replacement variable that you 
want to insert.
  From the Modifier list box, select the format that you want the 
replacement variable inserted as. The text field above the Insert button 
will be updated to indicate the replacement variable that will be inserted 
if the Insert button is clicked on.
  Click on the Insert button.

Working Directory

The drive and path where the executable will be invoked from. The drive and 
path can contain a maximum of 255 characters. This field is optional.

If you omit the working directory, the working directory for ATS will be used 
as the working directory for the task.

5.10.	Dependencies

The Dependencies page defines the dependencies that are associated with 
the task.

A dependency is a link between an event and a task. An event can be a 
dependency for one or more tasks. A task can be dependent upon one or more 
events. Actually, an event can be defined and not be a dependency of any task 
and a task can be defined without having being dependent upon any event.

 

Figure 24. Dependencies Dialog Box

5.10.1.	Adding a New Dependency

  Select the event, from the Defined Events list box, that you want to be a 
dependency of the current task.
  Click on the Add>> button.
  If the task is already listed in the Dependencies list box, ATS will beep.
  If you did not select a task from the Defined Events list box, ATS will 
beep.
  If the selected event is not already in the Dependencies list box, ATS 
will add the event as a dependency of the current task and add it to the 
Dependencies list box.
5.10.2.	Remove an Existing Dependency

  Select the event that you want to remove from the Dependencies list 
box.
  Click on the Remove<< button.
  If you did not select a task from the Dependencies list box, ATS will 
beep.
  ATS will remove the event as a dependency of the current task and 
remove it from Dependencies list box.

5.10.3.	Reset On Run

The Reset On Run field below the Defined Events list box displays the 
default Reset On Run value for the currently selected event. This is a display 
only field and can not be modified. If you want to change the default Reset 
On Run value for an event, refer to Section 4.2 Common Event Attributes.

The Reset On Run field below the Dependencies list box displays the current 
setting of the Reset On Run attribute for the currently selected dependency. 
You can change the setting for the Reset On Run attribute for the currently 
defined dependency. To do this, select the appropriate event and then click 
on the box to the left of Reset On Run. This will turn on or off the 
dependencies Reset On Run state for this task. If a small check mark 
appears in the box, Reset On Run is in effect, if there is no check mark, then 
do not Reset On Run is in effect.

5.10.4.	Define Event

Clicking on the Define Event button on the Define Task Dependencies 
screen will bring up the Define Events screen. You can add new events, 
delete existing events, or edit existing events. When you return to the Define 
Task Dependencies screen, the Defined Events list box and the 
Dependencies list box will be refreshed. Refer to Section 4 Events for further 
information about events and defining them.

Note:	If an event is deleted, it is removed as a dependency from all tasks 
that it had been associated with.
6.	Job Queues

A Job Queue is a buffer that further controls how and when ATS should run a 
scheduled task. Job queues allow you to set the scheduled tasks priority (when 
running) within the operating system. It also allows you to control the number of 
tasks that ATS will start at any given point. When a task is eligible to be run, 
ATS adds the task to the appropriate job queue. The job queue then decides if 
the task can be started or if it must wait.

Job queues are created, modified and deleted using the Job Queue 
Configuration Notebook.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual (ATS_JOBQ) for information about defining, modifying and 
deleting ATS job queues from an OS/2 command line. Refer to Section 3 
Application Programming Interface in the ATS for OS/2 Version 3 
Reference Manual (ATSAddJobQueue, ATSModifyJobQueue, 
ATSRemoveJobQueue) for information about defining, modifying and deleting 
ATS job queues from an OS/2 program.

Note:	You should create a job queue called Default which has no limitations on 
any of its attributes (i.e. let them all default). All of your tasks which do not 
require any special queuing attributes should be assigned to this queue.

To display the Job Queue Configuration Notebook:

  Select Edit from the main ATS menu.
  Select Job Queues from the Edit menu.
The keyboard short cut key is: Ctrl+Q.

6.1.	Maintaining Job Queues

The Select Page of the Job Queue Configuration notebook is used to select a 
job queue to modify it, create a new job queue, delete a job queue or copy the 
definition of an existing job queue to a new job queue.

 

Figure 25. Select Page of the Job Queue Configuration Notebook

6.1.1.	Adding a New Job Queue

To add a new job queue, click on the New button on the Select page of the 
Job Queue Configuration notebook. When you select this option, the Names 
& Settings page will be displayed.

Note:	If no job queues are currently defined, selecting the Job Queues option 
on the Edit menu of the main ATS window will cause this page to be by 
passed and the Names & Settings page will be brought up directly.

6.1.2.	Deleting an Existing Job Queue

  Select a job queue by clicking on it in the job queue Selection list box.
  Click on the Delete button.
  If the "Warn on Delete" option on the Preferences screen was selected, 
a message box will appear asking you to confirm the deletion.
  If "Warn on Delete" is off or if you answered yes to the deletion 
confirmation, the event will be removed from the ATS Job Queue list 
and the entry will be removed from the Job Queue Selection list box.

6.1.3.	Editing an Existing Job Queue

  Select a job queue by clicking on it in the Job Queue Selection list box.
  Select one of the other pages in the notebook to edit the job queue 
attributes.

6.1.4.	Copying an Existing Job Queue

ATS provides a facility for you to copy the definition of an existing job queue 
to a new job queue. Using this feature, you can use one job queue as the 
template for others.

  Select the job queue to be used as the template by clicking on it in the 
Job Queue Selection list box.
  Click on the Copy button.
  A new job queue will be created. The name of the new job queue will be 
the same as the original one with a '$' concatenated on the end. The 
Names & Settings page will be displayed.
  Select one of the other pages in the notebook to edit the job queues 
other attributes.

6.1.5.	Setting Attributes To Their Default Values

While Editing any page of the Job Queue Configuration Notebook, you can 
have ATS reset all of the attribute values on that page to their default value. 
To do this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Default

6.1.6.	Restore Attribute Values

While Editing any page of the Job Queue Configuration Notebook, you can 
have ATS reset all of the attribute values on that page to the value that they 
had before you made any changes (i.e. their last saved value). To do this:

  Click on the system menu icon in the upper left corner of the window.
  Click on Undo Changes

6.1.7.	Saving The Job Queue Information

After you have made any changes to any of the attributes values, you must 
save them in order for them to take effect. There are two ways to do this.

  Click on the system menu icon in the upper left corner of the window.
  Click on Save Changes

or

  Click on the Save button in the title bar.

6.2.	Names & Settings

The Names & Settings page of the Job Queue Configuration notebook is used 
to define the job queue name, description, the maximum number of 
concurrently running tasks, the OS/2 priority that is assigned to tasks running 
initiated from the job queue.


 

Figure 26. Names & Settings Page of the Job Queue Configuration Notebook

Job Queue Name

The name given to a particular job queue by the user. This name must be 
unique among all job queues defined to ATS. The Job Queue Name can be 
up to 12 characters long.

Job Queue Description

A text description of the job queue. It is not used by ATS. It is displayed on 
the job queue report and is used to describe the job queues purpose better 
than the 12 character name. The Job Queue Description can be up to 99 
characters long.

Maximum Concurrently Running Tasks

Defines the limit of how many concurrently active tasks can be initiated by 
the job queue. i.e. If this number is set to 1 and there is a task currently 
running from this job queue, ATS will not initiate another task from this job 
queue until the current one terminates. This does not apply to tasks defined 
with independent sessions since ATS does not know if the task is truly active.

If you set this value to 0 (zero), then ATS will never initiate a task from this 
job queue. This can be used as a way of archiving a job queue for a period of 
time without having to remove it from ATS and then rebuild it at a later date. 
This does apply to independent Job Queues.

To change the Maximum Concurrently Running Tasks, click on the up or the 
down arrow to the right of the field.

Priority Class

This is the name of the priority that tasks initiated by ATS from this job queue 
will run at.

To change the Priority Class, click on the up or the down arrow to the right of 
the field.

Priority Delta

The delta within the OS/2 priority that tasks initiated by ATS from this job 
queue will run at.

To change the Priority Delta, click on the up or the down arrow to the right of 
the field This number can be either positive or negative. Click on the button 
to the left of '+' to make this a positive number. Click on the button to the left 
of '-' to make this a negative number.

6.3.	Months

The Months page defines during what months the job queue is available.


 

Figure 27. Months Page of the Job Queue Configuration Notebook

Valid Months

Defines the months that you want the job queue to be available.

Click on the button to the left of the month's abbreviation to select or deselect 
the month. If the radio button to the left of the months abbreviation is 
selected, the job queue will be available in that month. If the month is not 
selected, the job queue is not available in that month.

If you fail to select any month, a warning message will be displayed informing 
you that the job queue will never be available.

6.4.	Dates & Times

The Dates & Times page defines during what date ranges and what hours of 
the day the job queue is available.


 

Figure 28. Dates & Times Page of the Job Queue Configuration Notebook

Dates and Times

Defines the hours during the day that you want the job queue to be available 
as well as the dates that you want the job queue to be available.

The start and end times can be from 00:00:00 to 23:59:59. The start time 
does not have to be earlier than the end time. If it is not, then the time range 
will be assumed to span midnight.

The start and end dates can be from 01/01/1993 to 12/31/2025. 

The start date must be before the end date or a warning message will be 
displayed.

The allowed date and time ranges are independent of each other.

To change the start or end date, click on the day, month, or year and then 
click on the up or the down arrow to the left of the year field.

To change the start or end time, click on the hour or minute and then click on 
the up or the down arrow to the left of the minute field.

6.5.	Day of Week

The Day of Week page defines which days of the week the job queue is 
available.


 

Figure 29. Day of Week Page of the Job Queue Configuration Notebook

Day of Week

Defines the days of the week that you want the job queue to be available. 
You can further define if the job queue should be available if the particular 
day of the week is a holiday, if it is not a holiday, or regardless of its holiday 
status.

You can change the setting for a particular day of the week two ways. The 
first method is to click with the right mouse button on one of the two small 
arrows below the ruler. This will cause the button that is on the ruler to move. 
The second method is to click on the button that is on the ruler and slide it up 
or down.

If you have set the slider to "Don't Run", then this job queue is not eligible to 
run on the associated day of the week.

If you have set the slider to "Run", then this job queue is eligible to run on the 
associated day of the week.

If you have set the slider to "Holiday", then if the associated day of the week 
falls on a defined holiday, the job queue is eligible to run.

If you have set the slider to "Non-Holiday", then if the associated day of the 
week falls on a day that is not defined as a holiday, the job queue is eligible 
to run.

If you set all of the days of the week to "Don't Run", a warning message will 
be displayed informing you that the job queue will never run.

The following chart summarizes when a job queue will be available based 
upon the setting of the slider.


Slider 
Setting
Current day of 
the week is a 
holiday
Current day of 
the week is not 
a holiday

Non-Holiday
Not Available
Available

Holiday
Available
Not Available

Run
Available
Available

Don't Run
Not Available
Not Available


6.6.	Day of Month

The Day of Month page defines which days of the month the job queue is 
available.


 

Figure 30. Day of Month Page of the Job Queue Configuration Notebook

Day of Month

Defines the months that you want the job queue to be available.

You can further define if the job queue should run if the particular day of the 
month is a holiday, if it is not a holiday, or regardless of its holiday status.

You can change the setting for a particular day of the month two ways. The 
first method is to click with the right mouse button on one of the two small 
arrows below the ruler. This will cause the button that is on the ruler to move. 
The second method is to click on the button that is on the ruler and slide it up 
or down.

If you have set the slider to "Don't Run", then this job queue is not available 
on the associated day of the month.

If you have set the slider to "Run", then this job queue is available on the 
associated day of the month.

If you have set the slider to "Holiday", then if the associated day of the month 
falls on a defined holiday, the job queue is available.

If you have set the slider to "Non-Holiday", then if the associated day of the 
month falls on a day that is not defined as a holiday, the job queue is 
available.

If you set all of the days of the month to "Don't Run", a warning message will 
be displayed informing you that the job queue will never be available.

The following chart summarizes when a job queue will be available based 
upon the setting of the slider.


Slider 
Setting
Current day of 
the month is a 
holiday
Current day of 
the month is not 
a holiday

Non-Holiday
Not Available
Available

Holiday
Available
Not Available

Run
Available
Available

Don't Run
Not Available
Not Available


6.7.	Special Days

The Special Days page defines which special days of the month the job queue 
is available.


 

Figure 31. Special Days Page of the Job Queue Configuration Notebook

Special Days

There are five special days of the month. They are 1) "L" the last day of the 
month, 2) "LB" the last business day of the month, 3) "FB" the first business 
day of the month, 4) "15B" the last business day of the month before the 
15th, and 5) "15A" the first business day of the month after the 15th. For 
these five special days, holidays are considered to be non-business days. 
Refer to Section 2.6 Business Days for further information on customizing 
valid business days.


The following chart summarizes when a job queue will be available based 
upon the setting of the slider.


Slider 
Setting

Current special 
day is a holiday

Current special 
day is not a 
holiday

Non-Holiday
Not Available
Available

Holiday
Available
Not Available

Run
Available
Available

Don't Run
Not Available
Not Available



7.	Job Queue Control

The Job Queue Control dialog allows you to block and un-block job queues as 
well as flush all selected tasks from a job queue.

	To display the Job Queue Controlscreen:

  Select Edit from the main ATS menu.
  Select Queue Controlfrom the Edit menu.
The keyboard short cut key is: Ctrl+L.

 

Figure 32. Job Queue Control Dialog Box

7.1.	Blocking or Un-Blocking a Job Queue

  Select the job queue from the Job Queues list box.
  Click on the Block/UnBlock button. If the queue is currently blocked, the 
button will be labeled UnBlock. If the queue is not currently blocked, 
the button will be labeled Block.
  Click on Cancel to dismiss the screen or repeat the above steps to block 
or unblock other job queues.

7.2.	Flushing Tasks from a Job Queue

  Select the job queue from the Job Queues list box.
  From the Queued Tasks list box, select the task or tasks that you want 
to remove from the queue. If you want to remove all of the queued tasks 
from a job queue, click on the Select All button.
  Click on the Delete button.
  Click on Cancel to dismiss the screen or repeat the above steps to flush 
other tasks.

8.	Manually Signaling and Resetting Events

When an event is flagged as having occurred, based upon the events attributes, 
it is flagged for all tasks that currently have that event defined as a dependency 
of it.

The ATS user interface provides a way for events, regardless of type, to be 
signaled (set) and reset. An event can be set or reset for all of the tasks that it is 
linked to or for a particular task. In addition, you can set or reset all of the events 
linked to a particular task.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual for more information on setting and Reseting events from the 
OS/2 command line. Refer to Section 3 Application Programming Interface in 
the ATS for OS/2 Version 3 Reference Manual for more information on setting 
and Reseting events from a user written program.

8.1.	Signaling One Event For All Tasks

To display the Signal Event screen:

  Select Signal Events from the main ATS menu.
  Select Signal Event from the Signal Events menu.
The keyboard short cut key is: Ctrl+S.

 

Figure 33. Signal Event Dialog Box

  Select the event from the Events list box.
  Click on the Signal button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event.

Double clicking on an entry in the Events list box is the same as doing the first 
two steps above.

8.2.	Resetting One Event For All Tasks

To display the Reset Event screen:

  Select Signal Events from the main ATS menu.
  Select Reset Event from the Signal Events menu.
The keyboard short cut key is: Ctrl+V.

 

Figure 34. Reset Event Dialog Box

  Select the event from the Events list box.
  Click on the Reset button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event.

Double clicking on an entry in the Events list box is the same as doing the first 
two steps above.

8.3.	Signaling All Events For One Task

To display the Signal Task screen:

  Select Signal Events from the main ATS menu.
  Select Signal Task from the Signal Events menu.
The keyboard short cut key is: Ctrl+G.

 

Figure 35. Signal Task Dialog Box

  Select the task from the Tasks list box.
  Click on the Signal button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event.

Double clicking on an entry in the Tasks list box is the same as doing the first 
two steps above.

8.4.	Resetting All Events For One Task

To display the Reset Task screen:

  Select Signal Events from the main ATS menu.
  Select Reset Task from the Signal Events menu.
The keyboard short cut key is: Ctrl+A.

 

Figure 36. Reset Task Dialog Box

  Select the task from the Tasks list box.
  Click on the Reset button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event.

Double clicking on an entry in the Tasks list box is the same as doing the first 
two steps above.

8.5.	Signaling One Event For One Task

To display the Signal Task/Event Link screen:

  Select Signal Events from the main ATS menu.
  Select Signal Event for Task from the Signal Events menu.
The keyboard short cut key is: Ctrl+I.

 

Figure 37. Signal Task/Event Link Dialog Box

  Select the event from the Events list box.
  Select the task from the Tasks list box.
  Click on the Signal button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event for a task.

8.6.	Resetting One Event For One Task

To display the Reset Task/Event Link screen:

  Select Signal Events from the main ATS menu.
  Select Reset Event for Task from the Signal Events menu.
The keyboard short cut key is: Ctrl+R.

 

Figure 38. Reset Task/Event Link Dialog Box

  Select the event from the Events list box.
  Select the task from the Tasks list box.
  Click on the Reset button.
  Click on Cancel to dismiss the screen or repeat the above steps to 
signal another event.
9.	Invoking Tasks

9.1.	Four Steps to Task Initiation

Internally, ATS uses a four step process to determine when to start each of the 
scheduled tasks. These steps are 1) examine the tasks, 2) add the eligible 
tasks to the job queues, 3) examine the job queues and 4) start the tasks.

9.1.1.	Step 1 - Examining the Tasks

ATS uses the user configurable timers to determine when to check to see if 
any scheduled tasks can be queued.

When the Clock Check Interval Timer elapses, ATS scans all of the 
scheduled tasks to see if any should be queued and then waits for the timer 
to elapse again.

In order for ATS to determine if a task should be queued, it will check if:

  the maximum concurrent occurrences has been reached
  the current date is within the specified date range
  the current time is within the specified time range
  all dependencies are satisfied
  the task can be run on the current day of the week
  the task can be run on the current day of the month
  the task can be run in the current month

9.1.2.	Step 2 - Queuing the Tasks

Once ATS determines that a task is eligible to be added to its assigned job 
queue, ATS will then determine if the job queue is able to accept tasks.

ATS will add the task to the assigned job queue if the job queue is open and 
not blocked or if the job queue is closed or blocked and the Blocked Or Busy 
Job Queue option is set to Add To Job Queue. Refer to Section 2.4 
Preferences II for further information on the Blocked Or Closed Job Queue 
option.

If the job queue is closed or blocked and the Blocked Or Closed Job Queue 
option is set to Ignore/No Reset, ATS will not add the task to its assigned job 
queue and will leave the state of its event dependencies untouched. If the job 
queue is closed or blocked and the Blocked Or Closed Job Queue option is 
set to Ignore/Reset, ATS will not add the task to its assigned job queue and 
will reset all of its event dependencies. 

9.1.3.	Step 3 - Examining The Job Queues

After ATS examines all of the tasks and queues those that are eligible, it will 
look at all of the job queues to see which tasks can be initiated. In order for 
ATS to determine if a task can be released from a queue, it will check if:

  the job queue is open
  the job queue is not blocked
  the maximum number of concurrently running tasks has not been 
reached

9.1.4.	Step 4 - Starting the Tasks

If all of the qualifications have been met, ATS will initiate all of the tasks in 
the job queue until the maximum number of concurrently running tasks has 
been reached. ATS will release the tasks from the job queues in the following 
order:

  Highest priority within the queue. Refer to Section 5.2 Names & 
Settings for further information on setting the priority within the job 
queue for a task.
  Earliest entry date and time. When a task is added to a job queue, the 
date and time is recorded in the job queue entry.

After invoking a task, ATS will reset all dependent events for the started task. 
If an event is a dependency of more than one task, the event is reset only for 
the invoked task. The flag indicating that an event has occurred is maintained 
at a task level.

9.2.	Dates and Times

9.2.1.	For Tasks

The date range and time range are independent of each other. They define the 
date range and time of day that ATS can add the task to the assigned job 
queue the task.

For example, if you set the start date to 04/27/1993 and the end date to 
11/14/1993 then even if all of the other criteria for initiating the task are 
satisfied, ATS will not start the task if the current system date is not within the 
specified date range. Likewise, if you set the start time to 10:00:00 and the end 
time to 11:00:00, then ATS will only start the task if the current system time is 
between 10:00:00 and 11:00:00.

9.2.2.	For Job Queues

The date range and time range are independent of each other. They define the 
date range and time of day that the job queues are open.

For example, if you set the start date to 04/27/1993 and the end date to 
11/14/1993 then even if all of the other criteria for initiating the task are 
satisfied, ATS will not release any tasks from the job queue if the current 
system date is not within the specified date range. Likewise, if you set the start 
time to 10:00:00 and the end time to 11:00:00, then ATS will only release tasks 
from the job queue if the current system time is between 10:00:00 and 
11:00:00.





This page intentionally left blank.
10.	Logging

10.1.	Log File

To display the Log File screen:

  Select File from the main ATS menu.
  Select Log File from the File menu.
The keyboard short cut key is: Alt+F.

 

Figure 39. Open Log File Dialog Box

10.1.1.	Specifying a New Log File

To open a new ATS log file, enter the new log file name in the Open filename 
field or use the Drive, Directory, and File list boxes to select one.

10.1.2.	Log File Initialization

If the selected log file already exists, ATS will prompt you to specify if it 
should truncate the data in the new file or append new data to it.

ATS will write one entry to the old log file indicating that it is being closed 
and another indicating the name of the new log file.

When ATS opens the new log file, it will write one entry to the new log file 
indicating that it has just been opened and another one indicating the name 
of the one that was just closed.

10.2.	Log Comment

You can insert a comment into the log at any point. Log comments go into the 
log with the standard log entry prefix of date and time.

	To display the Add Log Comment screen:

  Select File from the main ATS menu.
  Select Log Comment from the File menu.
The keyboard short cut key is: Alt+C.

 

Figure 40. Log Comment Dialog Box

10.2.1.	Inserting Comments Into the Log File

  Enter any text that you wish into the entry field. You can enter a 
maximum of 116 characters per log entry.
  If you wish to add more than one comment, click on the Add button.
  If you wish to add the current comment and dismiss the dialog box click 
on the Add/Quit button.
  If you do not wish to add the current comment and want to dismiss the 
dialog box click on the Cancel button.
Note:	The comments that you add to the log using this facility will all be 
prefaced with a '* ' (single asterisk and space). This will be a visual 
indicator of the source of the log entry when reading the log at a later 
time.

Refer to Section 2 Command Line Interface in the ATS for OS/2 Version 3 
Reference Manual (ATSTOLOG) for information about adding comments to 
the ATS log from an OS/2 command line. Refer to Section 3 Application 
Programming Interface in the ATS for OS/2 Version 3 Reference Manual 
(ATSAddToLog) for information about adding comments to the ATS log from 
an OS/2 program.





This page intentionally left blank.
11.	ATS Console Display
The ATS Console Display is your window into the heart of ATS. The three 
display windows, Log, Status and Running Tasks show you exactly what is 
happening within ATS.

When you re-size the ATS application, all of the visible ATS Console Display 
windows will be resized proportionally.
11.1.	Log Display Window

The ATS Log window displays all of the messages that have been written to 
the ATS log during the current ATS session. When the on-line log fills up, the 
log is refreshed by clearing out all of the entries and starting over.

Note:	This does not effect the physical log file that is written to disk.

To toggle the Log display window on or off:

  Select Console from the main ATS menu.
  Select Log from the Console menu
The keyboard short cut key is: Alt+L

11.1.1.	Camera Push Button on the Title Bar

The push button on the title bar with a picture of a camera is for taking a 
"snap shot" of the ATS on line log. The information in the on line log will be 
written to a specified file. Refer to Section 2.7 Snapshot for more information 
on selecting the snapshot output file as well as the disposition (append or 
replace) of the selected file.

11.1.2.	Eraser Push Button on the Title Bar

The push button on the title bar with a picture of an arm and an eraser is for 
"erasing" the information in the on line log. Pushing this button will cause the 
Log Display Window to be cleared.

11.2.	Status Display Window

The ATS Status window displays the current state of ATS. It provides you with 
all of the current ATS statistics.

The status window displays the:

  date and time the current ATS session was started
  date and time of the latest clock check
  date and time of the latest file check
  current clock check interval setting
  current file check interval setting
  current independent session display interval setting
  current on-line log size setting
  name of the current log file
  number of defined holidays
  date, name and day of week of each defined holiday
  number of defined events
  name and type of each defined event and optionally the task name or 
file name associated with it
  number of defined job queues
  name and status of each job queue
  number of defined tasks
  name and program name of each task
  number of dependencies for each task
  name of each dependency for each task and whether it has occurred 
(SET) or not (RESET)

To toggle the Status display window on or off:

 Select Console from the main ATS menu.
 Select Status from the Console menu

The keyboard short cut key is: Alt+S

11.2.1.	Camera Push Button on the Title Bar

The push button on the title bar with a picture of a camera is for taking a 
"snap shot" of the ATS Status Display Window. The information in the Status 
Display Window will be written to a specified file. Refer to Section 2.7 
Snapshot for more information on selecting the snapshot output file as well 
as the disposition (append or replace) of the selected file.

11.3.	Running Tasks Display Window

The ATS Running Tasks window displays a list of all of the currently executing 
child tasks and all of the independent sessions (until they are removed by an 
aging process) that were started by ATS during the current ATS session.

The following information is displayed for each invoked task:

  Task Name
  Assigned Job Queue
  Start Date and Time
  Process ID (000 for Independent Sessions)
  Program Name

Tasks invoked as child sessions will be removed from the Running Tasks 
display window when they terminate. Tasks invoked as independent sessions 
will remain in the display for the amount of time specified in the Independent 
Session Display Interval setting on the Timers page of the System 
Configuration notebook.

To toggle the Running Tasks display window on or off:

  Select Console from the main ATS menu.
  Select Running Tasks from the Console menu

The keyboard short cut key is: Alt+R

11.4.	Tiling the Display Windows

When you select the Tiling option on the Console menu, ATS will divide the 
vertical space in the ATS screen evenly and stack each of the visible windows 
one on top of the other with each window being the full width of the ATS 
window.

The order of stacking is constant. The ATS Log window, if visible, is always on 
the top. The ATS Running Tasks window, if visible, is always on the bottom. 
The ATS Status window, if visible, is on the top if the ATS Log window is not 
visible, on the bottom if the ATS Running Tasks window is not visible, and in 
the middle if all three windows are visible.

To tile the display windows:

  Select Console from the main ATS menu.
  Select Tile from the Console menu.

The keyboard short cut key is: Alt+T

11.5.	Setting the Font for the Console Display Windows

Using the ATS Set Console Window Font Selection dialog box, you can use 
any of the fonts available under OS/2 in the ATS Console Display windows.

To change the console font:

  Select Console from the main ATS menu.
  Select Set Console Font from the Console menu.

The keyboard short cut key is: Ctrl+F

 

Figure 41 Set Console Font Dialog Box

12.	Reports
ATS for OS/2 provides the ability to produce hard copy documentation of all 
holidays, events, tasks and job queues that are defined to the system. The 
reports are generated in the background and can be directed to any file.

The generated files are ASCII text that are 80 columns wide and have 58 lines 
per page. These files can be printed by using the OS/2 PRINT command.

As soon as the files are generated, the reports will be displayed using the 
OS/2 system editor (E.EXE).

12.1.	Defined Holidays

The Defined Holidays report provides a list of all of the holidays that have been 
defined to ATS. The report looks very similar to the holiday list on the Define 
Holidays screen.

To produce the Defined Holidays report:

  Select Reports from the main ATS menu.
  Select Holidays from the Reports menu.
  Select the file that you want the report written to.
  Click on the OK button.
The keyboard short cut key is: Alt+H.

12.2.	Defined Events

The Defined Events report provides a list of all of the events that have been 
defined to ATS. The report provides all of the detail that can be specified for 
each type of event. 

For each event, the report provides the event name and description, the event 
type, the reset on run setting and all of the events other attributes (event type 
specific).

To produce the Defined Events report:

  Select Reports from the main ATS menu.
  Select Events from the Reports menu.
  Select the file that you want the report written to.
  Click on the OK button.
The keyboard short cut key is: Alt+E.

12.3.	Defined Tasks

The Defined Tasks report provides a list of all of the tasks that have been 
defined to ATS. The report provides all of the detail that can be specified for 
each task.

For each defined tasks, the report provides the task name and description, the 
assigned job queue and queue priority, the type of OS/2 session that the 
program runs in, the date and time ranges during which the task is eligible to 
be initiated, the maximum number of concurrent occurrences that can be 
started by ATS, the full path to and program name of the task, the input 
parameters for the task, the working directory, for each day of the week and 
each day of the month, whether the program should not be run, run only if it 
falls on a holiday, run if it does not fall on a holiday or run regardless of if it is a 
holiday, and, for special days of the month, whether the program should be run 
or not be run.

			D	Don't Run
			R	Run (regardless of holiday status)
			H	Run only if it falls on a holiday
			N	Run if it does not fall on a holiday

To produce the Defined Tasks screen:

  Select Reports from the main ATS menu.
  Select Tasks from the Reports menu.
  Select the file that you want the report written to.
  Click on the OK button.
The keyboard short cut key is: Alt+K.

12.4.	Defined Job Queues

The Defined Job Queues report provides a list of all of the job queues that 
have been defined to ATS. The report provides all of the detail that can be 
specified for each job queue.

For each defined job queue, the report provides the job queue name and 
description, the OS/2 priority that the tasks assigned to it will run at, the date 
and time ranges during which the job queue is open, the maximum number of 
concurrent tasks that can be running under it, for each day of the week and 
each day of the month, whether the program should not be run, run only if it 
falls on a holiday, run if it does not fall on a holiday or run regardless of if it is a 
holiday, and, for special days of the month, whether the program should be run 
or not be run.

			D	Don't Run
			R	Run (regardless of holiday status)
			H	Run only if it falls on a holiday
			N	Run if it does not fall on a holiday

To produce the Defined Tasks screen:

  Select Reports from the main ATS menu.
  Select Job Queues from the Reports menu.
  Select the file that you want the report written to.
  Click on the OK button.
The keyboard short cut key is: Alt+Q.





This page intentionally left blank.
Appendices




This page intentionally left blank.
A.	Glossary
Dependency	A dependency is a link between an event and a task. An event 
can be a dependency for one or more tasks. A task can be 
dependent upon one or more events. Actually, an event can be 
defined and not be a dependency of any task and a task can be 
defined without having being dependent upon any event. For 
further information, refer to Section 5.10 Dependencies.

Event	An event is something that happens. This can be either a file 
being modified (File Modification), a file missing (File Missing), 
the completion of a task that was scheduled through and 
initiated by ATS (Task Completion), a periodic interval 
(Periodic) or notification that something has occurred (Signal 
Event). ATS events are signaled (set) when their attribute 
criteria have been met. Aside from ATS setting events based 
upon their attributes, events can be set and reset manually 
three ways. These are: from a provided API that has been 
embedded in an application program, running the supplied 
program ATS_SGNL.EXE or ATS_RSET.EXE, or from the 
SIGNAL EVENTS menu. For further information, refer to 
Section 4 Events.

Holiday	Any day of the year can be defined as a holiday. By defining 
certain days as holidays, you are then able to schedule a task 
to execute on a particular day if it is a holiday or if it is not a 
holiday. For further information, refer to Section 3 Holidays.

Job Queue	A Job Queue is a buffer that further controls how and when 
ATS should run a scheduled task. Job queues allow you to set 
the scheduled tasks priority (when running) within the operating 
system. It also allows you to control the number of tasks that 
ATS will start at any given point. When a task is eligible to be 
run, ATS adds the task to the appropriate job queue. The job 
queue then decides if the task can be started or if it must wait. 
For further information, refer to Section 6. Job Queues.

Task	A Task is a program that you wish to schedule to be 
automatically started by ATS. The program can be an OS/2 full 
screen application, an OS/2 windowed application, an OS/2 PM 
application, a DOS windowed application, a DOS full screen 
application or a Windows application. A task can be scheduled 
to run at a certain time of day, on certain days of the week, on 
certain days of the month, on holidays, or not on holidays. In 
addition, a task can optionally have an unlimited, number of 
dependencies. For further information, refer to Section 5 Tasks.
B.	Shortcut Keys

Alt+A	Display the About screen
Alt+C	Display the Add Log Comment screen
Alt+E	Create the Events Report
Alt+F	Display the Log File screen
Alt+H	Create the Holidays Report
Alt+K	Create the Tasks Report
Alt+L	Toggle the Log display on or off
Alt+Q	Create the Job Queues Report
Alt+R	Toggle the Running Tasks display window on or off
Alt+S	Toggle the Status display window on or off
Alt+T	Tile the visible display windows
Ctrl+A	Display the Reset Event screen
Ctrl+C	Display the System Configuration screen
Ctrl+E	Display the Define Events screen
Ctrl+F	Display the Set Console Font
Ctrl+G	Display the Signal Task screen
Ctrl+H	Display the Define Holidays screen
Ctrl+I	Display the Signal Event for Task screen
Ctrl+L	Display the Queue Control screen
Ctrl+Q	Display the Define Job Queues screen
Ctrl+R	Display the Reset Event for Task screen
Ctrl+S	Display the Signal Event screen
Ctrl+T	Display the Define Tasks screen
Ctrl+V	Display the Reset Event screen
F3	Shut down ATS
ESC	Cancel the currently active menu

Lower and Upper case letters work alike.




This page intentionally left blank.
C.	Supplied Files

ATS.EXE
ATS.DLL
ATS.HLP
ATS.IPF

ATSMIG.EXE
ATSREORG.EXE
ATSSTOP.EXE
ATSTOLOG.EXE
ATS_BLKQ.EXE
ATS_EVNT.EXE
ATS_FLSH.EXE
ATS_HLDY.EXE
ATS_IDBD.EXE
ATS_JOBQ.EXE
ATS_LINK.EXE
ATS_RSET.EXE
ATS_SGNL.EXE
ATS_TASK.EXE
ATS_TCNT.EXE

ATSDLL.LIB
ATSDLL.H




This page intentionally left blank.
D.	Migrating The ATS Version 2.0 Data File For Use With 
Version 3
The file that ATS uses to hold all of the scheduling information is called 
ATS.DAT. This file is in a proprietary format which is a combination of text and 
binary information. ATS understands the layout of this file and can quickly 
read, write and update it.

The format of the file has been changed from ATS Version 2 to ATS Version 
3.

To insure that you do not lose any scheduling data and to save you the time 
required to reenter the data, ATS Version 3 comes with an utility program 
called ATSMIG.EXE. This program will read in the ATS Version 2 data file and 
produce a file that ATS Version 3 can use.

There are no input parameters to ATSMIG.EXE. When started, it will look for a 
file called ATS.DAT. It will create two files. The first file is called ATSMIG.LOG. 
This is a file containing all of the steps that ATSMIG.EXE took to create the new 
data file. The second file it will create is called ATS.D3T. This is the new ATS 
Version 3 data file. Before using this file, you must rename it to be called 
ATS.DAT. If ATSMIG.EXE finds a file called ATS.D3T in the directory it is run 
from, it will fail and a message in the log will indicate that it could not create the 
data file.

Although this might seem like extra work for you, it only will need to be done 
once per installation and is an extra precaution to insure that you do not lose 
any schedule information.

To summarize, the steps required to migrate the ATS Version 2 data file to be 
compatible with ATS Version 3 are:

Install ATS on your hard drive.
Copy the ATS.DAT version 2 file into the directory that ATS Version 3 is 
installed.
Run ATSMIG.EXE
Examine the log file ATSMIG.LOG to make sure there are no errors.
Rename ATS.DAT to any thing else. If you have a backup of the file, you 
can delete it.
Rename ATS.D3T to ATS.DAT and your ready to go.




This page intentionally left blank.
E.	Reclaiming Unused Space In The ATS Version 3.0 Data 
File
When ATS adds new schedule information to the its data, it adds it at the end. 
This is done for performance reasons. The down side of this is that when 
schedule information is deleted, unused space is left in the middle of the file. 
Modifying schedule information does not cause a problem since the data is 
updated in place.

If you do a lot of dynamic scheduling or if during the course of creating your 
'perfect' schedule you add and remove a lot of items, you should use the 
ATSREORG.EXE utility program to free the unused space.

There are no input parameters to ATSREORG.EXE. When started, it will look for 
a file called ATS.DAT. It will create a file called ATS.DA2. This is the new ATS 
Version 3 data file. Before using this file, you must rename it to be called 
ATS.DAT. While processing the ATS.DAT file, ATSREORG.EXE will scroll 
information on the screen. At the end of the information is a summary of the 
number of items of each type that it found as well as the number of free items it 
removed and the amount of space it saved. If ATSREORG.EXE finds a file 
called ATS.DA2 in the directory it is run from, it will fail and a message indicating 
the problem will be displayed on the screen.

Although this might seem like extra work for you, it is an extra precaution to 
insure that you do not lose any schedule information.




This page intentionally left blank.
F. Creative Scheduling with ATS for OS/2 Version 3
With the addition of the external interface and API support, ATS has become 
an even more powerful scheduling tool. By taking advantage of the external 
interfaces, you can become very creative when scheduling your tasks. The 
schedule that you build can become a self modifying schedule merely by 
scheduling tasks that run the ATS external interface executables. Here are 
three examples.
Alternating Open Job Queues

Suppose you would like to have two job queues that will not release tasks at 
the same time, but rather during alternating hours, and only between 09:00 (9 
AM) and 17:00 (5 PM), and only Monday through Friday. One queue would 
submit tasks from 9:00 to 9:59, 11:00 to 11:59, 13:00 to 13:59 and 15:00 to 
15:59. The other queue would submit tasks  from 10:00 to 10:59, 12:00 to 
12:59, 14:00 to 14:59 and 16:00 to 16:59. Here is how you would do it.

You would need to create two job queues (obviously), two tasks, two periodic 
events and two OS/2 command procedures. Here are their attributes. 

Queue 1	Let all attributes default except: Start Time, End 
Time and Days of the Week. On the Dates & 
Times page of the Job Queue Configuration 
notebook, set the Start Time to 09:00 and the End 
Time to 17:00. On the Days of the Week page of 
the Job Queue Configuration notebook, set 
Saturday and Sunday to Don't Run.

Queue 2	Let all attributes default except: Start Time, End 
Time and Days of the Week. On the Dates & 
Times page of the Job Queue Configuration 
notebook, set the Start Time to 09:00 and the End 
Time to 17:00. On the Days of the Week page of 
the Job Queue Configuration notebook, set 
Saturday and Sunday to Don't Run.

Event 1	Set the type to Periodic. Let the Base Date and 
Time default. Set the Interval to 2 Hours.

Event 2	Set the type to Periodic. Let the Base Date 
default. Set the 	Base Time to 01:00:00. Set 
the Interval to 2 Hours.

Command Proc 1	Will contain two lines:
	
	ats_blkq B Queue1
	ats_blkq U Queue2

Command Proc 2	Will contain two lines:
	
	ats_blkq B Queue2
	ats_blkq U Queue1

Task 1	Let all of the attributes default. Set the program 
name to the name that you gave command proc 1. 
Make it dependent upon Event 1. It can not be 
assigned to either of the job queues created for 
this example.

Note:	You should create a job queue called Default which has no limitations on 
any of its attributes (i.e. let them all default). All of your tasks which do 
not require any special queuing attributes should be assigned to this 
queue.

Task 2	Let all of the attributes default. Set the program 
name to the name that you gave command proc 2. 
Make it dependent upon Event 2. It can not be 
assigned to either of the job queues created for 
this example.

Here is what is going to happen:

Every two hours, starting at midnight (and thus occurring on the even hours), 
Event 1 will be signaled. This will cause Task 1 to be initiated and Command 
Proc 1 run. When it runs, Queue 1 will be blocked and Queue 2 will be un-
blocked. Also every two hours, but on the odd hours(since it starts at 01:00), 
Event 2 will be signaled. This will cause Task 2 to be initiated and Command 
Proc 2 run. When it runs, Queue 2 will be blocked and Queue 1 will be un-
blocked.

Modifying A Scheduled Tasks Program Parameters

When scheduling a task, it is possible that the program that will be initiated will 
need parameters that are dynamic. One way to handle this problem is to write 
a REXX program or OS/2 Command Procedure that can somehow acquire the 
required parameter information and then use the ATS_TASK.EXE program to 
modify the scheduled task. 

You would need to create two tasks and one job termination event.

Task 1	Set the program name to the REXX program that 
will obtain the required parameters. Set the 
dependencies to be the ones that the original task 
would have been dependent upon. Set any of the 
other attributes to the value that the original task 
would have had.

Note: The REXX program, aside from obtaining the parameters, must also run 
the ATS_TASK.EXE program to modify the schedule task.

Event 1	Set the type to Job Termination. Set the task that 
it is dependent upon to be Task 1.

Task 2	Let all of the attributes default. Set the program 
name to the name of the original program to be 
executed. Make it dependent upon Event 1.

Here is what is going to happen:

When the original task would have been initiated, based upon all of its 
attributes, Task 1 will now be initiated. Task 1 will run the REXX program that 
will obtain the correct parameters (form a file, database...) and then run 
ATS_TASK to modify Task 2, Task 1 will then terminate which will signal Event 
1. This, in turn, will cause Task 2 (the original task) to be initiated.

Note: If you write the program in another language (aside from REXX or OS/2 
Command Procedure), you would then use the API interface to ATS 
instead of the CLI interface.

Scheduling Two Tasks To Never Run At The Same Time

There are times when you need to schedule two programs that do not 
necessarily have dependencies upon each other but, because of other needs, 
must not run at the same time. This could happen if the two programs require 
exclusive access to a certain resource.

For this example, it is assumend that the program that you need to run is a 
compiled executable.

In order to accomplish this, you would need to create two tasks, two signal 
events and two OS/2 command procedures. Here are their attributes. 

Event 1	Set the type to Signal.

Event 2	Set the type to Signal.

Command Proc 1	Will contain three lines:
	
	ats_rset E EVENT2
	call YourTask1
	ats_sgnl E EVENT2

Command Proc 2	Will contain two lines:
	
	ats_rset E EVENT1
	call YourTask2
	ats_sgnl E EVENT1

Task 1	Set the attributes of the task to meet your needs. 
Make it dependent upon Event 2. Add any other 
dependencies as required.

Task 2	Set the attributes of the task to meet your needs. 
Make it dependent upon Event 1. Add any other 
dependencies as required.

After creating the tasks and events, signal both of the events so that  both of 
the tasks can run.

Here is what is going to happen:

When all of the date and time criteria and other dependencies are met for 
either Task 1 or Task 2, that task will be run. As soon as the task is started, it 
will reset the signal event that the other task is dependent upon, thus 
preventing the other task from being started. Just before the task completes, it 
will signal the event that the other task is dependent upon, thus allowing it to 
run (when all of its other dependencies and date and time criteria have been 
met).

There is one catch here. If there is a chance that both tasks could meet all of 
thier date and time criteria and all of thier other dependencies at the same 
time, they could both be added to thier assigned job queue before the other 
runs. If this happens, both jobs could run at the same time. To prevent this, 
create a seperate job queue just for them and set the maximum concurrently 
running tasks limit to one. This way, even if both jobs do get queued at the 
same time, the queue would insure that they run serially.
G. ATS Version 3.0 New/Enhanced features

* Ability to change the font in the console windows.
* Ability to save the size and positions of the console windows within the ATS 
window.
* Log Comments added through the dialog box will have a single asterisk 
preceding them in the log to indicate their source.
* Date field on the define holidays screen accepts "0000" for the year. This 
indicates a recurring holiday and does not have to be re-entered each year.
* Date field on the define holidays screen accepts the PLUS and MINUS 
keys to increment and decrement the displayed date by one day, 
respectively.
* For each event, you can indicate whether or not the event should be reset 
for the dependent task when the task is run.
* For File Modification events: 
* Control over what type of changes have to be made to a file to determine if 
the file has been changed, for ATS purposes, or not. Options include: Date, 
Time, Size, Read Only attribute, Hidden attribute, System attribute and 
Archived attribute.
* Control over file availability requirements when determining if ATS should 
check to see if a file has been modified. Availability options include: Read, 
Write, Both or None.
* New event type: Periodic. This event will automatically signal itself every n 
number of seconds, minutes, hours, days or weeks. You can define the time 
the event should occur the first time and after that, it will be signaled on a 
regular basis.
* New event type: File Missing. If the defined file is missing, this event will 
signal itself.
* Tasks: The task definitions screen has been changed to a notebook 
control. Separate pages include: Select, Names & Settings, Months, Dates 
& Times, Day of Week, Day of Month, Special Days, Session Type, 
Program Details and Dependencies.
* You can specify the name of the Job Queue that a task should be run in. In 
addition, you can specify the priority within the queue that the task has in 
relation to other jobs that are in that queue. See the section on Job 
Queues.
* You can indicate that a particular task is to be removed from the scheduler 
once the task is initiated by ATS.
* New task definitions can be copied from existing ones. The new ones are 
exact copies of the existing one with the addition of a '$' character to the 
name. All characteristics, including dependencies are copied.
* The Earliest and Latest Time that tasks can be allowed to run in has been 
enhanced to add seconds. This eliminates the problems with short running 
jobs.
* The slider for the 'Last Business Day of the Month' under Special Days has 
been enhanced to allow for the selection of Holiday and Non-Holiday.
* Windows and DOS tasks can be directly started by ATS. You no longer 
need to create and schedule a REXX program to start a Windows or DOS 
program.
* You can specify 'Default' as the session type to start any defined task.
* The available Replacement Variables for the task parameters can be 
selected and inserted directly from a list box on the same screen where you 
define the tasks program details.
* For each defined dependency, you indicate whether or not you want the 
event reset for that task when the task is run.
* The concepts of Job Queues has been introduced into ATS. You can now 
assign your tasks into different job queues to get better control over how 
and when each task will be run. The number of job queues that can be 
defined is limited only by DASD space (as is true for holidays, events and 
tasks).
* For each job queue, you define how many scheduled tasks can be active in 
that queue at once. The range is 0 - 99. This allows you to 'throttle' the 
amount of jobs concurrently running even if all of their dependencies have 
been met. You can create a job queue that only allows one or two 
concurrent active tasks and assign all of your resource intensive tasks to it 
and then define another queue with 99 maximum active tasks and assign all 
other tasks to it. 
* For each job queue, you define at what OS/2 Priority level the tasks that are 
in it should be run at.
* assuming the maximum number of queued tasks has been hit, queued 
tasks will be released based upon their priority within the queue (defined in 
the task definitions notebook) and then date/time that they were added to 
the queue.
* As with tasks, you can create a new job queue by copying an existing one.
* Job queues can be scheduled to be opened or closed with the same 
flexibility as scheduling tasks. If a job queue is closed or blocked (see 
below), eligible tasks will be added or not based upon the users 
preferences (see below).
* Job queues can be blocked. That is, even if the job queue is scheduled to 
be opened, no tasks, defined to a blocked queue, will be initiated.
* Queued tasks can be deleted from the queue.
* The two System Configuration dialogs have been moved into a notebook 
control. In addition, four new pages have been added. The notebook pages 
are: Timers, Preferences I, Preferences II, Restart, Business Days and 
Snapshot.
* A new ATS timer has been added. This timer determines how long an 
Independent Session started by ATS will stay in the Running Tasks 
Console Window.
* The Preferences I screen has options to suppress the Watchdog warning, 
suppress on-line logging and suppress all logging.
* If a job queue is busy or closed, the Preferences II screen allows you to set 
the action taken upon a task that has become eligible to be added to the 
queue. Options are: Ignore and don't reset the dependencies, Ignore and 
reset the dependencies or add the job to the queue.
* Restart options indicate what information should be saved between ATS 
sessions. These include: the size and position of the ATS application 
window, the state, size and position of the ATS console windows, whether 
or not to restart interrupted tasks, whether or not to re-queue queued tasks. 
There are two others, but they might not make it into the release.
* You can define what days of the week are valid business days for your 
company.
* For the Log and Status Snapshots, you indicate the destination file and 
whether to replace or append the new information to the file.
* Reports have been enhanced and a job queue report has been added.
* You can set the fonts used in the console windows.
* You can clear the on-line log console window.
* Enhanced control over manually signaling and resetting events from the 
ATS user interface.
* An event can be signaled for all dependent tasks.
* An event can be signaled for a particular task.
* All events for a task can be signaled.
* An event can be reset for all dependent tasks.
* An event can be reset for a particular task.
* All events for a task can be reset.
* Enhanced API set. The ATS API set has been enhanced to allow the user 
to control all aspects of ATS scheduling. In addition, setting and resetting of 
events, blocking and unblocking job queues, adding text entries to the ATS 
log, and querying the number of ATS initiated currently active tasks can all 
be performed from an API. Along with, and as a companion to, the APIA's 
we provide an OS/2executable program to perform all of these functions.




This page intentionally left blank.
H. Watchdog

Watchdog is a separate product that allows another program to register with it 
and if the registered product ends without canceling its registration, Watchdog 
will automatically restart that program.

Since ATS has been designed to be used in mission critical and lights out 
applications, it has been developed to interface with Watchdog. When ATS is 
started, it registers with Watchdog. When ATS is shut down by a user, it 
cancels its registration. If Watchdog is not active when ATS is invoked, ATS will 
issue a warning to the user that says "Watchdog is not active". It will also log this 
fact.

Watchdog is a product of MHR Software And Consulting. Further 
information can be obtained by mail at 2227 U.S. Highway #1 - Suite 146, 
North Brunswick, NJ 08902, by telephone at (908) 821-0359 or by fax at (908) 
821-0350).





This page intentionally left blank.
I. Problem Reporting

If you encounter a problem within ATS that you feel is a bug or ATS is not 
functioning as described in this manual, perform the following steps to report it.

1	Write down any error messages that ATS provides.
2	Make a backup copy of the file ATS.INI. This file is located in the 
directory that ATS is started from.
3	Make a backup copy of the file ATS.DAT. This file is located in the 
directory that ATS is started from.
4	Make a backup copy of the current ATS log file. The default log file is 
ATS.LOG and is located in the directory that ATS is started from.
5	Print out each of the reports that ATS provides, Holidays, Job Queues, 
Events, and Tasks.
6	Review each of the reports along with the log to insure that the problem 
is not an error in scheduling.
7	If the situation occurred while creating a holiday, event task or job 
queue, write down the exact steps that you took leading up to the 
problem.
8	Try to recreate the problem.
9	Contact MHR Software And Consulting either by phone at (908) 821-
0359, by fax at (908) 821-0350 or on CompuServe at 70312,627.
Note:	If you report a problem, please be prepared to provide all of the 
information and results gathered in the above steps.




This page intentionally left blank.


















 
Software And Consulting


ATS for OS/2	Version 3
 

Getting Started	
 


 
Page iv


 
	Page iii











