Automatically Create a Unique zOS Command ID Using CA-Driver Variables
Automatically Create a Unique z/OS Command ID Using CA-Driver Variables
CA provides variable functionality via CA-Driver. (Refer to the CA manuals for instructions on variable usage.)
CA-Driver variables specific to CA-7, such as the following, can be used to create a unique cmdid. (Refer to the CA documentation for a complete list of CA-Driver variables available for CA-7 and CA-Scheduler.)
- &C_L2JN is the CA-7 Job Name
- &C_L27# is the CA-7 Job Number
- &C_L2DOD is the Due Out Date for this Job execution.
One Procedure should be placed in the CA-Driver Procedure library.
The following example illustrates a CA-Driver Procedure using the above system variables to create a unique command ID.
//DRVRUCMD DPROC REMOTEJOBNAME=UCMD -cmdid '&REMOTEJOBNAME.&C_L2JN.&C_L27#.&C_L2DOD'
Each step that executes UCMD should reference this procedure in order to create the unique UCMD cmdid as the first parameter within the UCMD SYSIN DD statement. This procedure defaults the cmdid to the values defined by one user variable called remotejobname and 3 CA-7 variables.
(See the following examples.)
Example 1
The following example illustrates how to call the PROC DRVRUCMD from within the UCMD SYSIN DD statement.
The variables set in the DRVRUCMD PROC are set to the following for this example:
- &C_L2JN = PRD00001
- &C_L27# = 0030001
- &C_L2DOD 03265
- &REMOTEJOBNAME = UCMD (default value in Driver Procedure DRVRUCMD)
//S1 EXEC UCMDPRC //SYSIN DD * //CALL EXEC PROC=DRVRUCMD,REMOTEJOBNAME= -cmd command -host hostname -userid username -pwd password -managerft yes -restart auto /* Expanded Results: //S1 EXEC UCMDPRC //SYSIN DD * -cmdid UCMDPRD000010030001032625 -cmd command -host hostname -userid username -pwd password -managerft yes -restart auto /*
Note
If the cmdid identifier contains spaces, it must be enclosed in either single ( ' ) or double ( " ) quotation marks.
Example 2
The following example illustrates how to override the variable value for REMOTEJOBNAME in the CALL step.
//S1 EXEC UCMDPRC //SYSIN DD * //CALL EXEC PROC=DRVRUCMD,REMOTEJOBNAME=unixpayrolljob1 -cmd command -host hostname -userid username -pwd password -managerft yes -restart auto /* Expanded Results: //S1 EXEC UCMDPRC //SYSIN DD * -cmdid unixpayrolljob1PRD000010030001032625 -cmd command -host hostname -userid username -pwd password -managerft yes -restart auto /*
Note
If the cmdid identifier contains spaces, it must be enclosed in either single ( ' ) or double ( " ) quotation marks.
SYSIN Options
The SYSIN options used in these examples are:
Option | Description |
---|---|
Command to execute on the remote system. | |
Host name or IP address of the remote system on which to execute the script. | |
Remote user ID with which to execute the command. | |
Password for the user ID. | |
Specification for whether or not the Manager Fault Tolerance (MFT) feature is used. A value of yes specifies that MFT should be used. | |
Unique command ID associated with the remote unit of work. | |
Specification for whether or not the manager is requesting restart. A value of yes indicates the Manager is being restarted. |
Components
Universal Command Manager for z/OS