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
- Requires read and add authority to the library where the job description is created, and use authority to the user profile named on USER.
- To use an accounting code other than *USRPRF, requires use authority to the Change Accounting Code (CHGACGCDE) command.
- The job descriptions QGPL/QDFTJOBD and QGPL/QDFTSVR cannot be changed to name an ASP group; for them INLASPGRP must be *NONE.
Parameters
JOBD
Job description
Names the job description to create and the library where it is created. This parameter is required.
*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
Library
Library
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.
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.
*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
Suggested / special values:
QBATCH
Library
Library
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.
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.
PRTDEV
Print device
Names the default printer device for jobs using this description.
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.
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
Library
Library
Suggested / special values:
*LIBL, *CURLIB
TEXT
Text 'description'
Gives brief text describing the object, up to 50 characters in apostrophes.
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.
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.
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.
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.
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.
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.
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.
*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
Severity
Severity
Text
Text
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.
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.
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.
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.
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).
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.
INQMSGRPY
Inquiry message reply
Sets how inquiry messages are answered for jobs using this description.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Generated from os/cl/catalog/CRTJOBD.json and os/cl/help/CRTJOBD.json.