This call submits JCL to the JES internal reader for execution. The JCL is contained in a sequential data set or PDS member, or is passed to $DSCALL in variables.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=SUBMIT
{ DSN=dataset_name |
VARS=prefix
RANGE=(a , b) }
Operands:
Submits the JCL.
Specifies the name of the PDS or sequential data set containing the JCL. If the data set name is a PDS, a member name must be specified.
The variable name prefix of the variables that contain the JCL.
Note: If VARS= is specified, the relevant variables must be shared to $DSCALL, for example, using &CONTROL SHRVARS. The variable names are assumed to be prefixa, prefixb,..., prefixn.
The numeric range (of the variable name suffix) for the variables containing the JCL. This operand is valid, and is required, only when the VARS operand is specified.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Return Variables:
Contains JOBnnnnn where nnnnn is the job number assigned.
Example: OPT=SUBMIT
This example submits JCL contained in a data set:
EXEC $DSCALL OPT=SUBMIT DSN=CUSTOMER.DATA.JOBS(REORG)
This example submits JCL using a range of variables:
&CONTROL SHRVARS=($DS,$TEST) &$TEST1=&STR //FREDX JOB 'SAMPLE',CLASS=A,MSGLEVEL=(1,1),MSGCLASS=T, &$TEST2=&STR // NOTIFY=FRED &$TEST3=&STR //STEP EXEC PGM=IEFBR14 &$TEST4=&STR // EXEC $DSCALL OPT=SUBMIT VARS=$TEST RANGE=(1,4)
Notes:
This function allocates a SYSOUT data set with CLASS=A and PGM=INTRDR. The JCL is obtained from the specified data set or variables and written to the SYSOUT file. When the SYSOUT file is closed, the job number assigned to the submitted job is returned. This value is placed in variable $DSJOB# for return to the caller.
This function does not work if your product region is running under the master scheduler instead of JES.
This function is designed to submit only a single job.
| Copyright © 2009 CA. All rights reserved. |
|