Two advantages of this command are as follows:
It can submit a job directly from variables.
It returns the job number of the submitted job in a variable.
JESSUBM requires TSO authorization to submit, but does not drive the TSO SUBMIT exit, IKJEFF10. If the user ID does not have TSO submit authority, JESSUBM will end in IMFCC=8. Therefore the TSO authorization required to issue the SUBMIT command is not checked and the TSO SUBMIT exit, IKJEFF10, does not get control. JESSUBM allocates an Internal Reader (INTRDR).
When you use the IMFEXEC JESSUBM command in an EXEC within MainView AutoOPERATOR, and you use the DA (data set) parameter, you must also specify serialization for the IMFEXEC JESSUBM command so that only one EXEC thread can run the command at a time. If you do not serialize the command, the command might fail and return a value of 12 in the IMFCC variable. The following shows an example of the error messages written to the BBI journal when this failure occurs:
EM0022E ERROR PROCESSING .. JESSUBM2 .. Cannot open input dataset EM0025I FOLLOWING MSG ISSUED FOR EXEC .. JESSUBM2 .. 3 *-* 'IMFEXEC JESSUBM DA('JAB2.UBBPROC(AMBLIST)')' +++ RC(12) +++
The following is an example of using the IMFEXEC VENQ and IMFEXEC VDEQ commands to serialize on the use of an IMFEXEC JESSUBM command that specifies a data set name for the JCL:
/* REXX EXEC */ 'IMFEXEC VENQ 'ENQNAME'' 'IMFEXEC JESSUBM DA('JAB2.UBBPROC(AMBLIST)')' 'IMFEXEC MSG '.'imfename imfeid' JESSUBM ended with IMFCC: 'imfcc''' 'IMFEXEC VDEQ 'ENQNAME''
DSNAME | DS | DA | DSN
The following table describes the parameters:
DSNAME | DS | DA | DSN
name of the data set to submit Sequential and partitioned data sets are supported
When specifying a partitioned data set, a member name must be supplied.
Length can be from 1 to 44 characters conforming to data set name specifications. The data set must have an LRECL of 80.
set of REXX stem variables that contain the JCL to be submitted
Length can be from 1 to 26 characters conforming to variable naming conventions. The separator character between variable name and index is ‘.’ (according to REXX stem variable syntax). The variable with the index 0 is assumed to contain the count of variables to be processed.
Note that the variable contents should not exceed 80 characters in length.
Contents in columns 72 through 80 is accepted.
The STEM() and DSN() parameters are mutually exclusive; however, you must specify one or the other.
Condition codes are listed in the following table:
Command was executed successfully.
JES rejected the allocation request.
INTRDR cannot be dynamically allocated. This error can happen if JES has not yet started.
Specified data set cannot be allocated or opened or data set LRECL is less than or greater than 80, or data set name is too long.
Syntax error occurred.
Error occurred while processing input variables.
Not connected to JES (started under MSTR and no JESCNCT card is in BBPARM member BBISSP00).
Invalid input data set occurred or error writing to INTRDR.
After a successful submission, the variable IMFJESNR is set to the job ID of the submitted job (for example, JOB12345). If multiple jobs were submitted as a stream, this variable contains the job ID of the first job in this stream.
This command submits the JCL contained in the PDS member ‘BAORAE.JCL.CNTL(IEFBR14)’.
/* REXX */ 'IMFEXEC JESSUBM DA('BAORAE.JCL.CNTL(IEFBR14)')'
IMFEXEC JESSUBM DA('BAORAE.JCL.CNTL(IEFBR14)')
This command submits the JCL contained in the variables S.1 and S.2.
/* REXX */ S.1='//BAOBR14 JOB (3911),'ERNST',CLASS=K,MSGCLASS=A,NOTIFY=BAORAE2' S.2='//IEFBR14 EXEC PGM=IEFBR14' S.0=2 'IMFEXEC JESSUBM STEM(S)'
S.1='//BAOBR14 JOB (3911),'ERNST',CLASS=K,MSGCLASS=A,NOTIFY=BAORAE2' S.2='//IEFBR14 EXEC PGM=IEFBR14' S.0=2 IMFEXEC JESSUBM STEM(S)