Unicenter CA-Scheduler Job Management for VSE User Guide

Unicenter CA-Scheduler Job Management for VSE User Guide Unicenter CA-Scheduler Job Management for VSE User Guide

supportcontent.ca.com
from supportcontent.ca.com More from this publisher
03.03.2015 Views

7.3 Issuing Online Commands in Batch 7.3 Issuing Online Commands in Batch A utility program (CAJUCMD0) is provided with Unicenter CA-Scheduler that allows you to: ■ ■ ■ ■ ■ Send operator messages to system console Issue Unicenter CA-Scheduler operator commands Issue VM commands (if you are running under VM) Issue POWER commands Issue CICS CEMT commands or start user transactions 7.3.1 Transaction Format When you combine the facility with some language flexibility, you have considerable power. For example, you could test the condition code of a step in the middle of a job and based on its setting cause some other job or schedule to be released to run. Or if a particular job was submitted before this job, you could place some other job on hold. There are a whole set of status conditions that you can check. These are described later. A more detailed discussion on the format and use of this facility exists in the chapter "Unicenter CA-Scheduler Commands in Batch Mode" in the Unicenter CA-Scheduler Reference Guide Part 1. There are six types of transactions, you have to tell the CAJUCMD0 program which type you are describing which you do by prefixing each transaction with a two-digit code as follows: Prefix MO SC CP PW CI DM Transaction Type Send the following text to the operator console. Issue the following Unicenter CA-Scheduler operator command, which can include the conditional batch IF statement. Issue the following VM command. Issue POWER commands. Issue CICS Transactions. Issue commands stored in the documentation library. 7-10 Unicenter CA-Scheduler User Guide

7.3 Issuing Online Commands in Batch The preceding commands can be executed conditionally based upon the setting of a global parameter or the status of a schedule or job. This introduces the SC transaction that is used with the IF statement. The IF statement can even have AND, OR, and NOT keywords. For example: Transaction: SC IF JOBA INTRPTD SC STATUS S=PAYSCHD Read as: The job that is executing CAJUCMD0 right now wants to determine if the job JOBA is in an interrupted status. If it is, Unicenter CA-Scheduler will print the status of the schedule PAYSCHD and all its jobs. The following describes using the NOT keyword. Transaction: SC IF JOBA NOT COMPLETE SC HOLD J N=JOBB Read as: 7.3.2 Status Checking The job that is executing CAJUCMD0 right now wants to determine whether or not JOBA completed. If it has not, Unicenter CA-Scheduler will place JOBB in HELD status. In the previous examples, the portion of the IF statement that reads JOBA INTRPTD and JOBA NOT COMPLETE is called a condition. There can be more than one condition in an IF statement. In this case, they would be separated by an AND or an OR keyword. If the condition pertains to a schedule or job, the right-hand part of the condition is the status to check against. If you are looking at a global, the right-hand part is the value of the global you want to check. There are two levels of status codes. The major level is a code such as INTRPTD or COMPLETE (as in the previous examples). This is termed the major status code. There are some major status codes that can be optionally qualified with a minor status code. An example of a major status code with a minor status code would be WAIT PRED. WAIT is the major status code and PRED is the minor status code. One example is asking if a schedule or job is in a WAIT status for predecessors. Another example is WAIT START, which is asking if a schedule or job is waiting for its early start time to be met. Chapter 7. Techniques 7-11

7.3 Issuing Online Commands in Batch<br />

The preceding commands can be executed conditionally based upon the setting<br />

of a global parameter or the status of a schedule or job. This introduces the SC<br />

transaction that is used with the IF statement. The IF statement can even have<br />

AND, OR, and NOT keywords. For example:<br />

Transaction:<br />

SC IF JOBA INTRPTD SC STATUS S=PAYSCHD<br />

Read as:<br />

The job that is executing <strong>CA</strong>JUCMD0 right now wants to determine if the job<br />

JOBA is in an interrupted status. If it is, <strong>Unicenter</strong> <strong>CA</strong>-<strong>Scheduler</strong> will print the<br />

status of the schedule PAYSCHD and all its jobs.<br />

The following describes using the NOT keyword.<br />

Transaction:<br />

SC IF JOBA NOT COMPLETE SC HOLD J N=JOBB<br />

Read as:<br />

7.3.2 Status Checking<br />

The job that is executing <strong>CA</strong>JUCMD0 right now wants to determine whether<br />

or not JOBA completed. If it has not, <strong>Unicenter</strong> <strong>CA</strong>-<strong>Scheduler</strong> will place JOBB<br />

in HELD status.<br />

In the previous examples, the portion of the IF statement that reads JOBA<br />

INTRPTD and JOBA NOT COMPLETE is called a condition. There can be<br />

more than one condition in an IF statement. In this case, they would be<br />

separated by an AND or an OR keyword. If the condition pertains to a<br />

schedule or job, the right-hand part of the condition is the status to check<br />

against. If you are looking at a global, the right-hand part is the value of the<br />

global you want to check.<br />

There are two levels of status codes. The major level is a code such as<br />

INTRPTD or COMPLETE (as in the previous examples). This is termed the<br />

major status code. There are some major status codes that can be optionally<br />

qualified with a minor status code. An example of a major status code with a<br />

minor status code would be WAIT PRED. WAIT is the major status code and<br />

PRED is the minor status code. One example is asking if a schedule or job is in<br />

a WAIT status <strong>for</strong> predecessors. Another example is WAIT START, which is<br />

asking if a schedule or job is waiting <strong>for</strong> its early start time to be met.<br />

Chapter 7. Techniques 7-11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!