Command reference / job

CRTJOBD

Create Job Description

Creates a job description, an object holding job-related attributes that one or more jobs can use. The attributes determine how each job runs. The values are usually the defaults for the matching parameters of the Batch Job (BCHJOB) and Submit Job (SBMJOB) commands when those are not specified, and BCHJOB and SBMJOB values can override them.

Allowed environments: *ALL. Positional parameters: 3.

Restrictions

Parameters

JOBD Job description

Names the job description to create and the library where it is created. This parameter is required.

Type
*QUAL
Required
Yes
Case
Uppercase
*CURLIB
Use the current library for the thread, or QGPL if none is set.
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
*CURLIB
Length
10
Case
Uppercase

Suggested / special values: *CURLIB

USER User

Names the user profile for batch jobs using this description. For interactive jobs, it is the default sign-on user name. Some profile names are not valid. This parameter is optional.

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

Suggested / special values: *RQD

*RQD
A user name is required. For work stations, the user signs on with a name; not valid for autostart entries or BCHJOB, and valid on SBMJOB only with *CURRENT.

JOBQ Job queue

Names the default job queue where jobs submitted with this description are placed. A library qualifier is required if the queue does not yet exist.

Type
*QUAL
Required
No
Case
Uppercase
*LIBL
Search the thread's library list for the queue.
*CURLIB
Use the current library for the thread, or QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Job queue Job queue

Type
*NAME
Required
No
Default
QBATCH
Length
10
Case
Uppercase

Suggested / special values: QBATCH

Library Library

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

Suggested / special values: *LIBL, *CURLIB

JOBPTY Job priority (on JOBQ)

Sets the job queue scheduling priority, from 1 (highest) to 9 (lowest). The default is 5.

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

OUTPTY Output priority (on OUTQ)

Sets the output priority of spooled files from jobs using this description, from 1 (highest) to 9 (lowest). The default is 5.

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

PRTDEV Print device

Names the default printer device for jobs using this description.

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

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

*USRPRF
Use the printer device from the user profile at job start.
*SYSVAL
Use the QPRTDEV system value at job start.
*WRKSTN
Use the printer assigned to the job's work station at job start.

OUTQ Output queue

Names the default output queue for spooled printer files that specify *JOB for the output queue. A library qualifier is required if the queue does not yet exist.

Type
*QUAL
Required
No
Default
*USRPRF
Case
Uppercase

Suggested / special values: *USRPRF, *DEV, *WRKSTN

*USRPRF
Use the output queue from the user profile at job start.
*DEV
Use the output queue for the printer named on the printer file DEV parameter.
*WRKSTN
Use the output queue assigned to the job's work station at job start.
*LIBL
Search the thread's library list for the queue.
*CURLIB
Use the current library for the thread, or QGPL if none is set.
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

TEXT Text 'description'

Gives brief text describing the object, up to 50 characters in apostrophes.

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

Suggested / special values: *BLANK

*BLANK
No text is specified.

ACGCDE Accounting code

Sets the accounting code logged for jobs using this description. Anything other than *USRPRF requires authority to CHGACGCDE.

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

Suggested / special values: *USRPRF, *BLANK

*USRPRF
The accounting code comes from the user profile associated with the job.
*BLANK
An accounting code of 15 blanks is assigned.

PRTTXT Print text

Sets text printed at the bottom of each page, up to 30 characters in apostrophes.

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

Suggested / special values: *SYSVAL, *BLANK

*SYSVAL
Use the QPRTTXT system value.
*BLANK
No text is printed.

RTGDTA Routing data

Sets the routing data used to start jobs, compared with the subsystem routing table. Up to 80 characters.

Type
*CHAR
Required
No
Default
QCMDI
Length
80
Case
Uppercase

Suggested / special values: QCMDI, *RQSDTA

QCMDI
The IBM-supplied default, which routes the job to QCMD in QSYS.
*RQSDTA
The first 80 characters of the RQSDTA request data are used.

RQSDTA Request data or command

Sets the request data placed as the last entry in the job's message queue. Up to 256 characters; a CL command must be enclosed in apostrophes, with doubled apostrophes inside it.

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

Suggested / special values: *NONE, *RTGDTA

*NONE
No request data is placed in the message queue.
*RTGDTA
The routing data from RTGDTA is placed as the last entry.

INLLIBL Initial library list

Sets the user part of the initial library list for jobs using this description. Library names cannot be duplicated in the list.

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

Suggested / special values: *SYSVAL, *NONE

*SYSVAL
Use the library names in the QUSRLIBL system value at job start.
*NONE
The user part of the library list is empty; only the system portion is used.

INLASPGRP Initial ASP group

Sets the ASP group for the initial thread of jobs using this description, which determines the library name space.

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

Suggested / special values: *NONE

*NONE
The initial thread starts with no ASP group; only the system ASP and basic user ASPs are in the library name space.

LOG Message logging

Sets the logging level, severity and text level for messages written to the job log. Three elements: level (0-4, default 4), severity (0-99, default 0) and text.

Type
*ELEM
Required
No
Case
Uppercase
*NOLIST
If the job ends normally, no job log is produced. If it ends abnormally (end code 20 or higher), a job log is produced.
*MSG
Only the message text is written to the job log.
*SECLVL
Both the message text and the message help are written to the job log.
Elements in order

Level Level

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

Severity Severity

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

Text Text

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

Allowed values: *NOLIST, *MSG, *SECLVL

LOGCLPGM Log CL program commands

Sets whether commands run in a CL program are logged to the job log through the program's message queue. *YES is effective only if *JOB is specified for CRTCLPGM's LOG parameter.

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

Allowed values: *NO, *YES

*NO
Commands in a CL program are not logged.
*YES
Commands in a CL program are logged.

LOGOUTPUT Job log output

Sets how the job log is produced when the job completes. It can be changed until the log is produced or removed.

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

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

*SYSVAL
Use the QLOGOUTPUT system value.
*JOBLOGSVR
The job log is produced by a job log server.
*JOBEND
The job produces its own job log, or a job log server does if it cannot.
*PND
The job log is not produced and remains pending until removed.

JOBMSGQMX Job message queue maximum size

Sets the maximum size of the job message queue, in megabytes from 2 to 64.

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

Suggested / special values: *SYSVAL

*SYSVAL
Use the QJOBMSGQMX system value at job start.

JOBMSGQFL Job message queue full action

Sets the action taken when the job message queue is full.

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

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

*SYSVAL
Use the QJOBMSGQFL system value.
*NOWRAP
The queue does not wrap; the job ends.
*WRAP
The queue wraps to the start and continues filling.
*PRTWRAP
The queue wraps and prints the messages being overlaid.

SYNTAX CL syntax check

Sets whether requests on the job message queue are checked for CL syntax when submitted. If checking is set, the severity that ends the job on a syntax error is also given (0-99).

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

Suggested / special values: *NOCHK

*NOCHK
Request data is not checked for CL syntax.

ENDSEV End severity

Sets the escape message severity, from 0 to 99 (default 30), that can end a batch job. Escape messages typically have a maximum severity of 50, so 50 or lower must be specified for a job to end this way.

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

INQMSGRPY Inquiry message reply

Sets how inquiry messages are answered for jobs using this description.

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

Allowed values: *RQD, *DFT, *SYSRPYL

*RQD
A reply is required for any predefined inquiry message.
*DFT
The default reply in the message description or the system default is used.
*SYSRPYL
The system reply list is checked for a matching entry; if none matches, a reply is required.

HOLD Hold on job queue

Sets whether jobs using this description are put on the job queue in the hold condition. A held job is released by RLSJOB or ended by ENDJOB or CLRJOBQ.

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

Allowed values: *NO, *YES

*NO
Jobs are not held when queued.
*YES
Jobs are held when queued.

DATE Job date

Sets the date assigned to the job when it starts. Must use the DATFMT format of the job.

Type
*DATE
Required
No
Default
*SYSVAL
Case
Uppercase

Suggested / special values: *SYSVAL

*SYSVAL
Use the QDATE system value at job start.

SWS Job switches

Sets the initial settings of eight job switches, each 0 (off) or 1 (on). The default is eight zeros; a CL program can test and set them.

Type
*CHAR
Required
No
Default
00000000
Length
50
Case
Uppercase

DEVRCYACN Device recovery action

Sets the recovery action for an I/O error on the requester device of an interactive job. Ignored for non-interactive jobs.

Type
*CHAR
Required
No
Default
*SYSVAL
Length
13
Case
Uppercase

Allowed values: *SYSVAL, *MSG, *DSCMSG, *DSCENDRQS, *ENDJOB, *ENDJOBNOLIST

*SYSVAL
Use the QDEVRCYACN system value at job start.
*MSG
The requesting program receives an error message.
*DSCMSG
The job is disconnected; on reconnect it gets an error message and must redisplay the screen.
*DSCENDRQS
The job is disconnected; on reconnect ENDRQS is issued for the requesting processor.
*ENDJOB
The job is ended immediately, with a job log produced.
*ENDJOBNOLIST
The job is ended immediately, with no job log produced.

TSEPOOL Time slice end pool

Sets whether interactive jobs move to another main storage pool at the end of a time slice. A job moves back to its original pool after a long wait.

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

Allowed values: *SYSVAL, *NONE, *BASE

*SYSVAL
Use the QTSEPOOL system value at job start.
*NONE
The job is not moved at the end of a time slice.
*BASE
The job is moved to the base pool at the end of a time slice.

AUT Authority

Sets public authority for the job description: users without specific authority, not on an authorization list, and whose group profiles lack specific authority.

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

Suggested / special values: *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE

*LIBCRTAUT
Use the CRTAUT value of the library the object is created in.
*CHANGE
All operations except those limited to the owner or object management.
*ALL
All operations except authorization list management; can also change ownership.
*USE
Basic operations such as displaying its contents; no changes.
*EXCLUDE
The user cannot access the object.

ALWMLTTHD Allow multiple threads

Sets whether the job can run with multiple user threads. It cannot be changed once the job starts. Should be *YES only for descriptions used with functions that create multiple threads.

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

Allowed values: *NO, *YES

*NO
The job cannot run with multiple user threads.
*YES
The job can run with multiple user threads.

SPLFACN Spooled file action

Sets whether spooled files stay accessible through job interfaces after the job ends. *KEEP keeps them with the job; *DETACH releases them so the job is removed.

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

Allowed values: *SYSVAL, *KEEP, *DETACH

*SYSVAL
Use the QSPLFACN system value.
*KEEP
Spooled files in ASP 1 or basic user ASPs keep the job; if all remaining files are in independent ASPs, they are detached and the job is removed.
*DETACH
Spooled files are detached and the job is removed when it ends.

DDMCNV DDM conversation

Sets whether DDM connections (APPC, TCP/IP or OptiConnect) stay active when they are not in use.

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

Allowed values: *KEEP, *DROP

*KEEP
Connections stay active when unused, except in the listed cases such as a routing step ending or a communications failure.
*DROP
The system ends a DDM-allocated conversation when it is no longer used.

WLCGRP Workload group

Names the workload group used by jobs using this description. If the group does not exist when the job starts, no workload group is used.

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

Suggested / special values: *SBSD, *NONE

*SBSD
The workload group defined in the subsystem description is used.
*NONE
No workload group is used.

Examples

CRTJOBD JOBD(INT4) USER(*RQD) RTGDTA(QCMDI) INQMSGRPY(*SYSRPYL) TEXT('Interactive #4 JOBD for Department 127')

Creates job description INT4 in the current library for interactive jobs. The user must type a password at sign-on. Routing data QCMDI is used, and inquiry messages are checked against the system reply list.

CRTJOBD JOBD(BATCH3) USER(*RQD) JOBQ(NIGHTQ) JOBPTY(4) OUTPTY(4) ACGCDE(NIGHTQ012345) RTGDTA(QCMDB) TEXT('Batch #3 JOBD for high priority night work')

Creates job description BATCH3. Jobs using it are placed on job queue NIGHTQ with job priority 4 and output priority 4, use accounting code NIGHTQ012345, and use routing data QCMDB.

IBM command documentation

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