SCHEDULE
Automated Job Submission System
Guide and Reference Manual


Previous Contents Index

4.6.2 The edjob command

You can also change the prerequisite or initiate list or the job command list by using the editor.

The command format is


 
 
Schedule> edjob job_name -qualifiers 
 
 

Some of the commonly used qualifiers are listed below.
Qualifier Description
-commands Edit the commands
-prerequisites Edit the prerequisites
-initiates Edit the initiates

4.7 Looking at jobs

There are three commands for looking at particular parts of schedules:
Command Description
lsjob displays information about the schedule on-line
more types out the various list sections that can be associated with a job definition

4.7.1 The lsjob command

The lsjob command allows you to create a line display of certain fields of the schedule or the full display.

The full display mode is used to display all the information about a single job by using the qualifier -full, in the format:


 
 
Schedule> lsjob job_name -full 
 
 

For example listing out all the attributes of one of the demonstration jobs2 use the following command.


 
 
Schedule> lsjob -full /demo/a/start 
 
/demo/a/start 
 
 
 
General 
    Comment                   = Demonstration test job 
    Next submit               = Not set 
    Last submit               = December  4, 2002, 16:04 
    Last start                = December  4, 2002, 16:05 
    Last completed            = December  4, 2002, 16:07 
    Up count                  = 480 
    Down count                = infinite 
    Restart count             = 3 
    Status                    = %x00030001 
    Flags                     = History 
    Job tag                   = 
    Pre COM file              = 
    Post COM file             = 
    Startup window            = Not set 
    Execute window            = Not set 
    Owner                     = johndoe 
    Protection                = -rwxrwxrwx 
 
Rescheduling 
    Interval                  = 0-04:00:00.00 
    Calendar                  = WORKDAYS 
 
Job 
    User                      = pjones 
    Shell                     = /bin/csh 
    Node                      = osfws1 
    Flags                     = Delete,Keep 
    Log file                  = 
    Name                      = 
    Parameter                 = "","","","","","","","" 
    Resident set size         = 0 
    CPU time limit            = Not set 
 
Resources 
    Disk space                = ,0 
    File                      = 
    Measured                  = 3,137,249,468 
    Estimated                 = 0,0,0 
 
Notify 
    Submitted                 = 
    Started                   = 
    Completed                 = 
    Failed                    = JOHNDOE,Mail 
    Delayed                   = JOHNDOE,Mail 
    After delayed             = 0-00:04:00.00 
 
 

The line display mode can be used to display any of the fields associated with a job definition. You can show one or more columns of information about job definitions by specifying a qualifier or series of qualifiers for the SCHEDULE DIRECTORY command, in the format:


 
 
Schedule> lsjob job_name -qualifiers 
 
 

The job name can include wildcard characters3. There is a complete list of qualifiers in the Reference Section. The qualifiers you will most likely want to use are listed in the following table.
Qualifier Description
-gen=comment Display the description.
-gen=restart Display the number of automatic restarts allowed if the job fails.
-gen=next_submit Display the next date and time that a job will be submitted for execution.
-sub=queue Display the name of the batch queue to submit the job into.
-sub=parameter Display the parameter values to pass to the job when submitting the job.
-rescheduling Display the rescheduling parameters.

An example of a line display follows:


 
 
Schedule> lsjob update* -gen=(comment,next_start) 
 
Job directory /GL_PROCESSING/ 
 
 
UPDATE          Daily Newsletter Update        January 20, 2002, 13:00 
UPDATE_LEDGER1  Daily Update of General Ledger Not set 
UPDATE_LEDGER2  Weekly Ledger Printout         February 3, 2002, 10:00 
UPDATE_LEDGER3  Monthly General Ledger Report  January 23, 2002, 15:30 
UPDATE9         Upgrade Price list             Not set 
 
Total of 5 
 

4.7.2 The more command

The more command will type to the screen the command list, initiate list, prerequisite list, or any other list of a job definition. The command format is:


 
 
Schedule> more job_name -qualifier 
 
 

You indicate which list associated with the job definition is to be displayed on the screen by adding a qualifier (-commands, -initiate or -prerequisites). The default qualifier is -commands.

For example, to look at the prerequisite list of the job UPDATE_LEDGER1, you enter:


 
 
Schedule> more update_ledger1 -prerequisites 
 
/smith/update_ledger1.prequisites 
 
 

The screen would then displays:


 
    DEPTQRY1 
    DEPTQRY2 
    DEPTQRY3 
    DEPTQRY4 
    DEPTQRY5 
 

Note

2 The demonstration jobs are NOT automatically loaded during installation. To load them, if you have not done so already, issue the following command ????????????????

3 The wildcard characters are an asterisk * and a percent sign %

4.8 Looking at calendars

To view what calendars are defined entered a command of the following format:


 
 
Schedule> lscal calendar_name 
 
 
 
Schedule> lscal /default/* 
 
Calendar directory /default/ 
 
 
 
HOLIDAY            STANDARD            WORKDAYS 
 
Total of 3 calendars 
 

4.9 Looking at directories

To view what directories you may have use a command of the following format.


 
 
Schedule> lsdir dir_name 
 
 
 
Schedule> ls * 
 
 
Directory entries in /system/ 
 
/system/subdir1/   /system/subdir2/      
 
 
Total of 2 directories 
 

4.10 Looking at history data

Each job as it progresses through the SCHEDULE System, it makes a series of queue changes (e.g. `Ready to submit', `Completed', etc.). Each queue change is recorded in the historical data file3.

To view historical data about a particular job use a command of the following format.


 
 
Schedule> cathist job_name 
 
 
 
Schedule> cathist /demo/a/start -queue=(r,u) 
 
/demo/a/start 
 
 
 
   December  4, 2002, 16:07 R  Msg comp 
   December  4, 2002, 16:05 U  Msg started 
   December  4, 2002, 16:03 U  Msg started 
   December  4, 2002, 16:01 U  Msg started 
   November 29, 2002, 11:28 R  Msg comp 
   November 29, 2002, 11:26 U  Msg started 
   November 29, 2002, 09:50 R  Msg comp 
   November 29, 2002, 09:42 U  Msg started 
   November 29, 2002, 09:41 U  Msg started 
   November 27, 2002, 12:11 R  Msg comp 
   November 27, 2002, 12:03 U  Msg started 
   November 27, 2002, 09:22 R  Msg comp 
   November 27, 2002, 09:08 U  Msg started 
   November 27, 2002, 08:39 R  Msg comp 
 
 
Schedule> cathist /demo/a/start -full -queue=r 
 
/demo/a/start 
 
 
 
February  3, 2002, 10:44  R  Msg comp   86. /demo/a/start (2026) 
    step:0 tag:"" param:"" 
    node:MWS queue:MWS$BATCH entry:133 
    strt:February  3, 2002, 10:41  Sts:00030001 
CPU:3 Elps:134 IO:257 Flts:1877 Ppg:4733 
February  3, 2002, 10:36  R  Msg comp   89. /demo/a/start (2025) 
    step:0 tag:"" param:"" 
    node:MWS queue:MWS$BATCH entry:127 
    strt:February  3, 2002, 10:34  Sts:00030001 
CPU:3 Elps:136 IO:277 Flts:1822 Ppg:4733 
January 30, 2002, 17:01   R  Msg comp  695. /demo/a/start (1989) 
    step:0 tag:"" param:"" 
    node:MWS queue:MWS$BATCH entry:996 
    strt:January 30, 2002, 16:59   Sts:00030001 
CPU:3 Elps:137 IO:272 Flts:1680 Ppg:4735 
January 27, 2002, 11:51   R  Msg comp  125. /demo/a/start (1957) 
    step:0 tag:"" param:"" 
    node:MWS queue:MWS$BATCH entry:666 
    strt:January 27, 2002, 11:48   Sts:00030001 
    CPU:3 Elps:149 IO:283 Flts:1691 Ppg:4731 
 

The U (Job started event) and the R (Job completed event) are the most useful. All transistions are recorded and they can be used to identified exactly what order and at what time a certain event took place.

Note

3 The historical data is deleted after a period that is specified in the parameter file. The default value is 30 days.

4.11 Monitoring activity

To monitor a jobs progress through the system use a command of the following format.


 
 
Schedule> monque -queue_letter 
 
 
 
Schedule> monque 
 
 
K  Submitted   650. START (1587)    Execution queue entry 789 
L  Started     650. START (1587)    Execution queue entry 789 
M  Completed   650. START (1587)    Completed on December 16, 2002,14:33 
B  Wtfr start  287. UPDATE_A (1587) Holding until December 17, 2002,15:00 
B  Wtfr start  669. UPDATE_B (1587) 
E  Wtfr prereq 287. UPDATE_A (1587) 
H  Wtfr file   287. UPDATE_A (1587) Waiting for file INDATA1.DAT 
I  Wtfr disk   287. UPDATE_A (1587) Waiting for 1000 blocks on DUA1: 
E  Wtfr prereq 669. UPDATE_B (1587) 
H  Wtfr file   669. UPDATE_B (1587) Waiting for file INDATA2.DAT 
 

All the events displayed by the monitor represent scheduling queue changes. Each one of these events is also recorded in the historical data file. To replay any series of events use the cathist command.

4.12 Other Schedule commands

This section describes some other SCHEDULE commands that you may find useful. They are listed in the following table.
Command Description
subjob submits the job for immediate execution regardless of any parameters
rmjob permanently removes a schedule definition from the on- line database

4.12.1 The subjob command

The subjob command causes a job to be considered for immediate submission. There are three qualifiers, in addition to the general qualifiers, that can be applied to the command. They are listed in the following table.
Command Description
-prerequisite The job will be submitted as soon as all prerequisites are met. The default is to not check prerequisites.
-initiates After the job completes all initiate jobs are activated. The default is not to trigger initiates.
-after=date The job is submitted for execution after the indicated date and time

For example, you want to submit UPDATE_LEDGER1 to run as soon as all the prerequisite jobs were completed without waiting for the normal start time, just enter:


 
 
Schedule> subjob update_ledger1 -prerequisites 
 
 

4.12.2 The rmjob command

The rmjob command permanently removes a job definition from the SCHEDULE database, using the command format:


 
 
Schedule> rmjob job_name -qualifiers 
 
 

The only qualifiers that can be used with this command are LOG and CONFIRM. It is a good idea to always use the CONFIRM qualifier with the DELETE command so that you do not delete the wrong job due to a typing error.

4.13 Using scripts

All the supplied environment variables are designed to be similar to UNIX commands and can be used in scripts in any fashion that is appropriate. Whenever the SCHEDULE System submits a job for execution it creates a temporary command file.

The commands in these files can use certain symbols to coordinate and control the job execution.

The various environmental variables are:
Symbol Meaning
SCHEDULE_FULL_NAME job name and directory
SCHEDULE_NAME just the job name
SCHEDULE_SET_ID current job set id
SCHEDULE_SET_TAG current tag value
SCHEDULE_SET_PARAMETER current parameter value
SCHEDULE_STEP current job step value
SCHEDULE_ENTRY scheduling entry number
SCHEDULE_RESTARTING 0/1 restarting flag
SCHEDULE_RESTART_COUNT number of restarts done
SCHEDULE_RESTART_LIMIT max allowed restarts


Previous Next Contents Index