J O B A B O T

USING JOBABOT

 Depending on your installation Jobabot may start when you double click on the REFLECTION icon.  Regardless Jobabot can be started or stopped from the REFLECTION tool bar by clicking on the Jobabot face and you can stop Jobabot or any reflection macro by clicking on the stop-a-bot button.   There may be a few more Jobabot buttons too: for Job Control,: for system ID, for LOGOFF.  Job Control and ID are also available from the Jobabot Control panel, these as well as logoff may or may not be installed on your REFLECTION tool bar.

 Click on the Jobabot face to bring up the Jobabot Control panel.

From this panel all functions of Jobabot are accessed.  Lets take a tour using the above illustration as a guide.

VIEW GROUP 

(view group)

Starting at the top left had section of the screen is a drop box with a file name '980428.TDL' the eight numbers are a date in the format YYMMDD and the TDL is short for Today's Log, moving down there is a group of buttons under the title 'View" Note that TODAYS LOG is selected.  The bottom half of the panel is the text box where you can view TODAYS LOG file "980428.TDL'. The log files are presented in 'REVERSE ORDER' So we see ' Log opened:' at the bottom of the screen, in this way the latest events will automatically be visible.

DROP BOX SELECTOR

To make a selection from the drop box click the small down pointing arrow to the right of the box.  In the example above the selector is in the top left part of the screen and contains the letters '980428.TDL". When you click, a larger box drops down over the view section below and displays a list of file names. clicking one of these file name make that file the current selection.  If there are more selections than can be displayed you must use the slide bar on the right side of the window or the page down/up or up/down cursor keys to find the selection you want.  You may not type numbers and/or letters to find the file or create a new one.

TODAYSLOG

 This selection allows the display of TDL files, each day as Jobabot goes about it's business it writes to a log file all of the important information about the jobs it is working on.  With this selection made, the drop box selector will show only TDL files.

JOBLOG

This selection allows the display of all files with the extension name LOG.  Most of these files are job logs, that is they contain information about each job.  Where today's log shows activity about all jobs for single day, job logs contain information only about one job but for all dates.  Each job you create and run in Jobabot will have a job log named after ft. In the example above the display shows 'todays log' Reading the log you see entries for two jobs named: DAILY and BKPMIS, both of these jobs have job logs named DAILY.LOG and BKPMIS.LOG respectively.  These logs contain more detailed information about each job run, if something didn't go right with one of your jobs you should look in the job log for more information.

You may receive a warning message in TODAYS LOG to look in the JOB LOG in connection with a specific job.  In this case the warning message will give you a numeric error level.  Single place error levels are usually not fatal to your job, double place errors indicate a more serious condition that may cause your job to fail when it runs, while three place codes usually means that Jobabot can't find requested input files for your job.

For each occurrences of one of these errors Jobabot adds an additional unit to the total error code, the error message you receive in TODAYS LOG will express the sum of the error codes.  For example a level one error is a (1) a level 2 error is a (1 0), and a level 3 error is a (I 00) so if you have three of each errors Jobabot will report an error code of (333).  Errors are written in the loge with a stared (*) line above and below to make R easy find them in the log.

Example:

*
Warning: INPUT FILE BCS305.BKP.9903.SAS NOT FOUND ON SYSTEM
*
 

JOB CONTROL

This selection displays the raw job control data, you can view and edit this information using the Job Control Edit Panel.  This choice is just an easy way to quickly review the settings JOB files that you have previously defined.

HOUSEKEEPING GROUP


(housekeeping group)

Top center of the screen is the Housekeeping group, these controls set the parameters for Jobabot's Housekeeping function.  Housekeeping is how Jobabot refers to R's automated process of checking on jobs, writing submission scripts, running programs, downloading output, and rescheduling jobs etc.  When Jobabot does housekeeping ft writes down everything ft does in a log and displays ft for you when the housekeeping routine is completed.

 MANUAL / AUTOMATIC

 Jobabot has two modes for control of the housekeeping routine, Manual means that the routine is only performed when you click OK.  Automatic allows Jobabot to run the routine at a regular interval and during a time of day of your choosing.

 DO EVERY, MIN / HOUR, START, STOP

 These four controls tell Jobabot when and how often to do the housekeeping routine.  Do Every: must be a whole number this parameter works in conjunction with the MIN/HOUR control to tell Jobabot how often to do the housekeeping.  Generally when Do Every is expressed in hours values from 1-8 are the most useful, when using minuets expression of less than 30 min. may not be of much use except in testing, you may however wish to use 90 Min. f6r 1-1/2 hours and the like.

 START and STOP are expressed in 24Hour clock all places must be present and no more.  Jobabot will not run automatically run housekeeping outside of the times listed in these parameters, if the current time plus the Do Every MIN/HOUR number is greater than the STOP time Jobabot will schedule the next housekeeping at the START time.  Don't expect Jobabot to perform on the hour or half hour as the time for the next housekeeping is computed from the exact time that the last housekeeping was completed.

 CHECK

 Contained within the Housekeeping group is the check group, these check boxes are options that can be selected or deselected with the click of a mouse.

 ON EXIT,

 When On Exit is checked Jobabot performs an "extra' housekeeping when you click OK, even if the next one is not scheduled for hours later or even if the current time is not within the start and stop times.

 LOG OFF

 When Log Off is checked Jobabot will log off the host at the end of each housekeeping cycle.  When ft is not checked Jobabot does not log off and leaves the host at the last ISPF screen it was using, the advantage is that you may use the same host session while Jobabot is in between Housekeeping.

 HIDE

 When Hide is checked Jobabot will hide the Jobabot Control panel during housekeeping.

 NEW JOBS

 When New Jobs is checked Jobabot will include the processing of submitting new jobs during housekeeping.

 SUBMITTED

When Submitted is checked Jobabot will check on jobs previously submitted during housekeeping.

DOWNLOAD

When Download is checked Jobabot will attempt to download output from completed jobs.  This control may be grayed (inactive) if your Jobabot doesn't have this feature.

 

MESSAGE AREA 


(message area)

 Just below the Housekeeping group is the message area.  On the example is the message:

Next Housekeeping @ 12:44:28 PM

When you change the Start, Stop, or Do Every numbers and click in one of the boxes; the next housekeeping time is computed and displayed in the message area.  If you have manual checked, the message is: Next housekeeping when you click OK.

OTHER CONTROLS

DATE / TIME

Under the red and green Jobabot logo the current date and time is displayed, if you are Using Jobabot in the manual mode only the date is displayed.

OK

 The OK button saves the current Jobabot settings and will hide the current windows and do a housekeeping (or NOT) depending on the setting in the CHECK GROUP.  For example if you have HIDE, ON EXIT, LOGOFF, and AUTOMATIC selected and click OK Jobabot will, hide the control panel, do a housekeeping, log off the host system, save your last settings and continue running in the background and wake up at the next scheduled housekeeping time.

CANCEL

This button stops the Jobabot and does not save your current settings, nothing else happens regardless of what is selected.  When Jobabot is running in the background you can stop Jobabot from the REFLECTION tool bar by clicking on the stop-a-bot icon or from the REFLECTION menu by selecting SCRIPT then STOP.

EDIT JOBS

Clicking on this button takes you to the Jobabot JOB CONTROL functions, this will be covered in depth in the ext section.

SYSTEM ID

This button pops up the Password and UserlD setup

:

You may change any currently defined system by selecting it, making the changes and clicking OK.  You can add a new SYS: simply by typing in the information and clicking OK.

Note:  The SYS: letter does not have to agree with the actual system letter.  You may have a need to define a SYS: that uses the same HOST logon l(i.e. TSOK) but, for a different user ID.  This is especially true if Jobabot is being run on a standalone machine and is running jobs for several users, projects, or departments.

Automation with Jobabot Job Control

You can get to the Job Control functions by clicking on the . from the REFLECTION tool bar or from the Jobabot Control panel by clicking on the EDIT JOBS button.  You will first encounter the following dialog box:

 

Click on a.jpb name to select that job.  For a new job simply type the new name in the space provided.  Note that you may DELETE jobs from this panel.  Clicking OK takes you to the Job Control Editor for the job you have selected or the new job you are creating.

 

JOB CONTROL EDITOR

From this screen you can control all aspects of how JOBABOT runs your job.

Starting from the top left of the screen; the parameters that control your job are:

NEXT RUN

This date tells Jobabot when to run your job.  If this date is today or if this date has passed Jobabot will try to run your job.  If this date is in the future Jobabot will pass over your job.  Jobabot looks at each job every time the housekeeping function is performed, so if you change this date to today's date or some past date in the middle of the day Jobabot will try and run that job as part of the next housekeeping routine.

NOTICE: the NEXT RUN date information must be entered in as MM DD YY and each box that hold a parameter must have exactly two characters i.e. 01 not simply 1, you will also get an error for an extra space or other extra character.  If you wish to put a job on hold you can use 00/00/00 and Jobabot will ignore your job.

When your job runs with a zero return code Jobabot reschedules your job for next month or day automatically.

MONTHLY TARGET DAY

This box contains the date of the month that Jobabot is to start running your job.  For monthly jobs that number should be from 1 to 28 because not all months have 29, 30, and 31st days.  Jobabot will stop running trying to use one of these dates in a short month.  You may choose not to have Jobabot reschedule your job at all by using 00 for this parameter, this is useful if you want Jobabot to run your job on specific dates, you can define a job control file for each time you want Jobabot to run the job and use 00 so that Jobabot will delete the job control file after the job has run., All of these files may use the same script.

 For daily jobs the token DD can be used here, this causes Jobabot to reschedule the job for the next days date after ft runs.  NOTE: The rescheduling will not work properly if your job does not start and end all in the same day.

CURRENT GENERATION

When Jobabot encounters a month and/or year token [MM], [YYI, "MM] or [MMYY] ft looks at this parameter to determine what the values should be.  Each job may use a different value for the 'Current Generation".  This can be useful to recreate user files that a monthly job may need.  For example you can setup three jobs all running the same script but the current generations in each job control file could be defined as 1) three month in the past 2) six months in the past, and 3) 1 year in the past.  When these jobs run Jobabot will reschedule the jobs for next month and advance the current generation by one month.

TIME-24

In the example this is set for 1 min. after midnight, Jobabot will waft to run your job after the time of day listed here.  Time-24 is not considered in conjunction with the date, that is even if the date is well in the past Jobabot will still not try and run your job until after the time of day in Time-24.

PREFIX(S

The first prefix listed here should be the user id that the job will be run under.  Jobabot looks at secondary userID's only in the case of input files when writing a submission script.  You can use as many as you need here each one should be separated with a slash rexample: BCSS305/UCHXO45/BCV32

CHECK FOR FILE

 This is one of the most powerful features of Jobabot and can give you a real 'edge' in getting your monthly data on time.  This parameter allows Jobabot to run your job only when the file listed is present on the system.  This can be used to check for system files or user files and you can check for just one file or if you check the check box labeled:

Check on a long list of files

You can have Jobabot check on up to twelve files or more before it runs your job.  To create the list click the button labeled:  EDIT on the same line.

You will then see the 'edit list' screen:

This screen has only twelve slots for fi/e names (the whole screen is not shown) if you need more you can edit the file in your word processor and add as many as you need.  This fi/e names use tokens (of course) and have some additional syntax rules that allow you to do define some additional useful specifications regarding what Jobabot should do when checking for these riles.

FILE CHECKJNG SYNTAX:

PREFIX.XXX.XXX.[MMYY]

Jobabot will check for one file under the first listed user ID in the "PREFIX" for the MM and YY parameters listed in the current generation for this job.

4/SYSTEM.XXX.XXX.*.XXX

Jobabot will not run your job until at least 4 matching files exist on the system.

O/USERID.XXX.XXX.[MMYY-3].XXX

Jobabot runs your job only if this file does not exist.  If the file is present on the system Jobabot will reschedule your job for next month (or day if a day job)

#/356/USERID.XXX.WK[###].SAS

Your job will run when a file with a [###] greater than 356 exists on the system

#/I 678/SYSTEM.XXX.G[####]VOOO

This is a system generation named file works the same as the previous example, in both cases Jobabot tracks the last used number.

SCRIPT

The script name is normally the same as the Jobabot 'Job' name but it can be different, don't use extensions here just the first name of the script that the job is to use.

SYSTEM

The single system letter as defined in the 'System ID' editor, only one letter.  Jobabot will logon to the system defined with the user id and password for each job as necessary.

# OF TRYS

This slot can contain a simple numeric value like 3 for 'try three times then give up and reschedule for tomorrow" or a time of day to 'give up' expressed in the 24 hour clock syntax.

 DOWNLOAD

 Jobabot can download your results from the host system to your PC automatically, just list the name of the file here.  All of the same rules apply to filenames as with for 'check for file'.  Including.

Download a long list of files

See check for file.

EDIT

See check for file.

SPAWN

This feature is for additional automation with Jobabot, the name of a program is inserted here. This program will be called when the job is complete and the data is downloaded to your PC. Further automation is often done using the Excel spread sheet to format the data and the email client to distribute the report.

 

NEXT >