Command reference / job
SBMJOB
Submit Job
Lets a running job submit another job to a job queue to run later as a batch job. Only one element of request data can be placed on the new job's message queue. The request data can be a CL command if the routing entry used specifies a CL command processing program, such as the IBM-supplied QCMD.
Allowed environments: *ALL.
Positional parameters: 4.
Restrictions
- The submitting user needs use (*USE) authority to the user profile, command, job description, job queue, and message queue named by the parameters, plus add (*ADD) authority to the message queue. The user also needs execute (*EXECUTE) authority to the libraries containing those objects. Job control (*JOBCTL) special authority is needed for SBMFOR, and use (*USE) authority to CHGACGCDE is needed for a character accounting code.
- The submitted job's user needs use (*USE) authority to the job description, read (*READ) authority to the output queue plus execute (*EXECUTE) authority to its library, and use (*USE) authority to the system and initial library lists, the current library, the initial ASP group devices, and the sort sequence table, with execute (*EXECUTE) authority to the table's library.
- This command is conditionally threadsafe. If a Job Notification Exit Point sends a message to a DDM data queue, that message is not sent when SBMJOB is issued in a multithreaded job.
- Environment variables are not copied from the submitting job if the system is powered down before the submitted job starts.
Parameters
JOB
Job name
Specifies the simple name the job is known by while the system processes it.
Suggested / special values:
*JOBD
*JOBD- The simple name of the job description used with the job becomes the job's name.
JOBD
Job description
Specifies the job description used with the job. It can be given as a qualified name or as a special value.
Suggested / special values:
*USRPRF
*USRPRF- The job description in the user profile under which the submitted job initially runs is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job description
Job description
Library
Library
Suggested / special values:
*LIBL, *CURLIB
USER
User
Specifies the user profile for the submitted job. If the job description requires a user, *JOBD cannot be used. Certain IBM-supplied profiles are not valid here.
Suggested / special values:
*CURRENT, *JOBD
*CURRENT- The user profile used by the currently running job is used.
*JOBD- The user profile named in the specified job description is used.
JOBQ
Job queue
Specifies the job queue on which the submitted job is placed.
Suggested / special values:
*JOBD
*JOBD- The submitted job is placed on the job queue named in the specified job description.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job queue
Job queue
Library
Library
Suggested / special values:
*LIBL, *CURLIB
CMD
Command to run
Specifies a command that runs in the batch job when the routing program is the default QCMD. Because it supplies the request data, it is mutually exclusive with RQSDTA. It can be up to 20000 characters.
JOBPTY
Job priority (on JOBQ)
Specifies the scheduling priority on the job queue, from 1 (highest) to 9 (lowest).
Suggested / special values:
*JOBD
*JOBD- The scheduling priority in the job description is used.
OUTPTY
Output priority (on OUTQ)
Specifies the output priority of spooled output files produced by the job, from 1 (highest) to 9 (lowest).
Suggested / special values:
*JOBD
*JOBD- The output priority in the job description is used.
PRTDEV
Print device
Suggested / special values:
*CURRENT, *USRPRF, *SYSVAL, *JOBD
OUTQ
Output queue
Suggested / special values:
*CURRENT, *USRPRF, *DEV, *JOBD
Qualified parts (object, then library; write LIBRARY/OBJECT)
Output queue
Output queue
Library
Library
Suggested / special values:
*LIBL, *CURLIB
ACGCDE
Accounting code
Suggested / special values:
*CURRENT, *USRPRF, *JOBD
PRTTXT
Print text
Suggested / special values:
*CURRENT, *JOBD, *SYSVAL, *BLANK
RTGDTA
Routing data
Suggested / special values:
QCMDB, *JOBD, *RQSDTA
RQSDTA
Request data or command
Specifies the request data placed as the last entry in the job's message queue. It can be a CL command or a character string for another program. A character value can be up to 3000 characters.
Suggested / special values:
*CMD, *JOBD, *NONE, *RTGDTA
*CMD- The input from the CMD parameter is placed in the job's message queue.
*JOBD- The request data in the job description is placed in the job's message queue.
*NONE- No request data is placed in the job's message queue.
*RTGDTA- The routing data from the RTGDTA parameter is placed as the last entry in the job's message queue.
SYSLIBL
System library list
Allowed values:
*CURRENT, *SYSVAL
CURLIB
Current library
Suggested / special values:
*CURRENT, *USRPRF, *CRTDFT
INLLIBL
Initial library list
Suggested / special values:
*CURRENT, *JOBD, *SYSVAL, *NONE
INLASPGRP
Initial ASP group
Suggested / special values:
*CURRENT, *JOBD, *NONE
LOG
Message logging
Elements in order
Level
Level
Suggested / special values:
*JOBD
Severity
Severity
Suggested / special values:
*JOBD
Text
Text
Allowed values:
*JOBD, *MSG, *SECLVL, *NOLIST
LOGCLPGM
Log CL program commands
Allowed values:
*JOBD, *NO, *YES
LOGOUTPUT
Job log output
Allowed values:
*JOBD, *SYSVAL, *JOBLOGSVR, *JOBEND, *PND
JOBMSGQMX
Job message queue maximum size
Suggested / special values:
*JOBD, *SYSVAL
JOBMSGQFL
Job message queue full action
Allowed values:
*JOBD, *SYSVAL, *NOWRAP, *WRAP, *PRTWRAP
INQMSGRPY
Inquiry message reply
Allowed values:
*JOBD, *RQD, *DFT, *SYSRPYL
HOLD
Hold on job queue
Specifies whether the job is held when put on the job queue. A held job stays held until released by RLSJOB or ended by ENDJOB or CLRJOBQ.
Allowed values:
*JOBD, *NO, *YES
*JOBD- The job description value determines whether the job is held.
*NO- The job is not held when put on the job queue.
*YES- The job is held on the job queue until it is released or ended.
SCDDATE
Schedule date
Suggested / special values:
*CURRENT, *MONTHSTR, *MONTHEND, *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN
SCDTIME
Schedule time
Suggested / special values:
*CURRENT
DATE
Job date
Suggested / special values:
*JOBD, *SYSVAL
SWS
Job switches
Suggested / special values:
*JOBD
DSPSBMJOB
Allow display by WRKSBMJOB
Allowed values:
*YES, *NO
SBMFOR
Submitted for
Suggested / special values:
*CURRENT
Qualified parts (object, then library; write LIBRARY/OBJECT)
Submitted for
Submitted for
User
User
Number
Number
MSGQ
Message queue
Specifies the message queue that receives a completion message when the submitted job ends, normally or abnormally.
Suggested / special values:
*USRPRF, *WRKSTN, *NONE
*USRPRF- The completion message goes to the message queue in the submitter's user profile.
*WRKSTN- The completion message goes to the submitting workstation's message queue; no message is sent if submitted by a batch job.
*NONE- No completion message is sent.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Message queue
Message queue
Library
Library
Suggested / special values:
*LIBL, *CURLIB
SRTSEQ
Sort sequence
Suggested / special values:
*CURRENT, *USRPRF, *SYSVAL, *HEX, *LANGIDUNQ, *LANGIDSHR
Qualified parts (object, then library; write LIBRARY/OBJECT)
Sort sequence
Sort sequence
Library
Library
Suggested / special values:
*LIBL, *CURLIB
LANGID
Language ID
Suggested / special values:
*CURRENT, *USRPRF, *SYSVAL
CNTRYID
Country or region ID
Suggested / special values:
*CURRENT, *USRPRF, *SYSVAL
CCSID
Coded character set ID
Suggested / special values:
*CURRENT, *USRPRF, *SYSVAL, *HEX
CPYENVVAR
Copy environment variables
Allowed values:
*NO, *YES
ALWMLTTHD
Allow multiple threads
Allowed values:
*JOBD, *NO, *YES
SPLFACN
Spooled file action
Allowed values:
*CURRENT, *JOBD, *SYSVAL, *KEEP, *DETACH
Examples
SBMJOB JOB(SPECIAL) JOBD(MYLIB/MYJOBD) CMD(CALL MYPROG)
Submits job SPECIAL. Most attributes come from job description MYJOBD or the running job, and the CALL is placed on the submitted job's message queue so MYPROG runs later.
SBMJOB JOBD(*USRPRF) JOB(COPY12) JOBQ(NIGHTQ) CMD(CPYF FILEA FILEB)
Submits job COPY12 using the job description in the submitter's user profile to job queue NIGHTQ, so the copy can run unattended at night.
Generated from os/cl/catalog/SBMJOB.json and os/cl/help/SBMJOB.json.