Submit Job (SBMJOB)
The Submit Job (SBMJOB) command allows a job that is running to submit another job to a job queue to be 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 for the job specifies a CL command processing program (such as the IBM-supplied QCMD program).
Note: A job started by the SBMJOB command uses the Accounting code (ACGCDE) of the job that submits the job. The ACGCDE specifications in the submitted job's job description (JOBD) and user's user profile (USRPRF) are ignored.
Restrictions:
- The user that issues the SBMJOB command must have:
- use (*USE) authority to the user profile specified on the User (USER) parameter.
- use (*USE) authority to the command specified on the Command to run (CMD) parameter and execute (*EXECUTE) authority to the library containing that command.
- use (*USE) authority to the job description specified on the Job description (JOBD) parameter and execute (*EXECUTE) authority to the library containing that job description.
- use (*USE) authority to the job queue specified on the Job queue (JOBQ) parameter and execute (*EXECUTE) authority to the library containing that job queue.
- use (*USE) and add (*ADD) authority to the message queue specified on the Message queue (MSGQ) parameter and execute (*EXECUTE) authority to the library containing that message queue.
- job control (*JOBCTL) special authority to use the Submitted for (SBMFOR) parameter.
- The user for the submitted job must have:
- use (*USE) authority to the job description specified on the Job description (JOBD) parameter.
- read (*READ) authority to the output queue specified on the Output queue (OUTQ) parameter and execute (*EXECUTE) authority to the library, in the submitted job's name space, that contains that output queue.
- use (*USE) authority to all the libraries specified on the System library list (SYSLIBL) parameter.
- use (*USE) authority to the library specified on the Current library (CURLIB) parameter.
- use (*USE) authority to all the libraries specified on the Initial library list (INLLIBL) parameter.
- use (*USE) authority to all auxiliary storage pool (ASP) device descriptions specified on the Initial ASP group (INLASPGRP) parameter.
- use (*USE) authority to the sort sequence table specified on the Sort sequence (SRTSEQ) parameter and execute (*EXECUTE) authority to the library, in the submitted job's name space, that contains that sort sequence table.
- This command is conditionally threadsafe. If a Job Notification Exit Point has been registered to send a message to a DDM data queue whenever a Submit Job is done, the message will not be sent if SBMJOB command is issued in a multithreaded job. For more information on the Job Notification function, refer to the Job Notification Exit Point in the Work Management chapter of the System API Reference manual.
Keyword |
Description |
Choices |
Notes |
CMD |
Command to run |
Command string |
Optional |
JOB |
Job name |
Name, *JOBD |
Optional, Positional 1 |
JOBD |
Job description |
Single values: *USRPRF Other values: Qualified object name |
Optional, Positional 2 |
Qualifier 1: Job description |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
JOBQ |
Job queue |
Single values: *JOBD Other values: Qualified object name |
Optional, Positional 4 |
Qualifier 1: Job queue |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
JOBPTY |
Job priority (on JOBQ) |
1-9, *JOBD |
Optional |
OUTPTY |
Output priority (on OUTQ) |
1-9, *JOBD |
Optional |
PRTDEV |
Print device |
Name, *CURRENT, *USRPRF, *SYSVAL, *JOBD |
Optional |
OUTQ |
Output queue |
Single values: *CURRENT, *USRPRF, *DEV, *JOBD Other values: Qualified object name |
Optional |
Qualifier 1: Output queue |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
USER |
User |
Name, *CURRENT, *JOBD |
Optional, Positional 3 |
PRTTXT |
Print text |
Character value, *CURRENT, *JOBD, *SYSVAL, *BLANK |
Optional |
RTGDTA |
Routing data |
Character value, QCMDB, *JOBD, *RQSDTA |
Optional |
RQSDTA |
Request data or command |
Character value, *CMD, *JOBD, *NONE, *RTGDTA |
Optional |
SYSLIBL |
System library list |
*CURRENT, *SYSVAL |
Optional |
CURLIB |
Current library |
Name, *CURRENT, *USRPRF, *CRTDFT |
Optional |
INLLIBL |
Initial library list |
Single values: *CURRENT, *JOBD, *SYSVAL, *NONE Other values (up to 250 repetitions): Name |
Optional |
INLASPGRP |
Initial ASP group |
Name, *CURRENT, *JOBD, *NONE |
Optional |
LOG |
Message logging |
Element list |
Optional |
Element 1: Level |
0-4, *JOBD |
Element 2: Severity |
0-99, *JOBD |
Element 3: Text |
*JOBD, *MSG, *SECLVL, *NOLIST |
LOGCLPGM |
Log CL program commands |
*JOBD, *NO, *YES |
Optional |
LOGOUTPUT |
Job log output |
*JOBD, *SYSVAL, *JOBLOGSVR, *JOBEND, *PND |
Optional |
JOBMSGQMX |
Job message queue maximum size |
2-64, *JOBD, *SYSVAL |
Optional |
JOBMSGQFL |
Job message queue full action |
*JOBD, *SYSVAL, *NOWRAP, *WRAP, *PRTWRAP |
Optional |
INQMSGRPY |
Inquiry message reply |
*JOBD, *RQD, *DFT, *SYSRPYL |
Optional |
HOLD |
Hold on job queue |
*JOBD, *NO, *YES |
Optional |
SCDDATE |
Schedule date |
Date, *CURRENT, *MONTHSTR, *MONTHEND, *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN |
Optional |
SCDTIME |
Schedule time |
Time, *CURRENT |
Optional |
DATE |
Job date |
Date, *JOBD, *SYSVAL |
Optional |
SWS |
Job switches |
Character value, *JOBD |
Optional |
DSPSBMJOB |
Allow display by WRKSBMJOB |
*YES, *NO |
Optional |
SBMFOR |
Submitted for |
Single values: *CURRENT Other values: Qualified job name |
Optional |
Qualifier 1: Submitted for |
Name |
Qualifier 2: User |
Name |
Qualifier 3: Number |
000000-999999 |
MSGQ |
Message queue |
Single values: *USRPRF, *WRKSTN, *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Message queue |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
SRTSEQ |
Sort sequence |
Single values: *CURRENT, *USRPRF, *SYSVAL, *HEX, *LANGIDUNQ, *LANGIDSHR Other values: Qualified object name |
Optional |
Qualifier 1: Sort sequence |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
LANGID |
Language ID |
Character value, *CURRENT, *USRPRF, *SYSVAL |
Optional |
CNTRYID |
Country or region ID |
Character value, *CURRENT, *USRPRF, *SYSVAL |
Optional |
CCSID |
Coded character set ID |
1-65535, *CURRENT, *USRPRF, *SYSVAL, *HEX |
Optional |
CPYENVVAR |
Copy environment variables |
*NO, *YES |
Optional |
ALWMLTTHD |
Allow multiple threads |
*JOBD, *NO, *YES |
Optional |
SPLFACN |
Spooled file action |
*CURRENT, *JOBD, *SYSVAL, *KEEP, *DETACH |
Optional |
Command to run (CMD)
Specifies a command that runs in the batch job, if the routing program used when this batch job is initiated is the IBM-supplied default routing program (QCMD). Because this command is used for the request data, this parameter is mutually exclusive with the Request data or command (RQSDTA) parameter.
- command-string
- Specify the command that is run in the batch job. The command cannot be longer than 20000 characters.
Job name (JOB)
Specifies the name that is associated with the job when it is processed by the system.
- *JOBD
- The simple name of the job description used with this job is the name of the job itself.
- name
- Specify the simple name of the job that is used while it is being processed by the system.
Job description (JOBD)
Specifies the job description used with the job.
Single values
- *USRPRF
- The job description in the user profile under which the submitted job initially runs is used as the job description of the submitted job.
Qualifier 1: Job description
- name
- Specify the name of the job description used for the job.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the job description. If no library is specified as the current library for the thread, the QGPL library is used.
- name
- Specify the library where the job description is located.
Job queue (JOBQ)
Specifies the job queue in which this job is placed.
Single values
- *JOBD
- The submitted job is placed on the job queue named in the specified job description.
Qualifier 1: Job queue
- name
- Specify the name of the job queue.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the job queue. If no library is specified as the current library for the thread, the QGPL library is used.
- name
- Specify the library where the job queue is located.
Job priority (on JOBQ) (JOBPTY)
Specifies the job queue scheduling priority. The highest priority is 1 and the lowest priority is 9.
- *JOBD
- The scheduling priority specified in the job description is used for the job.
- 1-9
- Specify the scheduling priority for the job.
Output priority (on OUTQ) (OUTPTY)
Specifies the output priority for spooled output files that are produced by this job. The highest priority is 1 and the lowest priority is 9.
- *JOBD
- The output priority specified in the job description is used for the job.
- 1-9
- Specify the priority of the submitted job's output files.
Print device (PRTDEV)
Specifies the qualified name of the default printer device for this job. If the printer file being used to create the output specifies to spool the file, the spooled file is placed on the device's output queue, which is named the same as the device.
Note: This assumes the defaults are specified on the Output queue (OUTQ) parameter of the printer file, job description, user profile and work station.
- *CURRENT
- The same printer device being used by the job that is currently running is used by the submitted job.
- *USRPRF
- The printer device specified in the user profile under which the submitted job initially runs is used as the printer device for this job. The printer device name is obtained from the profile when this command is run.
- *SYSVAL
- The printer device specified in the system value, QPRTDEV, when this command is run is used for the submitted job.
- *JOBD
- The printer device specified in the job description is used for the submitted job.
- name
- Specify the name of the printer device used for the submitted job.
Output queue (OUTQ)
Specifies the qualified name of the output queue used for spooled files that specify OUTQ(*JOB). This parameter applies only to printer files that have *JOB specified on the OUTQ parameter.
Single values
- *CURRENT
- The output queue used by the job that is currently running is used for the submitted job.
- *USRPRF
- The output queue in the user profile under which the submitted job initially runs is used as the output queue for the submitted job. The output queue name is obtained from the profile when this command is run.
- *DEV
- The output queue associated with the printer specified on the Device (DEV) parameter of the printer file is used. The output queue has the same name as the printer. The printer file DEV parameter is determined by the Create Printer File (CRTPRTF), Change Printer File (CHGPRTF), or the Override with Printer File (OVRPRTF) commands.
Note: This assumes the defaults were specified on the OUTQ parameter for the printer file, job description, user profile, and workstation.
- *JOBD
- The output queue named in the job description used with the submitted job is the job's default output queue.
Qualifier 1: Output queue
- name
- Specify the name of the output queue that is used as the default output queue by the submitted job.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the output queue. If no library is specified as the current library of the thread, the QGPL library is used.
- name
- Specify the library where the output queue is located.
User (USER)
Specifies the name of the user profile for the job being submitted. If *RQD is specified in the job description, *JOBD cannot be specified. Instead, *CURRENT or a user-name must be specified.
Note: The following IBM-supplied objects are not valid for this parameter:
- QDBSHR
- QDFTOWN
- QDOC
- QLPAUTO
- QLPINSTALL
- QRJE
- QSECOFR
- QSPL
- QSYS
- QTSTRQS
- *CURRENT
- The same user profile used by the job that is currently running is used for the submitted job.
- *JOBD
- The user profile named in the specified job description is used for the job being submitted.
- name
- Specify the name of the user profile that is used for the job being submitted.
Print text (PRTTXT)
Specifies the text that is printed at the bottom of each page of printed output and on separator pages.
- *CURRENT
- The same print text of the submitting job is used.
- *JOBD
- The value in the job description is used for this job.
- *SYSVAL
- The system value, QPRTTXT, is used.
- *BLANK
- No text is printed.
- character-value
- Specify the character string that is printed at the bottom of each page. A maximum of 30 characters can be entered, enclosed in apostrophes.
Routing data (RTGDTA)
Specifies the routing data used to start the next routing step in the job. The routing data is used to determine the routing entry that identifies the program that the job runs.
- QCMDB
- The routing data used by the IBM-supplied subsystems to route batch jobs to the IBM-supplied control language processor QCMD is used.
- *JOBD
- The routing data specified in the job description is used.
- *RQSDTA
- The first 80 characters of the request data specified in the Request data or command (RQSDTA) parameter of this command are used as the routing data for the job.
- character-value
- Specify the character string that is used as the routing data for starting the job. A maximum of 80 characters can be entered, enclosed in apostrophes if necessary.
Request data or command (RQSDTA)
Specifies the request data that is placed as the last entry in this job's message queue. The request data can be a CL command to be run or a string of characters used by another program.
- *CMD
- The input from the Command to run (CMD) parameter is placed in this job's message queue.
- *JOBD
- The request data specified in the job description used by the job is placed in this job's message queue.
- *NONE
- No request data is placed in the job's message queue.
- *RTGDTA
- The routing data specified in the Routing data (RTGDTA) parameter of this command is placed as the last entry in the job's message queue.
- character-value
- Specify the character string that is placed as the last entry in the submitted job's message queue. A maximum of 3000 characters can be entered, enclosed in apostrophes if necessary.
System library list (SYSLIBL)
Specifies the system portion of the initial library list that is used by the submitted job.
- *CURRENT
- The same system library list being used by the thread that is currently running is used for the submitted job.
- *SYSVAL
- The system default system library list is used by the job. It contains the library names that were specified in the system value, QSYSLIBL, at the time that the job is started.
Current library (CURLIB)
Specifies the name of the current library associated with the submitted job.
- *CURRENT
- The current library being used by the thread that is currently running is used for the submitted job.
- *USRPRF
- The current library in the user profile under which the submitted job initially runs is used as the current library for the submitted job.
- *CRTDFT
- There is no current library for the submitted job. If objects are created in the current library, QGPL is used as the default current library.
- name
- Specify the library used as the current library of the submitted job.
Initial library list (INLLIBL)
Specifies the initial user part of the library list that is used to search for any object names that were specified without a library qualifier.
Note: Duplication of library names in the library list is not allowed.
Single values
- *CURRENT
- The library list being used by the thread that is currently running is used for the submitted job.
- *JOBD
- The library list in the job description used with this job is used as the initial user part of the library list for the job.
- *SYSVAL
- The system default user library list is used by this job. It contains the library names that were specified in the system value QUSRLIBL at the time that the job is started.
- *NONE
- The user portion of the initial library list is empty.
Other values (up to 250 repetitions)
- name
- Specify the names of one or more libraries that are the user portion of the library list and are used by this job. The libraries are searched in the same order as they are listed.
Initial ASP group (INLASPGRP)
Specifies the initial setting for the auxiliary storage pool (ASP) group name for the initial thread of the submitted job. A thread can use the Set ASP Group (SETASPGRP) command to change its library name space. When an ASP group is associated with a thread, all libraries in the independent ASPs in the ASP group are accessible and objects in those libraries can be referenced using regular library-qualified object name syntax. The libraries in the independent ASPs in the specified ASP group plus the libraries in the system ASP (ASP number 1) and basic user ASPs (ASP numbers 2-32) form the library name space for the thread.
- *CURRENT
- The ASP group name for the current thread is used for the submitted job.
- *JOBD
- The initial ASP group name specified in the job description is used for the submitted job.
- *NONE
- Specifies the initial thread of the submitted job will be started with no ASP group. The library name space will not include libraries from any ASP group. Only the libraries in the system ASP and any basic user ASPs will be in the library name space.
- name
- Specify the name of the ASP group to be set for the initial thread of the submitted job. The ASP group name is the name of the primary ASP device within the ASP group. All libraries from all ASPs in this ASP group will be included in the library name space.
Message logging (LOG)
Specifies the message logging values used to determine the amount and type of information sent to the job log by this job. This parameter has three elements: the message (or logging) level, the message severity, and the level of message text.
Element 1: Level
- *JOBD
- The value specified for message logging in the job description is used for this job.
- 0-4
- Specify the message logging level used for this job's messages. The possible logging levels are:
- 0
- No messages are logged.
- 1
- All messages sent to the job's external message queue with a severity greater than or equal to the message logging severity are logged. This includes the indications of job start, job end, and job completion status.
- 2
- The following information is logged:
- Logging level 1 information
- Request messages which result in a high-level message with a severity code greater than or equal to the message logging severity. Both the request message and all associated messages are logged.
Note: A high-level message is one that is sent to the program message queue of the program that receives the request message. For example, QCMD is an IBM-supplied request processing program that receives request messages.
- 3
- The following information is logged:
- Logging level 1 and 2 information
- All request messages
- Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.
- 4
- The following information is logged:
- All request messages and all messages with a severity greater than or equal to the message logging severity, including trace messages.
- Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.
Element 2: Severity
- *JOBD
- The value specified for message logging in the job description is used for this job.
- 0-99
- Specify the message severity that is used in conjunction with the logging level to determine which error messages are logged in the job log.
Element 3: Text
- *JOBD
- The value specified for message logging in the job description is used for this job.
- *MSG
- Only the message text is written to the job log.
- *SECLVL
- Both the message text and the message help (cause and recovery) of the error message are written to the job log.
- *NOLIST
- If the job ends normally, no job log is produced. If the job ends abnormally (if the job end code is 20 or higher), a job log is produced. The messages that appear in the job log contain both the message text and the message help.
Log CL program commands (LOGCLPGM)
Specifies whether the commands that are run in a control language program are logged to the job log by way of the CL program's message queue. This parameter sets the status of the job's logging flag. If *JOB has been specified for the Message logging (LOG) parameter in the Create CL Program (CRTCLPGM) command, the flag set in the Log CL program commands (LOGCLPGM) parameter is used. Other values for the Message logging (LOG) parameter override the Log CL program commands (LOGCLPGM) parameter. The commands are logged in the same manner as the requests.
- *JOBD
- The value specified in the job description is used.
- *NO
- The commands in a CL program are not logged to the job log.
- *YES
- The commands in a CL program are logged to the job log.
Job log output (LOGOUTPUT)
Specifies how the job log will be produced when the job completes. This does not affect job logs produced when the message queue is full and the job message queue full action specifies *PRTWRAP. Messages in the job message queue are written to a spooled file, from which the job log can be printed, unless the Control Job Log Output (QMHCTLJL) API was used in the job to specify that the messages in the job log are to be written to a database file.
The job log output value can be changed at any time until the job log has been produced or removed. To change the job log output value for a job, use the Change Job (QWTCHGJB) API or the Change Job (CHGJOB) command.
The job log can be displayed at any time until the job log has been produced or removed. To display the job log, use the Display Job Log (DSPJOBLOG) command.
The job log can be removed when the job has completed and the job log has not yet been produced or removed. To remove the job log, use the Remove Pending Job Log (QWTRMVJL) API or the End Job (ENDJOB) command.
- *JOBD
- The value specified in the job description is used.
- *SYSVAL
- The value specified in the system value QLOGOUTPUT is used.
- *JOBLOGSVR
- The job log will be produced by a job log server. For more information about job log servers, refer to the Start Job Log Server (STRLOGSVR) command.
- *JOBEND
- The job log will be produced by the job itself. If the job cannot produce its own job log, the job log will be produced by a job log server. For example, a job does not produce its own job log when the system is processing a Power Down System (PWRDWNSYS) command.
- *PND
- The job log will not be produced. The job log remains pending until removed.
Job message queue maximum size (JOBMSGQMX)
Specifies the maximum size of the job message queue.
- *JOBD
- The value specified in the job description determines maximum size of the job message queue.
- *SYSVAL
- The value in system value QJOBMSGQMX at the time the job is started is used as the maximum size of the job message queue.
- 2-64
- Specify the maximum size, in megabytes, of the job message queue.
Job message queue full action (JOBMSGQFL)
Specifies the action that should be taken when the job message queue is full.
- *JOBD
- The value specified in the job description determines the action that should be taken.
- *SYSVAL
- The value specified for the QJOBMSGQFL system value is used.
- *NOWRAP
- The message queue does not wrap when it is full. This action ends the job.
- *WRAP
- The message queue wraps to the start of the message queue when full and starts filling the message queue again.
- *PRTWRAP
- The message queue wraps the job message queue when full and prints the messages that are being overlaid because of wrapping.
Inquiry message reply (INQMSGRPY)
Specifies the way that predefined messages that are sent as a result of running this job are answered. You can specify that the inquiry message reply control is taken from the job description, or that all inquiry messages require a reply, or that a default reply is issued, or that the system reply list is checked for a matching reply as each predefined inquiry message is sent.
- *JOBD
- The inquiry message reply control specified in the job description used with this job is used.
- *RQD
- A reply is required by the receiver of the inquiry message for all inquiry messages that occur when this command is run.
- *DFT
- The default message reply is used to answer any inquiry messages issued when this command is run.
- *SYSRPYL
- The system reply list is checked to see if there is an entry for any inquiry message that is issued as a result of running this job that has a message identifier and any comparison data that match the inquiry message identifier and message data. If a match occurs, the reply value in that entry is used. If no entry exists for that message, a reply is required.
Hold on job queue (HOLD)
Specifies whether this job is held at the time that it is put on the job queue. A job placed on the job queue in the hold state is held until it is released by the Release Job (RLSJOB) command or ended, either by the End Job (ENDJOB) command or by the Clear Job Queue (CLRJOBQ) command.
- *JOBD
- The value specified in the job description determines whether the job is held when it is put on the job queue.
- *NO
- The job is not held when it is put on the job queue.
- *YES
- The job is held when it is put on the job queue until it is released ended.
Schedule date (SCDDATE)
Specifies the date on which the scheduled job is submitted to the job queue and is eligible to run.
If your system or your job is configured to use the Julian date format, *MONTHSTR and *MONTHEND are calculated as if the system or job did not use the Julian date format.
- *CURRENT
- The submitted job becomes eligible to run on the current date.
- *MONTHSTR
- The submitted job becomes eligible to run on the first day of the month. If today is the first day of the month and the time you specify on the SCDTIME parameter has not passed, the job becomes eligible to run today. Otherwise, the job becomes eligible on the first day of the next month.
- *MONTHEND
- The submitted job becomes eligible to run on the last day of the month. If today is the last day of the month and the time you specify on the SCDTIME parameter has not passed, the job becomes eligible to run today. Otherwise, if today is the last day of the month and the time you specify on the SCDTIME parameter has passed, the job becomes eligible on the last day of the next month.
- *MON
- The job becomes eligible to run on Monday.
- *TUE
- The job becomes eligible to run on Tuesday.
- *WED
- The job becomes eligible to run on Wednesday.
- *THU
- The job becomes eligible to run on Thursday.
- *FRI
- The job becomes eligible to run on Friday.
- *SAT
- The job becomes eligible to run on Saturday.
- *SUN
- The job becomes eligible to run on Sunday.
- date
- Specify a date in the job date format with or without separators.
Schedule time (SCDTIME)
Specifies the time on the scheduled date at which the job becomes eligible to run.
Note: Although the time can be specified to the second, the load on the system may affect the exact time at which the submitted job becomes eligible to run.
The order that job entries with identical SCDDATE and SCDTIME values appear on the job queue may be different than the order in which they arrived. Likewise, these jobs may leave the job queue to be processed in an order different than the order in which they were entered. Do not assume jobs are entered or processed sequentially when they are scheduled to start at exactly the same time.
- *CURRENT
- The job is submitted at the current time.
- time
- Specify the time you want the job to start. The time is specified in 24-hour format and can be specified with or without a time separator:
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 to 23. Valid values for mm and ss range from 00 to 59.
- With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If this command is entered from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
Job date (DATE)
Specifies the date that is assigned to the job when it is started.
- *JOBD
- The date specified in the job description is the job date.
- *SYSVAL
- The value in the QDATE system value at the time the job is started is the job date.
- date
- Specify the value that is used as the job date when the job is started; the date must be specified in the job date format.
Job switches (SWS)
Specifies the first settings for a group of eight job switches used with this job. These switches can be set or tested in a CL program and used to control the flow of the program. Only 0's (off) and 1's (on) can be specified in the 8-digit character string.
- *JOBD
- The value specified in the job description is the first setting for the job's switches.
- character-value
- Specify any combination of eight zeros and ones that is used as the first switch setting for the submitted job.
Allow display by WRKSBMJOB (DSPSBMJOB)
Specifies whether the job being submitted is allowed to be shown on the Work with Submitted Jobs panel. Any submitted job of the type specified by the Jobs submitted from (SBMFROM) parameter of the Work with Submitted Jobs (WRKSBMJOB) command can be shown if the job is not prevented by this parameter.
- *YES
- This job can be shown by the WRKSBMJOB command.
- *NO
- This job is not shown on any display produced by the WRKSBMJOB command.
Submitted for (SBMFOR)
Specifies the job name to be used on the Jobs submitted from (SBMFROM) parameter of the Work with Submitted Jobs (WRKSBMJOB) command.
Single values
- *CURRENT
- The name of the currently active job is used.
Qualifier 1: Submitted for
- name
- Specify the name of the job.
Qualifier 2: User
- name
- Specify the user name that identifies the user profile under which the job is run.
Qualifier 3: Number
- 000000-999999
- Specify the job number.
Note: You must have job control (*JOBCTL) special authority to use this parameter.
Message queue (MSGQ)
Specifies the message queue to which a completion message is sent when the submitted job has completed running, either normally or abnormally. If an abnormal ending occurs, the help information for the completion message specifies the possible causes.
Single values
- *USRPRF
- A completion message is sent to the message queue specified in the user profile of the submitter.
- *WRKSTN
- A completion message is sent to the work station message queue of the work station from which the job was submitted. If the job is submitted by a batch job, no completion message is sent.
- *NONE
- No completion message is sent.
Qualifier 1: Message queue
- name
- Specify the name of the message queue to which the completion message is sent.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the message queue. If no library is specified as the current library for the thread, the QGPL library is used.
- name
- Specify the library where the message queue is located.
Sort sequence (SRTSEQ)
Specifies the sort sequence table to be used for string comparisons for this job.
Single values
- *CURRENT
- The sort table specified for the job that is currently running is used.
- *USRPRF
- The sort table specified in the user profile under which the submitted job initially runs is used. The user profile is specified on the User (USER) parameter.
- *SYSVAL
- The system value QSRTSEQ is used.
- *HEX
- A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.
- *LANGIDUNQ
- A unique-weight sort table is used.
- *LANGIDSHR
- A shared-weight sort table is used.
Qualifier 1: Sort sequence
- name
- Specify the name of the sort sequence table.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is used.
- name
- Specify the library where the sort sequence table is located.
Language ID (LANGID)
Specifies the language identifier to be associated with this job. The language identifier is used when *LANGIDUNQ or *LANGIDSHR is specified on the Sort sequence (SRTSEQ) parameter. If the job CCSID is 65535, this parameter is also used to determine the value of the job default CCSID (DFTCCSID).
- *CURRENT
- The language identifier specified for the job that is currently running is used.
- *USRPRF
- The language ID specified in the user profile under which the submitted job runs is used. The user profile is specified on the User (USER) parameter.
- *SYSVAL
- The system value QLANGID is used.
- character-value
- Specify the language identifier to be used by the job.
Country or region ID (CNTRYID)
Specifies the country or region identifier (ID) to be used by the job.
- *CURRENT
- The country or region ID specified for the job that is currently running is used.
- *USRPRF
- The country or region ID specified in the user profile under which the submitted job runs is used. The user profile is specified on the User (USER) parameter.
- *SYSVAL
- The system value QCNTRYID is used.
- character-value
- Specify the country or region ID to be used by the job.
Coded character set ID (CCSID)
Specifies the coded character set identifier (CCSID) used for the submitted job.
- *CURRENT
- The CCSID specified for the job that is currently running is used.
- *USRPRF
- The CCSID specified in the user profile where the submitted job initially runs is used.
- *SYSVAL
- The CCSID specified in the system value QCCSID at the time the job is started is used.
- *HEX
- The CCSID 65535 is used.
- 1-65535
- Specify the CCSID.
Copy environment variables (CPYENVVAR)
Specifies whether the environment variables from the submitting job are copied to the new job.
- *NO
- The environment variables are not copied.
- *YES
- The environment variables are copied.
Allow multiple threads (ALWMLTTHD)
Specifies whether or not the job is allowed to run with multiple user threads. This attribute does not prevent the operating system from creating system threads in the job. This attribute is not allowed to be changed after the job is submitted.
- *JOBD
- The value specified in the job description determines whether or not the job is allowed to run with multiple user threads.
- *NO
- The job is not allowed to run with multiple user threads.
- *YES
- The job is allowed to run with multiple user threads.
Spooled file action (SPLFACN)
Specifies whether or not spooled files are accessed through job interfaces after the job ends. Keeping spooled files with jobs allows job commands such as Work with Submitted Jobs (WRKSBMJOB) to work with the spooled files even after the job has ended. Detaching spooled files from jobs reduces the use of system resources by allowing job structures to be recycled when the jobs end.
- *CURRENT
- The value from the current job is used for the submitted job.
- *JOBD
- The value in the job description is used.
- *SYSVAL
- The value specified in the system value QSPLFACN is used.
- *KEEP
- When the job ends, if spooled files for the job exist in the system auxiliary storage pool (ASP 1) or in a basic user ASP (ASPs 2-32), the spooled files are kept with the job and the status of the job is updated to indicate that the job has completed. When all remaining spooled files for the job are in independent ASPs (ASPs 33-255), the spooled files will be detached from the job and the job will be removed from the system.
- *DETACH
- When the job ends, the spooled files are detached from the job and the job is removed from the system.
Example 1: Submitting a Job
SBMJOB JOB(SPECIAL) JOBD(MYLIB/MYJOBD) CMD(CALL MYPROG)
This command causes the job named SPECIAL to be submitted. Most of the attributes for the job are taken from the job description MYJOBD, or the job that is currently running, except for the command. The CALL command is placed on the submitted job's message queue so that the program MYPROG can be called and run later.
Example 2: Submitting a Job
SBMJOB JOB(PAYROLL) JOBD(PAYROLL) INQMSGRPY(*RQD)
This command submits a job named PAYROLL to the system. All the information needed for this job (such as the job queue and routing data but not the inquiry message control value) is contained in the job description PAYROLL, or the job that is currently running. The library list in effect for the job issuing this command is used to find the job description. All inquiry messages sent during running of this job requires the receiver of the inquiry message to reply.
Example 3: Submitting a Job to a Job Queue
SBMJOB JOBD(*USRPRF) JOB(COPY12) JOBQ(NIGHTQ)
CMD(CPYF FILEA FILEB)
This command submits the job COPY12, which uses the job description in the user profile of the submitting job, to the job queue NIGHTQ. The CMD parameter provides the CL command necessary for the job to run. A command such as this might be used to copy the file at night while the system is unattended.
*ESCAPE Messages
- CPF133A
- SBMJOB not allowed during IPL.
- CPF1338
- Errors occurred on SBMJOB command.
- CPF1651
- Sort sequence table not accessed.