Submitting Commands Using the SUBMIT Command

The SUBMIT command is used to submit batch jobs. For more information, refer to Submitting a Batch Job with the SUBMIT Command. There are two techniques for submitting batch jobs using the SUBMIT command.

  1. Use the SUBMIT command or subcommand of EDIT. When submitting a batch job in a data set, the data set must be in the same format as a CNTL-type data set. Using the EDIT command to create the data set assures you of the correct data set format. The first part of Figure 1 illustrates how the EDIT command can be used to create a data set containing commands and how the SUBMIT command is used to submit this same data set as a background TSO/E session.
  2. Use the SUBMIT * command from READY mode. The SUBMIT command supports an asterisk (*) for the positional operand value and two keyword operands, END and PAUSE. The keyword operands, END and PAUSE are valid only when (*) is specified and when the issuer is not in EDIT mode. The second part of Figure 1 illustrates how the SUBMIT command can be used in READY mode.
Figure 1. Submitting Commands in a Batch Job
  READY
 EDIT examp2.cntl NEW
  INPUT
  00010 LOGON
  00020 PROFILE PREFIX(yourid)
  00030 EDIT a.data NEW EMODE
  00040 5 this is first line
  00050 10 this is second line
  00060 save b.data reuse
  00070 end save
  00080 < null line >
  EDIT
 SUBMIT * jobc(a)
  JOB YOURIDA(JOB000347) SUBMITTED
  EDIT
 end save
  READY
  READY
 SUBMIT *
  ENTER INPUT JOB STREAM:
 LOGON
 TIME
 LISTBC
  < null line >
  ENTER JOBNAME CHARACTER(S) -
 a
  JOB YOURIDA(job04261) SUBMITTED
  READY

If you want the SUBMIT command to generate the JCL statements to execute commands in the background, specify LOGON as the first command in the data set. No operands are required on the LOGON command. However, you must specify your user ID if you specified any other operands on the LOGON command.

When the SUBMIT command finds a LOGON command in the SUBMIT job stream before it finds a JOB statement, SUBMIT processing uses the LOGON command to build the JOB and EXEC statements. The job created (if the PROC operand was not on the LOGON command) contains an EXEC statement with PGM=IKJEFT01. Therefore, the job created is the TSO/E terminal monitor program (IKJEFT01) running in the background. All input after the LOGON command is considered to be TSO/E commands.

If your installation uses security labels and security checking, and the SECLABEL operand appears on the LOGON command found in the job stream, SUBMIT processing will include the SECLABEL keyword with its value on the JOB statement it builds. The batch job will then run at the security label given on the JOB statement. If the SECLABEL operand does not appear on the LOGON command, the job will run at the security label the user is logged on at, and no SECLABEL keyword will be generated on the JOB statement.

You can submit a batch job that has a security label that is greater than the security label you are logged on at, provided you are authorized to use the job's security label. However, during your current TSO/E session, you will not be able to use the OUTPUT command to process the output from the job or the CANCEL command to cancel the job. If the job output is held, you can process it by logging on with a security label that is greater than or equal to the job's security label.

Depending on the security options used at your installation, you may not be able to submit a job at a security label that is less than the security label you are currently logged on with.

If you want to charge the job to an account number other than the one you are currently using, you must specify the ACCT operand. MAIL, NOMAIL, NONOTICE, and RECONNECT operands are ignored when you specify them on a LOGON command executed in the background. Figure 2 illustrates how the system integrates your data with the JCL generated by the system from the example in Figure 1.

Figure 2. The SUBMIT Process Using System-Generated JCL
art ikjc2pg2
Other conditions that apply when submitting jobs in the background are:
  • You can precede the LOGON command with JES2 or JES3 JCL statements. If this is done, however, TSO/E does not process any other JCL statements in the job stream, and the system does not generate any JCL statements. If a JCL statement follows the LOGON command, it is executed in the background as an input line.
  • You must write the LOGON command on one line in columns 1 through 72 only.
  • You can have more than one LOGON command within a single data set. SUBMIT creates the JCL statements for each of them and executes them accordingly.
  • You cannot use the characters */ in columns one and two in a data set where SUBMIT-generated JCL is to be used. SUBMIT designates these characters as a delimiter. If you must use these characters in columns one and two, you have to provide your own JCL.
  • Use only the PROC operand on a submitted LOGON command if the procedure is available in the SYS1.PROCLIB.
  • The PROC specified on a submitted LOGON command must not contain the ddnames SYSTSIN or SYSTSPRT. SUBMIT always generates these ddnames.

For example, if you submit a data set containing the commands LOGON and LISTCAT, SUBMIT enters the following background job:

//YOURIDA    JOB    ACCT.INFO.,
//                  YOURID
//                  NOTIFY=YOURID
//                  MSGLEVEL=(1,1)
//********************************************************
//*  THE FOLLOWING LOGON COMMAND WAS FOUND IN SUBMIT'S   *
//*  INPUT DATA SET(S) AND WAS USED TO GENERATE THE JCL  *
//*  TO EXECUTE TSO/E COMMANDS IN THE BACKGROUND:        *
//*                                                      *
//*  LOGON                                               *
//*                                                      *
//********************************************************
//CBSTEP     EXEC PGM=IKJEFT01,DYNAMNBR=30
//SYSTSPRT   DD   SYSOUT=A  **OUTPUT FROM COMMANDS IN
                              BACKGROUND**
//SYSTSIN    DD   DATA,DLM='*/'  **INPUT COMMANDS**
  LISTCAT
*/

If the above SUBMIT-generated JCL statements are not sufficient, you can insert your own JCL. Do not include a LOGON command if this is done. Figure 3 illustrates the SUBMIT process if you create your own JCL.

Figure 3. The SUBMIT Process With User-Created JCL Statements
art ikjc2pg3