$DSCALL OPT=SUBMIT

Submits JCL.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=SUBMIT 
           { DSN=dataset_name | 
             VARS=prefix 
             RANGE= ( a , b ) }

This call is used to submit 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.

Operands:

Return Codes:

Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.

Return Variables:

Example: OPT=SUBMIT

To submit JCL contained in a data set:

EXEC $DSCALL OPT=SUBMIT DSN=CUSTOMER.DATA.JOBS(REORG)

To submit JCL using a range of variables:

&$TEST1=//FREDX JOB 'SAMPLE', CLASS=A, MSGLEVEL=(1,1), MSGCLASS=T,
&$TEST2=//  NOTIFY=FRED 
&$TEST3=//STEP EXEC PGM=IEFBR14
&$TEST4=//
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 and 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.