home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / ATS2DE.ZIP / USERGUID.TXT < prev   
Text File  |  1993-09-28  |  64KB  |  1,521 lines

  1. ATS FOR OS/2
  2.  
  3. Version 2
  4.  
  5. Users Guide
  6.  
  7. MHR Software And Consulting can be reached
  8. by phone at    (908) 821-0359 or 
  9. by mail at     2227 U.S. Highway # 1
  10.                 Suite 146
  11.                 North Brunswick, New Jersey 08902
  12.  
  13. ATS for OS/2 is a valuable trade secret of MHR Software And Consulting and is not to be used or 
  14. disseminated in any manner, or by any means whatsoever, without the express written consent of 
  15. MHR Software And Consulting.
  16.  
  17. OS/2 is a registered trademark of the International Business Machines Corporation
  18. Copyright * 1993, MHR Software And Consulting. All Rights Reserved.
  19.  
  20. Table Of Contents
  21. 1.    Introduction    1
  22. 2.    System Configuration    5
  23. 2.1.    Preferences    5
  24. 2.2.    Timers    7
  25. 3. Holidays    11
  26. 3.1.    Adding a New Holiday    11
  27. 3.2.    Deleting an Existing Holiday    12
  28. 3.3.    Editing an Existing Holiday    12
  29. 4.    Events    15
  30. 4.1.    Types of Events    15
  31. 4.2.    Event Characteristics    17
  32. 4.3.    Adding a New Event    18
  33. 4.4.    Deleting an Existing Event    18
  34. 4.5.    Editing an Existing Event    19
  35. 5.    Tasks    21
  36. 5.1.    Task Selection    21
  37. 5.2.    Task Characteristics    23
  38. 6.    Dependencies    31
  39. 6.1.    Adding a New Dependency    31
  40. 6.2.    Remove an Existing Dependency    32
  41. 6.3.    Define Event    32
  42. 7.    Signal Event    33
  43. 7.1.    Signaling an Event    33
  44. 8.    Invoking Tasks    35
  45. 8.1.    Overview    35
  46. 8.2.    Dates and Times    35
  47. 8.3.    Short Running Tasks with No Dependencies    36
  48. 9.    Logging    39
  49. 9.1.    Log File    39
  50. 9.2.    Log Comment    40
  51. 10.    Display Windows    43
  52. 10.1.    ATS Log    43
  53. 10.2.    ATS Status    43
  54. 10.3.    ATS Running Tasks    44
  55. 10.4.    Tiling    45
  56. 11.    Signaling Events from Outside of ATS    47
  57. 11.1.    ATSSGNL.EXE    47
  58. 11.2.    ATSRSET.EXE    47
  59. 11.3.    ATSSGNLD.DLL    48
  60. 11.4.    ATSRSETD.DLL    48
  61. 12.    Reports    51
  62. 12.1.    Defined Holidays    51
  63. 12.2.    Defined Events    51
  64. 12.3.    Defined Tasks    52
  65. Appendices    53
  66. A. Glossary    55
  67. B. Shutting Down ATS from Outside of ATS    57
  68. C. Shortcut Keys    59
  69. D. Installing and Running ATS    61
  70. E. Supplied Files    63
  71. F. Watchdog    65
  72. G. Problem Reporting    67
  73.  
  74. 1.    Introduction
  75.  
  76. With the constant increase of processing power on personal computers many 
  77. companies are migrating software systems off of minicomputers and mainframes. 
  78. As more and more systems are migrated, it is becoming increasingly obvious that 
  79. the availability of PC versions of system utilities that have been in use on the larger 
  80. computers for many years is now crucial.
  81.  
  82. One such utility is a full function job scheduler. Years ago, jobs were scheduled in 
  83. the order that the card decks were placed in the readers. As time went by, 
  84. sophisticated programs were written to manage the scheduling of jobs on 
  85. mainframes and then on minicomputers. With the migration of mission critical 
  86. systems to the PC environment, it is evident that a full function job scheduler is 
  87. required.
  88.  
  89. Many companies have developed their own in house scheduler to handle the most 
  90. common of their requirements while choosing to ignore the more obscure, but yet 
  91. important, other cases. ATS for OS/2 has been designed to allow you to build 
  92. complete job streams giving complete control of how and when to run each 
  93. program.
  94.  
  95. Here are a few of the features of ATS for OS/2:
  96.  
  97. *    Build complete job streams.
  98. *    Define any day to be a holiday.
  99. *    Define if a job should run on a holiday, not run on a holiday or run either 
  100. way.
  101. *    Define what day of the week a job can run.
  102. *    Define what day of the month a job can run.
  103. *    Define what months a job can run.
  104. *    Define what hours of the day a job can run.
  105. *    Define a date range that a job can run within.
  106. *    Define if a job should run on the last day of the month, last business day of 
  107. the month, first business day of the month, last business day before the 
  108. 15th, or first business day after the 15th.
  109. *    Define if the job should run in a window, full screen or as a Presentation 
  110. Manager application.
  111. *    Define a job to be dependent upon the completion of one or more scheduled 
  112. jobs.
  113. *    Define a job to be dependent upon one or more files being created or 
  114. modified.
  115. *    Define a job to be dependent upon the receipt of one or more external 
  116. signals.
  117. *    Logs all activity to a file and an on-line window.
  118. *    Displays a list of all running jobs in an on-line window.
  119.  
  120. ATS can be notified that an external event has occurred in one of three ways. These 
  121. methods are:
  122.  
  123. *    an API that can be incorporated into an independently developed 
  124. application program
  125. *    a supplied executable that can be executed at an OS/2 command line or 
  126. from within a REXX or OS/2 Command procedure
  127. *    a menu option on the ATS main window.
  128.  
  129. ATS offers two different ways to clear the flag that indicates that an event has 
  130. occurred. They are:
  131. *    an API that can be incorporated into an independently developed 
  132. application program
  133. *    a supplied executable that can be executed at an OS/2 command line or 
  134. from within a REXX or OS/2 Command procedure.
  135.  
  136. ATS allows you to define an unlimited number of tasks, dependencies, and 
  137. holidays. ATS logs all activity to disk. In addition, there are three display windows 
  138. that can be turned on or off at the users discretion, Log, Status, and Running Tasks. 
  139. The log window captures all log entries for real time on-line viewing. The status 
  140. window displays the current state of ATS. The Running Tasks window displays a 
  141. list of all programs that have been initiated by ATS and are currently running.
  142.  
  143. ATS for OS/2 requires IBM OS/2 2.0 or later.
  144.  
  145. ATS for OS/2 is owned by MHR Software And Consulting. We can be reached by 
  146. mail at 2227 U.S. Highway #1 - Suite 146, North Brunswick, NJ 08902 or by 
  147. telephone at (908) 821-0359.
  148.  
  149. 2.    System Configuration
  150. ATS allows you to customize how ATS interfaces with you as well as how often 
  151. ATS should check to see if any dependent files have been modified or if any tasks 
  152. should be started.
  153.  
  154. Selecting Preferences from the System Configuration menu displays a dialog box 
  155. that lets you customize the on-line interface.
  156.  
  157. Selecting Timers from the System Configuration menu displays a dialog box that 
  158. lets you customize how often ATS should check to see if any dependent files have 
  159. been modified or if any tasks should be started.
  160. 2.1.    Preferences
  161.  
  162. There are six user configurable settings on the Preferences screen. These settings 
  163. control how ATS interacts with the user.
  164.  
  165. To display the Preferences screen:
  166.  
  167. *    Select Edit from the main ATS menu.
  168. *    Select System Configuration from the Edit menu.
  169. *    Select Preferences from the System Configuration menu.
  170. The keyboard short cut key is: Ctrl+P.
  171.  
  172. 2.1.1.    Adjusting Preferences
  173.  
  174. Clicking on the box to the left of the Preference choice will turn on or off that 
  175. option. If a small check mark appears in the box, the option is selected (i.e. on) if 
  176. there is no check mark, the option is not selected (i.e. off).
  177.  
  178. Clicking on the OK button will save the changes that you made and dismiss the 
  179. Preferences dialog box. If the "Warn on Edit" option on the Preferences screen 
  180. was previously selected, a message box will appear asking you to confirm the 
  181. changes.
  182.  
  183. Clicking on the Cancel button will dismiss the Preferences dialog box. If any 
  184. changes were made, a message box will appear asking you if you really want to 
  185. exit without saving your changes.
  186.  
  187. Clicking on the Default button will reset all of the options to their default value. 
  188. Refer to the following sections for the default values.
  189.  
  190. 2.1.2.    Warn On Edit
  191.  
  192. Turning this on will cause a warning box to appear each time you try to save an 
  193. event, task, or holiday that has been modified before the changes are committed 
  194. to the ATS data file. The default value is on.
  195.  
  196. 2.1.3.    Warn On Delete
  197.  
  198. Turning this on will cause a warning box to appear each time you try to delete 
  199. an event, task or holiday before the object is actually deleted from the ATS data 
  200. file. The default value is on.
  201.  
  202. 2.1.4.    Sound
  203.  
  204. ATS will beep when certain things happen. These include task initiation, task 
  205. termination, file modification, etc. If this option is not selected, ATS will not 
  206. beep in these cases. The default value is on.
  207.  
  208. Note:    ATS will always beep when a error or warning message box is displayed 
  209. on the screen.
  210.  
  211. 2.1.5.    Truncate Log On Startup
  212.  
  213. Each time ATS is started, the currently selected log file is opened up. If this 
  214. option is selected, all of the entries in the log file will be deleted each time ATS 
  215. is started. If this option is not selected, the new log entries are appended to the 
  216. end of the current log file. The default value is off.
  217.  
  218. 2.1.6.    Save Screen Positions Upon Exit
  219.  
  220. If this option is selected, when ATS is shut down, the physical size and location 
  221. of the ATS main window are saved as are the states of the three display 
  222. windows, refer to Section 10 Display Windows for further information. If this 
  223. option is selected, when ATS is started, it will be restored to the same state it 
  224. was in when it was last shutdown. If not , when ATS is started, it will be in the 
  225. default size and location and no display windows will be opened. The default 
  226. value is off.
  227.  
  228. 2.1.7.    On-Line Log Size
  229.  
  230. All of the entries that are written out to the ATS log file are also stored in 
  231. memory and optionally displayed in the ATS Log display window. This 
  232. parameter allows you to select how much RAM is used to store the log file. 
  233. When the on-line log file is full, ATS will clear it and start fresh. The default 
  234. value is 3K.
  235.  
  236. Adjusting The Size Of The On-Line Log
  237.  
  238. There are two ways that you can adjust the size of the on-line log. The first 
  239. method is to click with the right mouse button on one of the two small arrows to 
  240. the right of the ruler. This will cause the button that is on the ruler to move. The 
  241. second method is to click on the button that is on the ruler and slide it to the left 
  242. or the right. As the button moves, the size of the on-line log will be updated and 
  243. displayed in the text window above the ruler.
  244. 2.2.    Timers
  245.  
  246. There are two user configurable timers that control how often ATS checks 
  247. whether or not to run a job and whether or not any of the dependent files have 
  248. been modified. They are, respectively, the Clock Check Interval Timer and the File 
  249. Check Interval Timer.
  250.  
  251. When the Clock Check Interval Timer elapses, ATS examines each of the 
  252. scheduled tasks to determine if it should invoke them at the current time. If all of 
  253. the criteria for starting that task are satisfied, ATS will start the task. Refer to 
  254. Section 5.2 Task Characteristics and Section 8 Invoking Tasks for more detailed 
  255. information about task starting criteria.
  256.  
  257. When the File Check Interval Timer elapses, ATS examines the OS/2 file systems 
  258. statistics of each of the files that is defined in a File Modification Event. If the file 
  259. previously did not exist or if the statistics of the file have changed and ATS is able 
  260. to open the file for both reading and writing, the File Modification Event that is 
  261. associated with the examined file is flagged as having occurred. Refer to Section 4 
  262. Events for more detailed information about File Modification Events.
  263.  
  264. To display the Timers screen:
  265.  
  266. *    Select Edit from the main ATS menu.
  267. *    Select System Configuration from the Edit menu.
  268. *    Select Timers from the System Configuration menu.
  269. The keyboard short cut key is: Ctrl+T.
  270.  
  271. 2.2.1.    Adjusting Timers
  272.  
  273. There are two ways that you can adjust the Clock Check Interval Timer and the 
  274. File Check Interval Timer. The first method is to click with the right mouse 
  275. button on one of the two small arrows to the right of the ruler. This will cause 
  276. the button that is on the ruler to move. The second method is to click on the 
  277. button that is on the ruler and slide it to the left or the right. As the button 
  278. moves, the time interval that is associated with the particular timer will be 
  279. updated and displayed in the text window above the appropriate ruler.
  280.  
  281. Clicking on the OK button will save the changes that you made and dismiss the 
  282. Timers dialog box. If the "Warn on Edit" option on the Preferences screen was 
  283. selected, a message box will appear asking you to confirm the changes.
  284.  
  285. Clicking on the Cancel button will dismiss the Timers dialog box. If any changes 
  286. were made, a message box will appear asking you if you really want to exit 
  287. without saving your changes.
  288.  
  289. Clicking on the Default button will reset all of the options to their default value. 
  290. Refer to the following sections for the default values.
  291.  
  292. 2.2.2.    File Check Interval
  293.  
  294. The File Check Interval is used by ATS to determine how often to check to see if 
  295. a file has been modified. This value can range from 30 seconds to 10 minutes in 
  296. thirty second intervals. The default value is 1 minute.
  297.  
  298. 2.2.3.    Clock Check Interval
  299.  
  300. The Clock Check Interval is used by ATS to determine how often to check to see 
  301. if any task should be started. This value can range from 30 seconds to 10 minutes 
  302. in thirty second intervals. The default value is 1 minute.
  303.  
  304. 3. Holidays
  305.  
  306. ATS uses Holidays to determine when to run a scheduled task. A task can be 
  307. scheduled to run on any combination of days of the week and days of the month. In 
  308. addition, a task can be scheduled to run on a particular day (of the week or month) 
  309. if that day falls on a defined holiday, if it does not fall on a defined holiday or 
  310. regardless of if it falls on a defined holiday. Refer to Section 5.2 Task 
  311. Characteristics for a more detailed explanation of how to schedule a task.
  312.  
  313. A Holiday definition consists of a date, a name, and a day of the week. Any day of 
  314. the year can be defined as a Holiday. You can define an unlimited number of 
  315. Holidays.
  316.  
  317. To display the Define Holidays screen:
  318.  
  319. *    Select Edit from the main ATS menu.
  320. *    Select Holidays from the Edit menu.
  321. The keyboard short cut key is: Ctrl+H.
  322.  
  323. 3.1.    Adding a New Holiday
  324.  
  325. *    Insure that you are in Add Mode. The mode is indicated in the title bar of 
  326. the dialog box. If you are in Add Mode, the title will be "ATS for OS/2 - 
  327. Define Holidays (Add)" and the Mode Change button (located in the lower 
  328. right corner of the dialog box will be labeled "Edit Mode". If you are not in 
  329. Add Mode, click on the mode change button (it will be labeled "Add 
  330. Mode").
  331. *    Enter a valid date in the Date field.
  332.     Note:    ATS will validate the date when you click on the OK button.
  333. *    Enter text in the Holiday field that describes the holiday. You can enter a 
  334. maximum of 32 characters.
  335. *    Click on the Add button.
  336. *    If the date that you entered is invalid or is already defined as a holiday, an 
  337. error message will be displayed.
  338. *    If the date is valid and is not already defined as a holiday, the day of week 
  339. window will be set, the holiday will be added to the ATS calendar, and the 
  340. entry will appear in the list box.
  341. 3.2.    Deleting an Existing Holiday
  342.  
  343. *    Insure that you are in Edit Mode. The mode is indicated in the title bar of 
  344. the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
  345. Define Holidays (Edit)" and the Mode Change button (located in the lower 
  346. right corner of the dialog box will be labeled "Add Mode". If you are not in 
  347. Edit Mode, click on the mode change button (it will be labeled "Edit 
  348. Mode").
  349. *    Select the entry in the list box that you wish to delete.
  350. *    Click on the Delete button.
  351. *    If the "Warn on Delete" option on the Preferences screen was selected, a 
  352. message box will appear asking you to confirm the deletion.
  353. *    If "Warn on Delete" is off or if you answered yes to the deletion 
  354. confirmation, the holiday will be removed from the ATS calendar, and the 
  355. entry will be removed from the list box.
  356. 3.3.    Editing an Existing Holiday
  357.  
  358. *    Insure that you are in Edit Mode. The mode is indicated in the title bar of 
  359. the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
  360. Define Holidays (Edit)" and the Mode Change button (located in the lower 
  361. right corner of the dialog box will be labeled "Add Mode". If you are not in 
  362. Edit Mode, click on the mode change button (it will be labeled "Edit 
  363. Mode").
  364. *    Select the entry in the list that you wish to edit.
  365. *    Enter a valid date in the Date field.
  366. *    Enter text in the Holiday field that describes the holiday. You can enter a 
  367. maximum of 32 characters.
  368. *    Click on the OK button.
  369. *    If the "Warn on Edit" option on the Preferences screen was selected, a 
  370. message box will appear asking you to confirm the changes.
  371. *    If the date that you entered is invalid or is already defined as a holiday, an 
  372. error message will be displayed.
  373. *    If the date is valid and is not already defined as a holiday, the day of week 
  374. field will be updated, the holiday will be edited in the ATS calendar, and 
  375. the entry will be refreshed in the list box.
  376.  
  377. 4.    Events
  378.  
  379. An event, in ATS, is something that happens that a scheduled task can be 
  380. dependent upon. This can be a file being modified (File Modification Event), the 
  381. completion of a task that was scheduled through and initiated by ATS (Task 
  382. Completion Event), or notification that something has occurred (Signal Event).
  383.  
  384. ATS uses events as one of the criteria to base its initiation of scheduled tasks.
  385.  
  386.     To display the Define Events screen:
  387.  
  388. *    Select Edit from the main ATS menu.
  389. *    Select Events from the Edit menu.
  390. The keyboard short cut key is: Ctrl+E.
  391.  
  392. 4.1.    Types of Events
  393.  
  394. 4.1.1.    Job Termination Event
  395.  
  396. A Job Termination event is an event that will be flagged as having occurred 
  397. when the associated job (a task that is scheduled and executed through ATS) 
  398. completes and the associated job ends with a return code that falls within the 
  399. defined return code range. In order for a task to be used as a Job Termination 
  400. event, it must run as a child process of ATS. Any task that is scheduled through 
  401. ATS and does not have the Independent Session option selected on the Task Edit 
  402. screen will run as a child process of ATS. Refer to Section 5.2 Independent 
  403. Session for more information about the differences between child processes and 
  404. independent sessions.
  405.  
  406. 4.1.2.    File Modification Event
  407.  
  408. A File Modification event is an event that will be flagged as having occurred 
  409. when the associated file is updated and is available for reading and writing. The 
  410. file is checked periodically to see if its statistics have changed and if it is 
  411. available. The interval between file checks is determined by the setting of the 
  412. File Check Interval timer.
  413.  
  414. If the associated file does not exist when ATS is started, then when it is created 
  415. and is available for reading and writing ATS will, the next time the File Check 
  416. Interval elapses, flag the event as having occurred.
  417.  
  418. ATS uses the files last update date and time and file size statistics to determine if 
  419. a file has been updated.
  420.  
  421. 4.1.3.    Signal Event
  422.  
  423. A Signal Event is an event that will be flagged as having occurred when a signal 
  424. is received from one of the following sources:
  425.  
  426. *    a supplied API that has been incorporated into an independently 
  427. developed application program
  428. *    a supplied executable, ATSSGNL.EXE, that has been executed at an OS/2 
  429. command line or from within a REXX or OS/2 Command procedure
  430. *    user interaction with the Signal Event menu option on the ATS main 
  431. window
  432.  
  433. ATS allows you to clear the flag that indicates that an event has occurred. ATS 
  434. will clear the flag when a signal is received from one of the following sources: 
  435.  
  436. *    a supplied API that can be incorporated into an independently developed 
  437. application program
  438. *    a supplied executable, ATSRESET.EXE that can be executed at an OS/2 
  439. command line or from within a REXX or OS/2 Command procedure.
  440.  
  441. Refer to Section 11 Signaling Events From Outside Of ATS for further 
  442. information about using the supplied executables or API's.
  443.  
  444. 4.2.    Event Characteristics
  445.  
  446. 4.2.1.    Common
  447.  
  448. Event Name    The name given to a particular event by the user. This 
  449. name must be unique among all events defined to 
  450. ATS. The Event Name can be up to 12 characters 
  451. long. This field is required for all event definitions.
  452.  
  453. Event Type    Defines the characteristics of the event and how it is 
  454. flagged as having occurred. The three possibilities 
  455. are: Job Termination, File Modification, and Signal. 
  456. This field is required for all event definitions.
  457.  
  458. 4.2.2.    Job Termination Event Specific
  459.  
  460. Minimum Return Code    The lowest possible value returned by the dependent 
  461. task that will cause this event to be flagged as having 
  462. occurred. This value can be up to 5 digits or 4 digits 
  463. and a leading sign. This value must be less than the 
  464. Maximum Return Code. This field is only required 
  465. for Job Termination events.
  466.  
  467. Maximum Return Code    The highest possible value returned by the dependent 
  468. task that will cause this event to be flagged as having 
  469. occurred. This value can be up to 5 digits or 4 digits 
  470. and a leading sign. This value must be greater than 
  471. the Minimum Return Code. This field is only 
  472. required for Job Termination events.
  473.  
  474. Task    The name of the task which this event is dependent 
  475. upon. The task is specified by selecting one task from 
  476. the Tasks list box. A scheduled task can not be 
  477. dependent upon its own completion. Therefore, a Job 
  478. Termination Event can not be defined to be a 
  479. dependency of the task of which it is dependent 
  480. upon. This field is only required for Job Termination 
  481. events.
  482.  
  483. 4.2.3.    File Modification Event Specific
  484.  
  485. Full File Name    The drive, path, and name of the file that is being 
  486. monitored for this event. The drive, path and name 
  487. can contain a maximum of 255 characters. This field is 
  488. only required for File Modification events.
  489.  
  490. 4.2.4.    Signal Event Specific
  491.  
  492. There are no additional required fields for Signal Events.
  493.  
  494. 4.3.    Adding a New Event
  495.  
  496. *    Insure that you are in Add Mode. The mode is indicated in the title bar of 
  497. the dialog box. If you are in Add Mode, the title will be "ATS for OS/2 - 
  498. Define Events (Add)" and the Mode Change button (located in the lower 
  499. right corner of the dialog box will be labeled "Edit Mode". If you are not in 
  500. Add Mode, click on the mode change button (it will be labeled "Add 
  501. Mode").
  502. *    Fill in the required fields as described in Section 4.2 Event Characteristics.
  503. *    Click on the Add button.
  504. *    If the name that you entered is already defined or a required field, as 
  505. defined in Section 4.2 Event Characteristics, is missing or out of range, an 
  506. error message will be displayed.
  507. *    If all required fields are filled in and within range, the event will be added 
  508. to the ATS event list, and the event name will appear in the Events list box.
  509. 4.4.    Deleting an Existing Event
  510.  
  511. *    Insure that you are in Edit Mode. The mode is indicated in the title bar of 
  512. the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
  513. Define Events (Edit)" and the Mode Change button (located in the lower 
  514. right corner of the dialog box will be labeled "Add Mode". If you are not in 
  515. Edit Mode, click on the mode change button (it will be labeled "Edit 
  516. Mode").
  517. *    Select the entry in the Events list box that you wish to delete.
  518. *    Click on the Delete button.
  519. *    If the "Warn on Delete" option on the Preferences screen was selected, a 
  520. message box will appear asking you to confirm the deletion.
  521. *    If "Warn on Delete" is off or if you answered yes to the deletion 
  522. confirmation, the event will be removed from the ATS event list, and the 
  523. entry will be removed from the Events list box.
  524. 4.5.    Editing an Existing Event
  525.  
  526. *    Insure that you are in Edit Mode. The mode is indicated in the title bar of 
  527. the dialog box. If you are in Edit Mode, the title will be "ATS for OS/2 - 
  528. Define Events (Edit)" and the Mode Change button (located in the lower 
  529. right corner of the dialog box will be labeled "Add Mode". If you are not in 
  530. Edit Mode, click on the mode change button (it will be labeled "Edit 
  531. Mode").
  532. *    Select the entry in the Events list box that you wish to edit.
  533. *    Enter the changes that you want, insuring that you fill in all of the required 
  534. fields as described above in Section 4.2 Event Characteristics.
  535. *    Click on the OK button.
  536. *    If the "Warn on Edit" option on the Preferences screen was selected, a 
  537. message box will appear asking you to confirm the changes.
  538. *    If the name that you entered is already defined or a required field, as 
  539. defined above in Section 4.2 Event Characteristics, is missing or out of 
  540. range, an error message will be displayed.
  541. *    If all required fields are filled in and within range, the event will be added 
  542. to the ATS event list, and the event name will appear in the Events list box.
  543.  
  544. 5.    Tasks
  545.  
  546. A Task is a program that you wish to schedule to be automatically started by ATS. 
  547. The program can be an OS/2 full screen application, an OS/2 windowed 
  548. application, or an OS/2 PM application. A task can be scheduled to run based upon 
  549. any combination of the following:
  550.  
  551. *    time of day
  552. *    day of the week
  553. *    month
  554. *    day of the month
  555. *    holidays or non-holidays
  556. *    dependencies
  557.  
  558. 5.1.    Task Selection
  559.  
  560. To display the Task Selection screen:
  561.  
  562. *    Select Edit from the main ATS menu.
  563. *    Select Tasks from the Edit menu.
  564. The keyboard short cut key is: Ctrl+S.
  565.  
  566. 5.1.1.    Adding a New Task
  567.  
  568. To add a new task, click on the New Task button on the Task Selection screen. 
  569. When you select this option, the Define Task screen will be brought up.
  570.  
  571. Note:    If no tasks are currently defined, selecting the Schedule Tasks option on 
  572. the Edit menu of the main ATS window will cause this screen to be by 
  573. passed and the Define Task screen will be brought up directly.
  574.  
  575. 5.1.2.    Deleting an Existing Task
  576.  
  577. *    Select a task by clicking on it in the Task Selection list box.
  578. *    Click on the Delete Task button.
  579. *    If the "Warn on Delete" option on the Preferences screen was selected, a 
  580. message box will appear asking you to confirm the deletion.
  581. *    If "Warn on Delete" is off or if you answered yes to the deletion 
  582. confirmation, the event will be removed from the ATS task list and the 
  583. entry will be removed from the Task Selection list box.
  584.  
  585. 5.1.3.    Editing an Existing Task
  586.  
  587. *    Select a task by clicking on it in the Task Selection list box.
  588. *    Click on the OK button.
  589. Double clicking on the entry in the Task Selection list box is the same as doing 
  590. both of the above steps.
  591.  
  592. 5.2.    Task Characteristics
  593.  
  594. Task Name    The name given to a particular task by the user. This 
  595. name must be unique among all tasks defined to 
  596. ATS. The Task Name can be up to 12 characters long. 
  597. This field is required for all task definitions.
  598.  
  599. Day of Week    Defines the days of the week that you want the task 
  600. to be allowed to run. You can further define if the 
  601. task should run if the particular day of the week is a 
  602. holiday, if it is not a holiday, or regardless of its 
  603. holiday status.
  604.  
  605.     You can change the setting for a particular day of the 
  606. week two ways.  The first method is to click with the 
  607. right mouse button on one of the two small arrows 
  608. below the ruler. This will cause the button that is on 
  609. the ruler to move. The second method is to click on 
  610. the button that is on the ruler and slide it up or down.
  611.  
  612.     If you have set the slider to "Don't Run", then this task 
  613. is not eligible to run on the associated day of the 
  614. week.
  615.  
  616.     If you have set the slider to "Run", then this task is 
  617. eligible to run on the associated day of the week.
  618.  
  619.     If you have set the slider to "Holiday", then if the 
  620. associated day of the week falls on a defined holiday, 
  621. the task is eligible to run.
  622.  
  623.     If you have set the slider to "Non-Holiday", then if 
  624. the associated day of the week falls on a day that is 
  625. not defined as a holiday, the task is eligible to run.
  626.  
  627.     If you set all of the days of the week to "Don't Run", a 
  628. warning message will be displayed informing you 
  629. that the task will never run.
  630.  
  631.     The following chart summarizes when a task is 
  632. eligible to run based upon the setting of the slider.
  633.  
  634. +====================================================================+
  635. | SliderSetting        Current day of the          Current day of the         |
  636. |                             week is a holiday            week is not a holiday    |
  637. | -------------        ------------------        ---------------------    |
  638. | Non-Holiday                Can't Run                        Can Run                |
  639. | Holiday                    Can Run                            Can't Run            |
  640. | Run                            Can Run                            Can Run                |
  641. | Don't Run                    Can't Run                        Can't Run            |
  642. +====================================================================+
  643.  
  644. Valid Months    Defines the months that you want the task to be 
  645. allowed to run.
  646.  
  647.     If the radio button to the left of the months 
  648. abbreviation is selected, the task is eligible to run in 
  649. that month. If the month is not selected, the task is not 
  650. eligible to run in that month.
  651.  
  652.     Click on the button to the left of the month's 
  653. abbreviation to select or deselect the month.
  654.  
  655.     If you fail to select any month, a warning message 
  656. will be displayed informing you that the task will 
  657. never run.
  658.  
  659. Dates and Times    Defines the hours during the day that you want the 
  660. task to be allowed to run as well as the dates that you 
  661. want the task to be allowed to run.
  662.  
  663.     The start and end times can be from 00:00 to 23:59. 
  664. The start time does not have to be earlier than the end 
  665. time. If it is not, then the time range will be assumed 
  666. to span midnight.
  667.  
  668.     The start and end dates can be from 01/01/1993 to 
  669. 12/31/2025. 
  670.  
  671.     The start date must be before the end date or a 
  672. warning message will be displayed.
  673.  
  674.     The allowed date and time ranges are independent of 
  675. each other.
  676.  
  677.     To change the start or end date, click on the day, 
  678. month, or year and then click on the up or the down 
  679. arrow to the left of the year field.
  680.  
  681.     To change the start or end time, click on the hour or 
  682. minute and then click on the up or the down arrow to 
  683. the left of the minute field.
  684.  
  685.     Refer to Section 8 Invoking Tasks for more 
  686. information on how the date and time fields are used 
  687. to determine when a task will be started.
  688.  
  689. Day of Month    Defines the months that you want the task to be 
  690. allowed to run.
  691.  
  692.     You can further define if the task should run if the 
  693. particular day of the month is a holiday, if it is not a 
  694. holiday, or regardless of its holiday status.
  695.  
  696.     You can change the setting for a particular day of the 
  697. month two ways.  The first method is to click with the 
  698. right mouse button on one of the two small arrows 
  699. below the ruler. This will cause the button that is on 
  700. the ruler to move. The second method is to click on 
  701. the button that is on the ruler and slide it up or down.
  702.  
  703.     If you have set the slider to "Don't Run", then this task 
  704. is not eligible to run on the associated day of the 
  705. month.
  706.  
  707.     If you have set the slider to "Run", then this task is 
  708. eligible to run on the associated day of the month.
  709.  
  710.     If you have set the slider to "Holiday", then if the 
  711. associated day of the month falls on a defined 
  712. holiday, the task is eligible to run.
  713.  
  714.     If you have set the slider to "Non-Holiday", then if 
  715. the associated day of the month falls on a day that is 
  716. not defined as a holiday, the task is eligible to run.
  717.  
  718.     Refer to the chart under Day of Week above for a 
  719. summarization of when a task is eligible to run based 
  720. upon the setting of the slider.
  721.  
  722.     There are five special days of the month. They are 1) 
  723. "L" the last day of the month, 2) "LB" the last business 
  724. day of the month, 3) "FB" the first business day of the 
  725. month, 4) "B15" the last business day of the month 
  726. before the 15th, and 5) "A15" the first business day of 
  727. the month after the 15th. For these five special days, 
  728. Saturdays, Sundays, and holidays are considered to 
  729. be non-business days.
  730.  
  731.     If you set all of the days of the month to "Don't Run", 
  732. a warning message will be displayed informing you 
  733. that the task will never run.
  734.  
  735. Program Details    Program Name is the drive, path, and name of the 
  736. executable associated with this task that is to be run 
  737. when all of the dependencies for the task are 
  738. satisfied. The drive, path and name can contain a 
  739. maximum of 255 characters. This field is required for 
  740. all tasks.
  741.  
  742.     Parameters is a string that is passed to the executable 
  743. when it is invoked by ATS. The Parameters field can 
  744. contain a maximum of 255 characters. The parameter 
  745. string may contain imbedded ATS variables which 
  746. will be replaced by ATS at run time. These variables 
  747. allow you to pass the following information to the 
  748. scheduled task: current (execution) date, current time, 
  749. day of week, holiday indicator, and task name. Each 
  750. of these variables can be passed in various formats. 
  751. The chart below defines the syntax and output of 
  752. each option. This field is optional.
  753.  
  754. Variable
  755. Syntax
  756. Output
  757.  
  758. Date
  759. !DI        1991-10-27
  760. !Di        91-10-27
  761. !DU        10/27/1991
  762. !Du        10/27/91
  763. !DE        27.10.1991
  764. !De        27.10.91
  765. !DJ        1991-10-27
  766. !Dj        91-10-27
  767.  
  768. Time
  769. !TI        13.30.05
  770. !Ti        13.30
  771. !TU        01:30 PM
  772. !Tu        01:30
  773. !TE        13.30.05
  774. !Te        13.30
  775. !TJ        13:30:05
  776. !Tj        13:30
  777.  
  778. Day Of Week
  779. !XA        SUN
  780. !Xa        Sun
  781. !XF        SUNDAY
  782. !Xf        Sunday
  783. !XN        0 (Sun = 0, Sat = 6)
  784. !X1        1 (Sun = 1, Sat = 7)
  785.  
  786. Holiday
  787. !HN         1 if holiday, 0 if not
  788. !Hn        1 if holiday, 0 if not
  789. !HA        H if holiday, N if not
  790. !Ha        h if holiday, n if not
  791.  
  792. Task Name
  793. !N            TASK NAME
  794. !n            Task Name
  795.  
  796. Exclamation Mark
  797. !!            !
  798.  
  799.     Working Directory is the drive and path where the 
  800. executable will be invoked from. The drive and path 
  801. can contain a maximum of 255 characters. This field is 
  802. optional.
  803.  
  804. Session Type    Defines how the task should be run. The options are 
  805. Full Screen, OS/2 Window, or PM.
  806.  
  807.     If the program to be run is a OS/2 Command 
  808. Procedure or a REXX program, then the CMD File 
  809. option should be selected.
  810.  
  811.     Additionally, you can specify that the program be 
  812. run in the background. If you do not select the 
  813. background option, ATS will attempt to make the 
  814. executed task the active session. Sometimes this is not 
  815. possible. 
  816.  
  817. Independent Session    Defines if the task should run as a child process of 
  818. ATS or as an independent session. If the task runs as 
  819. a child of ATS, then when the program ends, the 
  820. system will notify ATS and provide the return code 
  821. from the scheduled task. ATS will use this 
  822. information to signal any dependent tasks, remove 
  823. the item from the Running Tasks window, and place 
  824. an entry in the ATS log indicating that the task has 
  825. ended.
  826.  
  827.     Independent tasks are recorded in the ATS log and in 
  828. the Running Tasks window. However, because the 
  829. system does not notify ATS when the task ends, they 
  830. are not removed from the Running Tasks window 
  831. and no termination entry is placed in the ATS log. 
  832. Because ATS can not determine when an 
  833. independent session has ended, it is recommended 
  834. that all scheduled tasks be run as child processes 
  835. unless it is absolutely necessary to run it as an 
  836. independent session.
  837.  
  838.     If ATS is terminated, whether normally or 
  839. abnormally, any task that is a child of ATS will be 
  840. terminated by the system. If there are active child 
  841. tasks running and a user attempts to shut down ATS, 
  842. a warning message will be displayed.
  843.  
  844. Events    This is an information only box on the ATS Task Edit 
  845. screen that displays the number of dependencies, by 
  846. type, that the current task has. The information in this 
  847. box is for display only and can not be changed by the 
  848. user.
  849.  
  850. Dependencies    Clicking on the Dependencies button will bring up 
  851. the ATS Define Task Dependencies dialog box. This 
  852. screen is used to link events with the current task. For 
  853. further information, refer to Section 6 Dependencies.
  854.  
  855. Concurrent Occurrences    Defines the limit of how many concurrent active 
  856. occurrences of a scheduled task ATS can invoke. i.e. 
  857. If this number is set to 1 and the task is active, even if 
  858. all of the dependencies and other criteria are 
  859. satisfied, ATS will not invoke the transaction. This 
  860. does not apply to independent sessions since ATS 
  861. does not know if the task is truly active.
  862.  
  863.     If you set this value to 0 (zero), then ATS will never 
  864. invoke this task. This can be used as a way of 
  865. archiving a task for a period of time without having 
  866. to remove it from ATS and then rebuild it at a later 
  867. date. This does apply to independent tasks.
  868.  
  869. 6.    Dependencies
  870.  
  871. A dependency is a link between an event and a task. An event can be a dependency 
  872. for one or more tasks. A task can be dependent upon one or more events. Actually, 
  873. an event can be defined and not be a dependency of any task and a task can be 
  874. defined without having being dependent upon any event.
  875.  
  876. You use this screen to link events to tasks.
  877.  
  878. To display the Define Task Dependencies screen:
  879.  
  880. *    Select Edit from the main ATS menu.
  881. *    Select Tasks from the Edit menu.
  882.  
  883. The keyboard short cut key for the above steps is: Ctrl+S.
  884.  
  885. *    Select the task that you want to add/edit/delete dependencies for.
  886. *    Click on the Dependencies button.
  887.  
  888. 6.1.    Adding a New Dependency
  889.  
  890. *    Select the event, from the Defined Events list box, that you want to be a 
  891. dependency of the current task.
  892. *    Click on the Add>> button.
  893. *    If the task is already listed in the Dependencies list box, ATS will beep.
  894. *    If you did not select a task from the Defined Events list box, ATS will beep.
  895. *    If the selected event is not already in the Dependencies list box, ATS will 
  896. add the event as a dependency of the current task and add it to the 
  897. Dependencies list box.
  898. 6.2.    Remove an Existing Dependency
  899.  
  900. *    Select the event that you want to remove from the Dependencies list box.
  901. *    Click on the Remove>> button.
  902. *    If you did not select a task from the Dependencies list box, ATS will beep.
  903. *    ATS will remove the event as a dependency of the current task and remove 
  904. it from Dependencies list box.
  905. 6.3.    Define Event
  906.  
  907. Clicking on the Define Event button on the Define Task Dependencies screen will 
  908. bring up the Define Events screen. You can add new events, delete existing events, 
  909. or edit existing events. When you return to the Define Task Dependencies screen, 
  910. the Defined Events list box and the Dependencies list box will be refreshed.
  911.  
  912. If an event is deleted, it is removed as a dependency from all tasks that it had been 
  913. associated with.
  914.  
  915. 7.    Signal Event
  916.  
  917. When an event is flagged as having occurred, it is flagged for all tasks that currently 
  918. have that event defined as a dependency of it.
  919.  
  920. This is one of three ways that a Signal Event can be flagged as having occurred. The 
  921. other two are the ATSSGNL.EXE program provided, or embedding the provided 
  922. API into your own application. Refer to Section 11 Signaling Events from Outside 
  923. of ATS for more information about the other methods.
  924.  
  925.     To display the Signal Event screen:
  926.  
  927. *    Select Signal Event from the main ATS menu.
  928. The keyboard short cut key is: Ctrl+G.
  929.  
  930. 7.1.    Signaling an Event
  931.  
  932. *    Select the event from the Events list box.
  933. *    Click on the Signal button.
  934. *    Click on Cancel to dismiss the screen or repeat the above steps to signal 
  935. another event.
  936.  
  937. Double clicking on an entry in the Events list box is the same as doing the first two 
  938. steps above.
  939.  
  940. 8.    Invoking Tasks
  941.  
  942. 8.1.    Overview
  943.  
  944. ATS uses the user configurable timers to determine when to check to see if any 
  945. scheduled tasks need to be initiated.
  946.  
  947. When the Clock Check Interval Timer elapses, ATS scans all of the scheduled 
  948. tasks to see if any should be started and then waits for the timer to elapse again.
  949.  
  950. When the File Check Interval Timer elapses, ATS first checks the statistics of all of 
  951. the files that are associated with File Modification Events and updates the status of 
  952. those events appropriately. ATS then scans all of the scheduled tasks to see if any 
  953. should be started and then waits for the timer to elapse again.
  954.  
  955. In order for ATS to determine if a task should be invoked, it will check if:
  956.  
  957. *    another occurrence of the task can be invoked
  958. *    the current date is within the specified date range
  959. *    the current time is within the specified time range
  960. *    all dependencies are satisfied
  961. *    the task can be run on the current day of the week
  962. *    the task can be run on the current day of the month
  963. *    the task can be run in the current month
  964.  
  965. After invoking a task, ATS will reset all dependent events for the started task. If 
  966. an event is a dependency of more than one task, the event is reset only for the 
  967. invoked task. The flag indicating that an event has occurred is maintained at a 
  968. task level.
  969.  
  970. 8.2.    Dates and Times
  971.  
  972. The date range and time range are independent of each other. They define the 
  973. days and time of day that ATS is allowed to run the task.
  974.  
  975. For example, if you set the start date to 11/14/1993 and the end date to 
  976. 12/21/1993 then even if all of the other criteria for initiating the task are satisfied, 
  977. ATS will not start the task if the current system date is not within the specified 
  978. date range. Likewise, if you set the start time to 10:00 and the end time to 11:00, 
  979. then ATS will only start the task if the current system time is between 10:00 and 
  980. 11:00.
  981.  
  982. 8.3.    Short Running Tasks with No Dependencies
  983.  
  984. Because of the robustness of ATS, short running tasks present a problem. The 
  985. problem is that the task might be initiated multiple times even if that is not what 
  986. you had wanted.
  987.  
  988. For a particular task, assume that you set the start time to 13:00 and the end time 
  989. to 13:00. You would assume that ATS will only start that task if the current clock 
  990. reading is 13:00. This is not totally true and it does not mean that ATS will only 
  991. run the task only once.
  992.  
  993. Since the computer that ATS runs on allows anyone with keyboard access to 
  994. adjust the system clock, ATS had to be designed to ensure that every job that is 
  995. supposed to run does even if the system clock is changed. Also, since the user 
  996. configurable timers can be set to elapse as far apart as every ten minutes, it is 
  997. likely that the timers will not elapse on the exact minute that a job is scheduled to 
  998. run on. In order to handle these conditions, each time ATS checks the system 
  999. clock, it will initiate any task that has a start time that falls between the current 
  1000. system clock time and the system clock time from the previous check. This allows 
  1001. you to set the check interval to 10 minutes and not worry that a particular task will 
  1002. not get started because its start time did not exactly match a system clock reading.
  1003.  
  1004. The problem for short running tasks with no dependencies is as follows. Assume, 
  1005. once again, that the start time for the task is 13:00 and the end time is 13:00 and 
  1006. you have set the Clock Check Interval Timer to 30 seconds. The task that is being 
  1007. initiated will only run for 5 seconds. At 13:00:04 ATS checks your task and 
  1008. decides that all of the criteria to run the task are satisfied (i.e. day, month, date...) 
  1009. so it starts it. At 13:00:09, the task ends. At 13:00:34, ATS once again checks your 
  1010. task and since it is still 13:00, decides that all of its criteria to run are still satisfied 
  1011. and initiates it again. At 13:01:04, ATS again checks your task. Now, remember 
  1012. that ATS will start any task whose valid start time range falls between the 
  1013. previously checked system clock time and the current system clock time. Since 
  1014. 13:00 is definitely between 13:00:34 and 13:01:04, ATS will start your task again.
  1015.  
  1016. Therefore, it is recommended that any job that may run for less than one minute 
  1017. have at least one dependent event.
  1018.  
  1019. One way to schedule a short running task and insure that it only runs once a day 
  1020. at a certain time is as follows:
  1021.  
  1022. Schedule your task as you normally would specifying all of the criteria 
  1023. required. The start time and end time of the task do not have to be the same 
  1024. but they probably should be.
  1025.  
  1026. Create a new Signal Event. This event will be used become a dependency of 
  1027. your task.
  1028.  
  1029. Schedule another task to run with all of the same criteria as before but set 
  1030. the start time and end time to the same value. This time must be earlier 
  1031. than the start time of the other task by the larger of the Clock Check 
  1032. Interval and the File Check Interval plus 1 minute. If you set the start time 
  1033. of this task to be eleven minutes earlier than the start time of the other task 
  1034. you will always be safe.
  1035.  
  1036. The program that this new task will run is ATSSGNL.EXE and its input 
  1037. parameter will be the name of the Signal Event that you created above.
  1038.  
  1039. Make the first task, the one that you want to insure only runs once, to be 
  1040. dependent upon the Signal Event that you created above.
  1041.  
  1042. The task that runs ATSSGNL.EXE will run twice. But, since setting a Signal 
  1043. Event more than once has no effect, this is no problem.
  1044.  
  1045. MHR Software and Consulting understands that this is not the optimal solution 
  1046. and will be adding, to the next release, the ability to specify how often within a 
  1047. given period of time a particular task may be started. ATS will allow you to 
  1048. specify the given period of time in minutes, hours, calendar days, weeks, months 
  1049. and years. Until then please be careful when scheduling short running tasks.
  1050.  
  1051. 9.    Logging
  1052.  
  1053. 9.1.    Log File
  1054.  
  1055. To display the Log File screen:
  1056.  
  1057. *    Select File from the main ATS menu.
  1058. *    Select Log File from the File menu.
  1059. The keyboard short cut key is: Alt+F.
  1060.  
  1061. 9.1.1.    Specifying a New Log File
  1062.  
  1063. To open a new ATS log file, enter the new log file name in the Open filename 
  1064. field or use the Drive, Directory, and File list boxes to select one.
  1065.  
  1066. 9.1.2.    Log File Initialization
  1067.  
  1068. If the selected log file already exists, ATS will prompt you to specify if it should 
  1069. truncate the data in the new file or append new data to it.
  1070.  
  1071. ATS will write one entry to the old log file indicating that it is being closed and 
  1072. another indicating the name of the new log file.
  1073.  
  1074. When ATS opens the new log file, it will write one entry to the new log file 
  1075. indicating that it has just been opened and another one indicating the name of 
  1076. the one that was just closed.
  1077.  
  1078. 9.2.    Log Comment
  1079.  
  1080. You can insert a comment into the log at any point. Log comments go into the log 
  1081. with the standard log entry prefix of date and time.
  1082.  
  1083.     To display the Add Log Comment screen:
  1084.  
  1085. *    Select File from the main ATS menu.
  1086. *    Select Log Comment from the File menu.
  1087. The keyboard short cut key is: Alt+F.
  1088.  
  1089. 9.2.1.    Inserting Comments Into the Log File
  1090.  
  1091. *    Enter any text that you wish into the entry field. You can enter a maximum 
  1092. of 116 characters per log entry.
  1093. *    If you wish to add more than one comment, click on the Add button.
  1094. *    If you wish to add the current comment and dismiss the dialog box click on 
  1095. the Add/Quit button.
  1096. *    If you do not wish to add the current comment and want to dismiss the 
  1097. dialog box click on the Cancel button.
  1098. 9.2.2.    Inserting Comments Into the Log File from Outside of ATS
  1099.  
  1100. ATS for OS/2 includes an executable named ATSTOLOG.EXE. Invoking this 
  1101. from an OS/2 prompt or from within a REXX or Command file will insert a 
  1102. record into the ATS log. This is useful if you want some or all of your scheduled 
  1103. jobs to write to a common log. The syntax is as follows: ATSTOLOG text where 
  1104. text is any text that you want included in the log. If there are any imbedded 
  1105. spaces in the text, enclose the entire text string in double quotes.
  1106.  
  1107. 10.    Display Windows
  1108.  
  1109. 10.1.    ATS Log
  1110.  
  1111. The ATS Log window displays all of the messages that have been written to the 
  1112. ATS log during the current ATS session. When the on-line log fills up, the log is 
  1113. refreshed by clearing out all of the entries and starting over.
  1114.  
  1115. Note:    This does not effect the physical log file that is written to disk.
  1116.  
  1117. To toggle the Log display window on or off:
  1118.  
  1119. *    Select Windows from the main ATS menu.
  1120. *    Select Log from the Windows menu
  1121. The keyboard short cut key is: Alt+L
  1122.  
  1123. 10.2.    ATS Status
  1124.  
  1125. The ATS Status window displays the current state of ATS. It provides you with 
  1126. all of the current ATS statistics.
  1127.  
  1128. The status window displays the:
  1129.  
  1130. *    date and time the current ATS session was started
  1131. *    date and time of the latest clock check
  1132. *    date and time of the latest file check
  1133. *    current clock check interval setting
  1134. *    current file check interval setting
  1135. *    current on-line log size setting
  1136. *    name of the current log file
  1137. *    number of defined holidays
  1138. *    date, name and day of week of each defined holiday
  1139. *    number of defined events
  1140. *    name of each defined event and optionally the task name or file name 
  1141. associated with it
  1142. *    number of defined tasks
  1143. *    name and program name of each task
  1144. *    number of dependencies for each task
  1145. *    name of each dependency for each task and whether it has occurred (TRUE) 
  1146. or not (FALSE)
  1147.  
  1148. To toggle the Running Tasks display window on or off:
  1149.  
  1150. *    Select Windows from the main ATS menu.
  1151. *    Select Status from the Windows menu
  1152.  
  1153. The keyboard short cut key is: Alt+S
  1154.  
  1155. 10.3.    ATS Running Tasks
  1156.  
  1157. The ATS Running Tasks window displays a list of all of the currently executing 
  1158. child tasks and all of the independent sessions that were started by ATS during 
  1159. the current ATS session.
  1160.  
  1161. The following information is displayed for each invoked task:
  1162.  
  1163. *    Task Name
  1164. *    Start Date and Time
  1165. *    Session ID (000 for Independent Sessions)
  1166. *    Process ID (0000 for Independent Sessions)
  1167.  
  1168. Tasks invoked as child sessions will be automatically removed from the Running 
  1169. Tasks display window when they terminate. Tasks invoked as independent 
  1170. sessions will remain in the display until ATS is shut down.
  1171.  
  1172. To toggle the Running Tasks display window on or off:
  1173.  
  1174. *    Select Windows from the main ATS menu.
  1175. *    Select Running Tasks from the Windows menu
  1176.  
  1177. The keyboard short cut key is: Alt+R
  1178.  
  1179. 10.4.    Tiling
  1180.  
  1181. When you select the Tiling option on the Windows menu, ATS will divide the 
  1182. vertical space in the ATS screen evenly and stack each of the visible windows one 
  1183. on top of the other with each window being the full width of the ATS window.
  1184.  
  1185. The order of stacking is constant. The ATS Log window, if visible, is always on 
  1186. the top. The ATS Running Tasks window, if visible, is always on the bottom. The 
  1187. ATS Status window, if visible, is on the top if the ATS Log window is not visible, 
  1188. on the bottom if the ATS Running Tasks window is not visible, and in the middle 
  1189. if all three windows are visible.
  1190.  
  1191. When the ATS main window is re-sized, the display windows will be 
  1192. automatically re-tiled.
  1193.  
  1194. To tile the display windows:
  1195.  
  1196. *    Select Windows from the main ATS menu.
  1197. *    Select Tile from the Windows menu.
  1198.  
  1199. The keyboard short cut key is: Alt+T
  1200.  
  1201. 11.    Signaling Events from Outside of ATS
  1202.  
  1203. 11.1.    ATSSGNL.EXE
  1204.  
  1205. ATSSGNL is a supplied executable that will flag a Signal Event as having 
  1206. occurred. The syntax for ATSSGNL is as follows:
  1207.  
  1208. ATSSGNL eventname
  1209.  
  1210. where eventname is the name of the event that you want to signal to ATS as having 
  1211. occurred.
  1212.  
  1213. Note:    ATS is case sensitive. If you define an event name in upper, lower, or 
  1214. mixed case, you must supply the text in the eventname parameter in the 
  1215. same case to the ATSSGNL command.
  1216.  
  1217. 11.2.    ATSRSET.EXE
  1218.  
  1219. ATSRSET is a supplied executable that will reset all Signal Event dependencies 
  1220. for a given task, reset a specific Signal Event for all tasks that are dependent upon 
  1221. it, or reset a specific Signal Event for a particular task. The syntax for ATSRSET is 
  1222. as follows:
  1223.  
  1224. ATSRSET T taskname
  1225.  
  1226. ATSRSET E eventname
  1227.  
  1228. ATSRSET B taskname eventname
  1229.  
  1230. where taskname is the name of the task that you want affected and eventname is the 
  1231. name of the event that you want affected.
  1232.  
  1233. ATSRSET works as follows. If you specify ATSRSET T taskname, all Signal Events 
  1234. for the named task will be reset as if they have not occurred. If you specify 
  1235. ATSRSET E eventname, the named Signal Event will be reset for all tasks that are 
  1236. dependent upon it as if it had not occurred. If you specify ATSRSET B taskname 
  1237. eventname, the named Signal Event will be reset for the named task as if it had 
  1238. never occurred. 
  1239.  
  1240. Note:    ATS is case sensitive. If you define a task name in upper, lower, or mixed 
  1241. case, you must supply the text in the taskname parameter in the same case to 
  1242. the ATSSGNL command.
  1243.  
  1244. Note:    ATS is case sensitive. If you define an event name in upper, lower, or 
  1245. mixed case, you must supply the text in the eventname parameter in the 
  1246. same case to the ATSSGNL command.
  1247.  
  1248. 11.3.    ATSSGNLD.DLL
  1249.  
  1250. ATSSGNL is a dynamic link library that contains one API. The format of the API 
  1251. is as follows:
  1252.  
  1253. ATSSignalEvent(char[]);
  1254.  
  1255. ATSSignalEvent returns a ULONG and expects a null terminated string as input. 
  1256. The null terminated string is the name of the Signal Event that is to be flagged as 
  1257. having occurred.
  1258.  
  1259. Note:    ATS is case sensitive. If you define an event name in upper, lower, or 
  1260. mixed case, you must supply the text in the eventname parameter in the 
  1261. same case to the ATSSGNL command.
  1262.  
  1263. The possible return codes that ATSSignalEvent returns are listed in 
  1264. ATSSGNL.H.
  1265.  
  1266. ATSSignalEvent provides the same functionality as ATSSGNL but has the 
  1267. flexibility of being inserted into a custom program.
  1268.  
  1269. 11.4.    ATSRSETD.DLL
  1270.  
  1271. ATSRSET is a dynamic link library that contains one API. The format of the API 
  1272. is as follows:
  1273.  
  1274. ATSReset(short, char[]. char[]);
  1275.  
  1276. ATSReset returns a ULONG and expects a short and two null terminated string as 
  1277. input. The short is the action code. The first null terminated string is the name of 
  1278. the Signal Event if the action code is ATS_RESET_EVENT or the name of the task 
  1279. if the action code is either ATS_RESET_TASK or ATS_RESET_LINK 
  1280. (ATS_RESET_LINK will rest a specific Signal Event for a particular task).The 
  1281. second null terminated string is the name of the Signal Event if the action code is 
  1282. ATS_RESET_LINK or a null string if the action code is either 
  1283. ATS_RESET_TASK or ATS_RESET_EVENT.
  1284.  
  1285. Note:    ATS is case sensitive. If you define an event name in upper, lower, or 
  1286. mixed case, you must supply the text in the taskname parameter in the same 
  1287. case to the ATSSGNL command.
  1288.  
  1289. Note:    ATS is case sensitive. If you define an event name in upper, lower, or 
  1290. mixed case, you must supply the text in the eventname parameter in the 
  1291. same case to the ATSSGNL command.
  1292.  
  1293. The possible return codes that ATSReset returns are listed in ATSRSET.H.
  1294.  
  1295. ATSReset provides the same functionality as ATSRSET but has the flexibility of 
  1296. being inserted into a custom program.
  1297.  
  1298. 12.    Reports
  1299. ATS for OS/2 provides the ability to produce hard copy documentation of all 
  1300. holidays, events, and tasks that are defined to the system. The reports are 
  1301. generated in the background and can be directed to any file.
  1302.  
  1303. The generated files are ASCII text that are 80 columns wide and have 58 lines per 
  1304. page. These files can be printed by using the OS/2 PRINT command.
  1305.  
  1306. 12.1.    Defined Holidays
  1307.  
  1308. The Defined Holidays report provides a list of all of the holidays that have been 
  1309. defined to ATS. The report looks very similar to the holiday list on the Define 
  1310. Holidays screen.
  1311.  
  1312. To produce the Defined Holidays report:
  1313.  
  1314. *    Select Reports from the main ATS menu.
  1315. *    Select Defined Holidays from the Reports menu.
  1316. *    Select the filethat you want the report written to.
  1317. *    Click on the OK button.
  1318. The keyboard short cut key is: Alt+H.
  1319.  
  1320. 12.2.    Defined Events
  1321.  
  1322. The Defined Events report provides a list of all of the events that have been 
  1323. defined to ATS. The report provides all of the detail that can be specified for each 
  1324. type of event. 
  1325.  
  1326. For all events, the report provides the event name, the event type, and a list of all 
  1327. of the tasks that are dependent upon it.
  1328.  
  1329. For Job Termination events, the report adds the name of the task that the event is 
  1330. dependent upon and the minimum and maximum allowed return codes defined 
  1331. for the event.
  1332.  
  1333. For File Modification events, the report adds the name of the file that the event is 
  1334. dependent upon.
  1335.  
  1336. To produce the Defined Events report:
  1337.  
  1338. *    Select Reports from the main ATS menu.
  1339. *    Select Defined Events from the Reports menu.
  1340. *    Select the filethat you want the report written to.
  1341. *    Click on the OK button.
  1342. The keyboard short cut key is: Alt+E.
  1343.  
  1344. 12.3.    Defined Tasks
  1345.  
  1346. The Defined Tasks report provides a list of all of the tasks that have been defined 
  1347. to ATS. The report provides all of the detail that can be specified for each task.
  1348.  
  1349. For all defined tasks, the report provides the task name, the type of OS/2 session 
  1350. that the program runs in, the date and time ranges during which the task is 
  1351. eligible to be initiated, the maximum number of concurrent occurrences that can 
  1352. be started by ATS, the full path to and program name of the task, the input 
  1353. parameters for the task, the working directory, for each day of the week and each 
  1354. day of the month, whether the program should not be run, run only if it falls on a 
  1355. holiday, run if it does not fall on a holiday or run regardless of if it is a holiday, 
  1356. and, for special days of the month, whether the program should be run or not be 
  1357. run.
  1358.  
  1359.             D    Don't Run
  1360.             R    Run (regardless of holiday status)
  1361.             H    Run only if it falls on a holiday
  1362.             N    Run if it does not fall on a holiday
  1363.  
  1364. To produce the Defined Tasks screen:
  1365.  
  1366. *    Select Reports from the main ATS menu.
  1367. *    Select Defined Tasks from the Reports menu.
  1368. *    Select the filethat you want the report written to.
  1369. *    Click on the OK button.
  1370. The keyboard short cut key is: Alt+K.
  1371.  
  1372. Appendices
  1373.  
  1374. A. Glossary
  1375. Dependency    A dependency is a link between an event and a task. An event can 
  1376. be a dependency for one or more tasks. A task can be dependent 
  1377. upon one or more events. Actually, an event can be defined and 
  1378. not be a dependency of any task and a task can be defined without 
  1379. having being dependent upon any event. For further information, 
  1380. refer to Section 6 Dependencies.
  1381.  
  1382. Event    An event is something that happens. This can be either a file being 
  1383. modified (File Modification), the completion of a task that was 
  1384. scheduled through and initiated by ATS (Task Completion), or 
  1385. notification that something has occurred (Signal Event). Signal 
  1386. Event notification can come from either a provided API that has 
  1387. been embedded in an application program, running the supplied 
  1388. program ATSSGNL.EXE, or from selecting SIGNAL EVENT on the 
  1389. main menu of ATS. ATS allows you to clear the flag that indicates 
  1390. that an event has occurred. There are two different ways to do this. 
  1391. They are: an API that can be incorporated into an independently 
  1392. developed application program or a supplied program, 
  1393. ATSRESET.EXE that can be executed at an OS/2 command line or 
  1394. from within a REXX or OS/2 Command procedure. For further 
  1395. information, refer to Section 4 Events.
  1396.  
  1397. Holiday    Any day of the year can be defined as a holiday. By defining 
  1398. certain days as holidays, you are then able to schedule a task to 
  1399. execute on a particular day if it is a holiday or if it is not a holiday. 
  1400. For further information, refer to Section 3 Holidays.
  1401.  
  1402. Task    A task is a program that you wish to run. The program can be an 
  1403. OS/2 full screen application, an OS/2 windowed application, or an 
  1404. OS/2 PM application. A task can be scheduled to run at a certain 
  1405. time of day, on certain days of the week, on certain days of the 
  1406. month, on holidays, or not on holidays. In addition, a task can 
  1407. optionally have an unlimited, number of dependencies. For further 
  1408. information, refer to Section 5 Tasks.
  1409.  
  1410. B. Shutting Down ATS from Outside of ATS
  1411. ATSSTOP.EXE is an executable that will cause ATS to gracefully terminate. This 
  1412. executable is provided to give you the ability to stop ATS from a rexx program, 
  1413. command file or OS/2 prompt. It is strongly advised by MHR 
  1414. Software And Consulting that this feature be used with 
  1415. extreme caution. When ATS for OS/2 is stopped, any 
  1416. program that was started by ATS for OS/2, except those 
  1417. defined to be run in an independent session, will also be 
  1418. stopped.
  1419.  
  1420. C. Shortcut Keys
  1421.  
  1422. Alt+A    Display the About screen
  1423. Alt+C    Display the Add Log Comment screen
  1424. Alt+E    Create the Events Report
  1425. Alt+F    Display the Log File screen
  1426. Alt+H    Create the Holidays Report
  1427. Alt+K    Create the Tasks Report
  1428. Alt+L    Toggle the Log display on or off
  1429. Alt+R    Toggle the Running Tasks display window on or off
  1430. Alt+S    Toggle the Status display window on or off
  1431. Alt+T    Tile the visible display windows
  1432. Ctrl+E    Display the Define Events screen
  1433. Ctrl+G    Display the Signal Event screen
  1434. Ctrl+H    Display the Define Holidays screen
  1435. Ctrl+P    Display the Preferences screen
  1436. Ctrl+S    Display the Define Tasks screen
  1437. Ctrl+T    Display the Timers screen
  1438. F3    Shut down ATS
  1439. ESC    Cancel the currently active screen
  1440.  
  1441. Lower and Upper case letters work alike.
  1442.  
  1443. D. Installing and Running ATS
  1444.  
  1445. There are no special installation instructions for ATS. Copy all of the files on the 
  1446. supplied diskette to a directory on your PC.
  1447.  
  1448. If you will not be using the programming interface to ATS, then you do not need 
  1449. any of the header (*.H) LIB (*.LIB) files.
  1450.  
  1451. If you will not be using ASTRSET or ATSSGNL then you do not need 
  1452. ATSSGNL.EXE or ATSRSET.EXE.
  1453.  
  1454. If you will not be using the programming interface or the supplied executables, then 
  1455. you do not need any of the DLL (*.DLL) files.
  1456.  
  1457. If you do not want on-line help, then you do no need ATS.HLP.
  1458.  
  1459. To run ATS, simply type ATS at the OS/2 command Prompt.
  1460.  
  1461. Note:    When you start ATS, if you are not running Watchdog by MHR Software 
  1462. And Consulting a warning message will be displayed indicating that 
  1463. Watchdog is not active. Click on the OK button. This has no effect on the 
  1464. performance or functionality of ATS. This is just to remind you that if for 
  1465. some reason ATS terminates abnormally, it will not be automatically 
  1466. restarted.
  1467.  
  1468. E. Supplied Files
  1469.  
  1470. ATS.EXE
  1471. ATS.DLL
  1472. ATS.HLP
  1473.  
  1474. ATSSTOP.EXE
  1475. ATSTOLOG.EXE
  1476. ATSSGNL.EXE
  1477. ATSRSET.EXE
  1478.  
  1479. ATSDLL.LIB
  1480. ATSDLL.H
  1481.  
  1482. F. Watchdog
  1483.  
  1484. Watchdog is a separate product that allows another program to register with it and 
  1485. if the registered product ends without canceling its registration, Watchdog will 
  1486. automatically restart that program.
  1487.  
  1488. Since ATS has been designed to be used in mission critical and lights out 
  1489. applications, it has been developed to interface with Watchdog. When ATS is 
  1490. started, it registers with Watchdog. When ATS is shut down by a user, it cancels its 
  1491. registration. If Watchdog is not active when ATS is invoked, ATS will issue a 
  1492. warning to the user that says "Watchdog is not active". It will also log this fact.
  1493.  
  1494. Watchdog is owned by MHR Software And Consulting. Further information can 
  1495. be obtained by mail at 2227 U.S. Highway #1 - Suite 146, North Brunswick, NJ 08902 
  1496. or by telephone at (908) 821-0359.
  1497.  
  1498. G. Problem Reporting
  1499.  
  1500. If you encounter a problem within ATS that you feel is a bug or ATS is not 
  1501. functioning as described in this manual, perform the following steps to report it.
  1502.  
  1503. 1    Write down any error messages that ATS provides.
  1504. 2    Make a backup copy of the file ATS.INI. This file is located in the directory 
  1505. that ATS is started from.
  1506. 3    Make a backup copy of the file ATS.DAT. This file is located in the 
  1507. directory that ATS is started from.
  1508. 4    Make a backup copy of the current ATS log file. The default log file is 
  1509. ATS.LOG and is located in the directory that ATS is started from.
  1510. 5    Print out each of the reports that ATS provides, Defined Holidays, Defined 
  1511. Events, and Defined Tasks.
  1512. 6    Review each of the reports along with the log to insure that the problem is 
  1513. not an error in scheduling.
  1514. 7    If the situation occurred while creating a holiday, event or task, write down 
  1515. the exact steps that you took leading up to the problem.
  1516. 8    Try to recreate the problem.
  1517. 9    Contact MHR Software And Consulting either by phone at (908) 821-0359, 
  1518. or on CompuServe at 70312,627.
  1519. Note:    If you report a problem, please be prepared to provide all of the information 
  1520. and results gathered in the above steps.
  1521.