SBMJOBJS (Submit Job using Job Scheduler)

Note: To use this command, have the 5722-JS1 (Job Scheduler for iSeries) licensed program installed.

SBMJOBJS Command syntax diagram

 

Purpose

The Submit Job using Job Scheduler (SBMJOBJS) command allows you to submit a job from Job Scheduler.

Note: When referring to a job in this command, we are referring to an entry in Job Scheduler. An entry in Job Scheduler is a user-defined name for commands or programs that you want to process at scheduled times and dates. Job Scheduler jobs (entries) are not OS/400 objects.

 

Restrictions

  1. The user must have use authority to the job description and the user profile.
  2. The user must have use and add authorities to the message queue and the output queue.
  3. The user must have read authority to the job queue and to all libraries associated with the specified objects. CHGJOBJS, SBMJOBJS
  4. The user must have use authority to the *ADDJOB function.

 

Required Parameters

JOB
Specifies the name of the job schedule entry that you want to submit. You must specify a job and alternately can specify a group to which the job belongs as well as a sequence number for the job within the group.

Submitting a job from within a group does not start the group. It only runs the job that was selected for submission. If the sequence 1 job within the group is submitted, the whole group is submitted.

Element 1: Job

job-name: Specify the user-defined name of the job schedule entry.

Element 2: Group

*NONE: There is not a group associated with this job.

group-name: Specify the name of the group of which this job is a member.

Element 3: Group sequence

*NONE: There is not a sequence number assigned to the job.

group-sequence-number: Specify the sequence number of the job. Sequence numbers can range from 1 to 99.

 

Optional Parameters

TIME
Specifies the time that you want this job to be submitted. Jobs can be submitted at a specified time, immediately, or at the next scheduled time. Times are entered in hour, minute (HHMM) format and can range from 0001 to 0024 (midnight).

*SCHED: The job is to be submitted by Job Scheduler at the next scheduled time.

*IMMED: The job is submitted immediately.

submit-time: Specify the time that you want the job to be submitted by Job Scheduler in hour, minute (HHMM) format.

DATE
Specifies the date that you want this job to be submitted. Dates are specified in job date format.

*CURRENT: The job is to be submitted by Job Scheduler on the current date at the time specified in the TIME parameter.

submit-date: Specify the date that you want the job to be submitted by Job Scheduler.

STRSEQ
Specifies the starting command sequence number for the job that you are submitting.

*FIRST: Start with the first command sequence number for the job that you are submitting.

sequence-number: Specify the sequence number of the command within the job that you want to start with.

PARM
Specifies the name of the parameter that you want to use for the submitted job. Parameters that you specify must be defined in Job Scheduler.

You can enter multiple values for this parameter. If you are on an entry display and you need additional entry fields to enter these multiple values, type a plus sign (+) in the entry field opposite the phrase "+ for more", and press the Enter key.

Any character is valid for entry into this field. Validity will be checked to the extent of the use of the parameter within your programs or at the processing of the Job Scheduler job when submitted. The number of characters in the PARM parameter should correspond with the length placed in the Parameter length field when the parameter was added to Job Scheduler. Data entered in a shorter length than the Parameter length field will pass data padded with blanks to the length of the parameter. Leading blanks and embedded blanks will be passed to the parameter in your request data exactly as keyed. Apostrophes (') used in parameter data must appear in pairs to be valid. If only one apostrophe is used, the parameter will be rejected with the error "Quotes ('') in Parameter Data Must Appear In Pairs". You must correct this error before continuing.

*NONE: The job that you are submitting does not require any parameters entered here.

Element 1: Parameter name

parameter-name: Specify the parameter that you want to use with this job.

Element 2: Parameter data

Specify the parameter data that you want to use for the parameter name that you specified in the PARM parameter.

parameter-data: Specify the parameter data for the parameter name.

RMTLOCNAME
Specifies the location and network identification of the remote location name on which to run the job.

Note: A value specified in the RMTLOCNAME parameter will be ignored when used with schedule code *ALTERNATE.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: Use the remote location name specified in the job controls.

*LCL: Run the job on the local server.

remote-location-name: Specify the name of the location associated with the server on which to run the job.

network-ID.location-name: Specify the network identifier and the name of the location associated with the server. Specify these values using the format nnnnnnnn.cccccccc where nnnnnnnn is the network identifier and cccccccc is the location name.

MAXRUN
Specifies the maximum run duration in minutes for the job.

Note: A value specified in the MAXRUN prompt will be ignored when used with schedule code *ALTERNATE.

*SAME: The value specified in the Job Scheduler job entry is used.

*NOMAX: There is no maximum duration for the job.

maximum-run-time: Specify the number of minutes that is the maximum duration for this job. After this number of minutes has passed, Job Scheduler will end the job whether it has completed or not. The maximum minutes can range from 1 to 9999 minutes.

PGRRCPNORM
Specifies the pager recipient who is to receive normal completion messages for the job that you are submitting. This field is used in conjunction with command specified in the CHGPGRJS command.

Note: A paging product must be installed before this feature may be used.

You can specify the pager message that you want to send to the specified recipient when the job completes normally. The values that you specify for Pager recipient normal and Pager message are the substitution values used for the &RCP and &MSGTXT variables respectively in the CHGPGRJS.

Element 1: Pager recipient normal

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: You are using the pager recipient specified in the Job Scheduler job controls.

*NONE: No pager recipient is assigned to receive messages when this job completes normally.

recipient-name: Specify the name of a recipient who is to receive messages from the job when it completes normally.

Element 2: Pager message

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The pager recipient is sent the pager message from the Job Scheduler job controls.

*COMP: The job completion of the job is sent.

pager-message: Specify the page message that you want to send to the pager recipient when this job completes normally.

PGRRCPABN
Specifies the pager recipient who is to receive abnormal completion messages for the job that you are submitting. This field is used in conjunction with the CHGPGRJS command.

Note: A paging product must be installed before this feature may be used.

You can specify the page message that you want to send to the specified recipient when the job completes abnormally. The values that you specify for Pager recipient abnormal and Pager message are the substitution values used for the &RCP and &MSGTXT variables respectively in the CHGPGRJS command.

Element 1: Pager recipient abnormal

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: You are using the pager recipient specified in the Job Scheduler job controls.

*NONE: No pager recipient is assigned to receive messages when this job completes abnormally.

recipient-name: Specify the name of a recipient who is to receive messages from the job when it completes abnormally.

Element 2: Pager message

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The pager recipient is sent the page message from the Job Scheduler job controls.

*COMP: The job completion of the job is sent.

pager-message: Specify the page message that you want to send to the pager recipient when this job completes abnormally.

ALTJOB
Specifies the name of the alternate job for the job. Alternate jobs only run when a regular job ends abnormally. Jobs are not required to have alternate jobs. You can also specify the group and sequence number for the alternate job that you specify.

*SAME: The value specified in the Job Scheduler job entry is used.

*NONE: The job does not have an alternate job.

Element 1: Alternate job

alternate-job-name: Specify the name of the alternate job that you want to use with the job that you are adding.

Element 2: Group

*NONE: The alternate job does not have an alternate group.

group-name: Specify the name of the group associated with the alternate job for this job.

Element 3: Group sequence

*NONE: The alternate job does not have a sequence number assigned.

group-sequence-number: Specify the sequence number assigned to the alternate job. Sequence numbers can range from 1 to 99.

RPTDSTID
Specifies the report distribution ID that is used to distribute the reports generated as a result of processing the job.

*SAME: The value specified in the Job Scheduler job entry is used.

*NONE: The job does not have a report distribution ID.

report-distribution-ID: Specify the report distribution ID that you want to associate with this job.

RCYACN
Specifies the recovery action to be taken if the job cannot be submitted at the designated time because the system is powered down or in restricted state. The action specified on the parameter occurs at the next IPL or when the Job Scheduler system becomes active.

Jobs submitted during IPL or when the system comes out of restricted state are submitted in the same order that they would have been had the jobs been submitted at the times specified in the job schedule entries. If multiple occurrences of a recurring job are missed, the job is submitted only once. The first missed occurrence of the job is calculated from the current date.

Since the scheduler portion of IPL need not be complete for the IPL of the system to be complete, other jobs may start on the system before all of the jobs have been submitted.

This parameter does not apply:

  • When a job is released after being held at the date and time it was to be submitted.

Note: A value specified in the RCYACN prompt will be ignored when used with schedule code *ALTERNATE, *DEPJOB and *GROUP (subordinate job group).

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The job uses the recovery action specified in the Job Scheduler job controls.

*SBMRLS: The job is submitted in release state (RLS).

*SBMHLD: The job is submitted in the held state (HLD).

*NOSBM: The job is not submitted.

Specifying *NOSBM affects only missed occurrences of the job. If the job schedule entry is a recurring job, future occurrences are not affected.

JOBD
Specifies the name of the job description used with this job.

Element 1: Job Description

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The job description from the Job Scheduler job controls is used for this job.

*USRPRF: The job description in the user profile under which the submitted job runs is used as the job description of the submitted job.

job-description-name: Specify the name (library-name/job-description-name) of the job description used for the job.

Element 2: Library

*LIBL: The library list is used to locate the job description name.

*CURLIB: The current library for the job is used to locate the job description name. If no library is specified as the current library for the job, QGPL is used.

library-name: Specify the name of the library where the job description name is located.

JOBQ
Specifies the name of the job queue in which this job is placed.

Element 1: Job Queue

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The job queue specified in the Job Scheduler job controls is used for this job.

*JOBD: The submitted job is placed on the job queue named in the specified job description.

job-queue-name: Specify the name of the job queue.

Element 2: Library

Specify the name (library-name/job-queue-name) of the job queue on which the submitted job is placed.

*LIBL: The library list is used to locate the job queue name.

*CURLIB: The current library for the job is used to locate the job queue name. If no library is specified as the current library for the job, QGPL is used.

library-name: Specify the name of the library where the job queue name is located.

JOBPTY
Specifies the job queue scheduling priority. Valid values range from 1 through 9, where 1 is the highest priority and 9 is the lowest priority.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The scheduling priority default specified in the Job Scheduler job controls is used for the job.

*JOBD: The scheduling priority specified in the job description is used for the job.

job-priority: Specify a value, ranging from 1 through 9, for the scheduling priority for the job.

OUTPTY
Specifies the output queue priority for spooled output files that are produced by this job. Valid values range from 1 through 9, where 1 is the highest priority and 9 is the lowest priority.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The output priority default specified in the Job Scheduler job controls is used for the job.

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

output-priority: Specify a value, ranging from 1 through 9, for the output priority for the job.

PRTDEV
Specifies the qualified name of the default printer device for this job.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The printer specified in the Job Scheduler job controls is used by the job as the printer device.

*USRPRF: The printer device specified in the user profile where the submitted job runs is used as the printer device for this job. The printer device name is obtained from the profile when this job is submitted.

*SYSVAL: The printer device specified in the system value, QPRTDEV, when this job is submitted is used.

*JOBD: The printer device specified in the job description is used for the submitted job.

printer-device-name: Specify the name of the printer device used for the submitted job.

OUTQ
Specifies the qualified name of the output queue that is used for spooled output produced by the job. This parameter only applies to spooled printer files that specify *JOB for the output queue.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The output queue specified in the Job Scheduler job controls is used as the job's output queue.

*JOBD: The output queue named in the job description used with the submitted job is the job's default output queue.

output-queue-name: Specify the name (library-name/output-queue-name) of the output queue that is used as the default output queue by the submitted job.

*LIBL: The library list is used to locate the output queue name.

*CURLIB: The current library for the job is used to locate the output queue name. If no library is specified as the current library, QGPL is used.

library-name: Specify the name of the library where the output queue name is located.

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; a user name must be specified instead.

Note: The following IBM-supplied objects are not valid on this parameter:

  • QDBSHR
  • QDFTOWN
  • QDOC
  • QLPAUTO
  • QLPINSTALL
  • QRJE
  • QSECOFR
  • QSPL
  • QSYS
  • QTSTRQS



*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The user profile specified in the Job Scheduler defaults is used for the job being submitted.

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

user-name: Specify the name of the user profile that is used for the job being submitted. You must be authorized to the user profile; the user profile must be authorized to the job description.

PRTTXT
Specifies up to 30 characters of text that is printed at the bottom of each page of printed output and on separator pages.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job controls is used for this job.

*JOBD: The value in the job description is used for this job.

*SYSVAL: The system value, QPRTTXT, is used for this job.

*BLANK: No text is printed.

print-text: Specify the character string that is printed at the bottom of each page. A maximum of 30 characters can be entered, enclosed in apostrophes. The text on the listing will be centered in the same way it is entered.

RTGDTA
Specifies the routing data used to start the first routing step in the job. The routing data is used to determine the routing entry that identifies the program that the job runs.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job controls for routing data is used for this job.

*JOBD: The routing data specified in the job description is used to start the routing steps.

routing-data: Specify the character string that is used as routing data for the job. A maximum of 80 characters can be entered, enclosed in apostrophes if necessary.

CURLIB
Specifies the name of the current library associated with the job being run.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The Job Scheduler job controls are used for the submitted job.

*USRPRF: The current library in the user profile where the submitted job 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.

current-library-name: Specify the name of a library used as the current library of the submitted job.

LIBL
Specifies the name of the library list that is used to search for any operating system object names that were specified without a library qualifier. If you want to select a library list from a list, place the cursor within the LIBL parameter field and press F4.

*SAME: The value specified in the Job Scheduler job entry is used.

*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 for this job will be empty.

*JOBCTL: The Job Scheduler job control is used for the library list.

library-list-name: Specify the name of the library list that you want to use for this job.

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. If no values are specified on this parameter, the values specified in the job description associated with this job are used.

Element 1: Message level

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value specified in the Job Scheduler job controls for logging is used for this job.

*JOBD: The value specified for message logging in the job description is used for this job.

message-level: Specify a value, ranging from 0 to 4, that specifies the message logging level used for this job's messages. The possible logging levels are:

0: No data is logged.

1: The following information is logged: All messages sent to the job's external message queue with a severity level greater than or equal to the message severity specified (this includes the indications of job start, job end and job completion status).

2: The following information is logged:

  • Logging level 1 information

  • Requests or commands being logged from a CL program for which messages are issued with a severity code greater than or equal to the severity level specified.

  • All messages associated with a request, or commands being logged from a CL program, that results in a high-level message with a severity level greater than or equal to the severity specified.

3: The following information is logged:

  • Logging level 1 information

  • All requests or commands being logged from a CL program.

  • All messages associated with a request, or commands being logged from a CL program, that results in a high-level message with a severity level greater than or equal to the severity specified.

4: The following information is logged:

  • All requests or commands being logged from a CL program and all messages with a severity code greater than or equal to the severity specified, including trace messages.

    Note: A high-level message is one that is sent to the program message queue of the program that received the request or commands being logged from a CL program.

  • Message severity

    *SAME: The value specified in the Job Scheduler job entry is used.

    *JOBCTL: The value specified in the Job Scheduler job controls for message severity is used for this job.

    *JOBD: The value specified for message logging in the job description is used for this job.

    message-severity: Specify a value, ranging from 00 to 99, that specifies the lowest severity level that causes an error message to be logged in the job's log.

  • Message text

    *SAME: The value specified in the Job Scheduler job entry is used.

    *JOBCTL: The value specified in the Job Scheduler job controls for message text is used for this job.

    *JOBD: The value specified for message logging in the job description is used for this job.

    *MSG: Only message text is written to the job's log or shown to the user.

    *SECLVL: Both the message text and message help of the error message is written to the job's log or shown to the user.

    *NOLIST: No job log is produced if the job competes normally. If the job ends abnormally (if the end of job code is 20 or higher), a job log is produced. The messages appearing in the job's log contain both message text and online help information.

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 prompt (LOG parameter) in the Create CL Program (CRTCLPGM) command, the flag set in the LOGCLPGM parameter Log CL program commands prompt (LOGCLPGM parameter) is used. Other values for the Message logging prompt (LOG parameter) override the Log CL program commands prompt (LOGCLPGM parameter). The commands are logged in the same manner as the requests.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job controls is used for this job.

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

INQMSGRPY
Specifies the way that predefined messages that are sent as a result of running this job are answered. You can specify that no change is made in the way that predefined messages are answered, 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.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job control for inquiry message reply is used for this job.

*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 that occur 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
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.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job control for hold on job queue is used for this job.

*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 by a Release Job (RLSJOB) command or ended by an End Job (ENDJOB) command.

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.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job control for job switches is used for this job.

*JOBD: The value specified in the job description is the first setting for the job's switches.

switch-settings: Specify any combination of eight zeros and ones that is used as the first switch setting for the submitted job.

MSGQ
Specifies the name of 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.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The value in the Job Scheduler job control for message queue is used for this job.

*USRPRF: A completion message is sent to the message queue specified in the user profile of the submitter.

*NONE: No completion message is sent.

message-queue-name: Specify the name (library-name/message-queue-name) of the message queue on which the completion message is to be sent.

*LIBL: The library list is used to locate the message queue name.

*CURLIB: The current library is used to locate the message queue name.

library-name: Specify the name of the library where the message queue name is located.

ACGCDE
Specifies the accounting code that is used when logging system resource use for jobs that use this description.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The accounting code for jobs using this description is obtained from the job controls.

*JOBD: The accounting code for jobs using this description is obtained from the job description.

*USRPRF: The accounting code for jobs using this description is obtained from the user profile associated with the job.

*BLANK: An accounting code of 15 blanks is assigned to jobs that use this description.

accounting-code: Specify the accounting code that you want to use for jobs using this description.

RUNPTY
Specifies the run priority for the job. Run priority is a value ranging from 1 (highest priority) through 99 (lowest priority), that represents the importance of the job when it competes with other jobs for machine resources. This value represents the relative (not absolute) importance of the job. If the job is rerouted, this value is reset according to the job's importance within the job class.

*SAME: The value specified in the Job Scheduler job entry is used.

*JOBCTL: The run priority is obtained from the job controls.

*NOCHG: The run priority is not changed when job processing starts.

machine-running-priority: Specify the run priority, ranging from 1 through 99, that the job uses.

Example for SBMJOBJS

Example 1: Submitting a Job

SBMJOBJS JOB(JOB02) TIME('300') DATE('8/19/99')

In this example JOB02 is scheduled for submission at 3:00 a.m. on August 19, 1999. DATE is expressed in mm/dd/yy format in this example.

Error messages for SBMJOBJS

None