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

Parameters

JOB Job name

Specifies the simple name the job is known by while the system processes it.

Type
*NAME
Required
No
Default
*JOBD
Length
10
Case
Uppercase

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.

Type
*QUAL
Required
No
Default
*USRPRF
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

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.

Type
*NAME
Required
No
Default
*CURRENT
Length
10
Case
Uppercase

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.

Type
*QUAL
Required
No
Default
*JOBD
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

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.

Type
*CMDSTR
Required
No
Case
Uppercase

JOBPTY Job priority (on JOBQ)

Specifies the scheduling priority on the job queue, from 1 (highest) to 9 (lowest).

Type
*INT4
Required
No
Default
*JOBD
Range
1 to 9
Case
Uppercase

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).

Type
*INT4
Required
No
Default
*JOBD
Range
1 to 9
Case
Uppercase

Suggested / special values: *JOBD

*JOBD
The output priority in the job description is used.

PRTDEV Print device

Type
*NAME
Required
No
Default
*CURRENT
Length
10
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *SYSVAL, *JOBD

OUTQ Output queue

Type
*QUAL
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *DEV, *JOBD

Qualified parts (object, then library; write LIBRARY/OBJECT)

Output queue Output queue

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

ACGCDE Accounting code

Type
*CHAR
Required
No
Default
*CURRENT
Length
15
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *JOBD

PRTTXT Print text

Type
*CHAR
Required
No
Default
*CURRENT
Length
30
Case
Uppercase

Suggested / special values: *CURRENT, *JOBD, *SYSVAL, *BLANK

RTGDTA Routing data

Type
*CHAR
Required
No
Default
QCMDB
Length
80
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*CMD
Length
80
Case
Uppercase

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

Type
*CHAR
Required
No
Default
*CURRENT
Length
8
Case
Uppercase

Allowed values: *CURRENT, *SYSVAL

CURLIB Current library

Type
*NAME
Required
No
Default
*CURRENT
Length
10
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *CRTDFT

INLLIBL Initial library list

Type
*NAME
Required
No
Default
*CURRENT
Length
10
List limit
250
Case
Uppercase

Suggested / special values: *CURRENT, *JOBD, *SYSVAL, *NONE

INLASPGRP Initial ASP group

Type
*NAME
Required
No
Default
*CURRENT
Length
10
Case
Uppercase

Suggested / special values: *CURRENT, *JOBD, *NONE

LOG Message logging

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Level Level

Type
*INT4
Required
No
Default
*JOBD
Range
0 to 4
Case
Uppercase

Suggested / special values: *JOBD

Severity Severity

Type
*INT4
Required
No
Default
*JOBD
Range
0 to 99
Case
Uppercase

Suggested / special values: *JOBD

Text Text

Type
*CHAR
Required
No
Default
*JOBD
Length
7
Case
Uppercase

Allowed values: *JOBD, *MSG, *SECLVL, *NOLIST

LOGCLPGM Log CL program commands

Type
*CHAR
Required
No
Default
*JOBD
Length
5
Case
Uppercase

Allowed values: *JOBD, *NO, *YES

LOGOUTPUT Job log output

Type
*CHAR
Required
No
Default
*JOBD
Length
10
Case
Uppercase

Allowed values: *JOBD, *SYSVAL, *JOBLOGSVR, *JOBEND, *PND

JOBMSGQMX Job message queue maximum size

Type
*INT4
Required
No
Default
*JOBD
Range
2 to 64
Case
Uppercase

Suggested / special values: *JOBD, *SYSVAL

JOBMSGQFL Job message queue full action

Type
*CHAR
Required
No
Default
*JOBD
Length
8
Case
Uppercase

Allowed values: *JOBD, *SYSVAL, *NOWRAP, *WRAP, *PRTWRAP

INQMSGRPY Inquiry message reply

Type
*CHAR
Required
No
Default
*JOBD
Length
8
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*JOBD
Length
5
Case
Uppercase

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

Type
*DATE
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT, *MONTHSTR, *MONTHEND, *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN

SCDTIME Schedule time

Type
*TIME
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT

DATE Job date

Type
*DATE
Required
No
Default
*JOBD
Case
Uppercase

Suggested / special values: *JOBD, *SYSVAL

SWS Job switches

Type
*CHAR
Required
No
Default
*JOBD
Length
50
Case
Uppercase

Suggested / special values: *JOBD

DSPSBMJOB Allow display by WRKSBMJOB

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

SBMFOR Submitted for

Type
*QUAL
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT

Qualified parts (object, then library; write LIBRARY/OBJECT)

Submitted for Submitted for

Type
*NAME
Required
No
Length
10
Case
Uppercase

User User

Type
*NAME
Required
No
Length
10
Case
Uppercase

Number Number

Type
*CHAR
Required
No
Length
6
Case
Uppercase

MSGQ Message queue

Specifies the message queue that receives a completion message when the submitted job ends, normally or abnormally.

Type
*QUAL
Required
No
Default
*USRPRF
Case
Uppercase

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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

SRTSEQ Sort sequence

Type
*QUAL
Required
No
Default
*CURRENT
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *SYSVAL, *HEX, *LANGIDUNQ, *LANGIDSHR

Qualified parts (object, then library; write LIBRARY/OBJECT)

Sort sequence Sort sequence

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

LANGID Language ID

Type
*CHAR
Required
No
Default
*CURRENT
Length
50
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *SYSVAL

CNTRYID Country or region ID

Type
*CHAR
Required
No
Default
*CURRENT
Length
50
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *SYSVAL

CCSID Coded character set ID

Type
*INT4
Required
No
Default
*CURRENT
Range
1 to 65535
Case
Uppercase

Suggested / special values: *CURRENT, *USRPRF, *SYSVAL, *HEX

CPYENVVAR Copy environment variables

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

ALWMLTTHD Allow multiple threads

Type
*CHAR
Required
No
Default
*JOBD
Length
5
Case
Uppercase

Allowed values: *JOBD, *NO, *YES

SPLFACN Spooled file action

Type
*CHAR
Required
No
Default
*CURRENT
Length
8
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/SBMJOB.json and os/cl/help/SBMJOB.json.