Submit Job Exit Point


  Required Parameter: None

  Exit Point Name: QIBM_QWT_SBMJOB

  Exit Point Format Name: SBMJ0100

The Submit Job exit program is called from the job using the SBMJOB command before the job is put on a job queue.

See Required Parameter Group for parameter information or Format Usage Notes for usage information.


Authorities and Locks

Required Parameter Group

Exit information
INPUT CHAR(*)

The data that is passed to the exit program. The data contains identification for the submitted job and the resolved job attributes at the time it is put on the job queue. For details, see SBMJ0100 Format.

Length of exit information
INPUT; BINARY(4)

The length of the data sent to the exit program.


SBMJ0100 Format

The following table describes the information that is located in the Exit information parameter for the SBMJ0100 format. For detailed descriptions of the fields, see Field Descriptions. See the SBMJOB command for additional information.


Field Descriptions

See the SBMJOB command and Work Management API Attribute Descriptions (WMAttrDesc) for additional details.

Accounting code The identifier assigned to the job to collect resource use information for the job when job accounting is active.

Allow display by WRKSBMJOB Whether the Work with Submitted Jobs (WRKSBMJOB) shows the submitted job. The values are *YES or *NO.

Allow multiple threads Whether secondary threads are allowed for the submitted job. The values are 0 (don't allow) and 1 (allow).

Coded character set ID The coded character set identifier used for the job.

Command or request data The command the job will run or the request data that is placed as an entry in the job's message queue.

Copy environment variables Whether the environment variables from the submitting job are copied to the new job. The values are *YES or *NO.

Country or region ID The country or region identifier associated with the job.

Current library The name of the current library that will be used for the job.

Initial ASP group The auxiliary storage pool (ASP) group name for the initial thread of the submitted job.

Inquiry message reply How the job answers inquiry messages. The possible values are *RQD, *DFT, *SYSRPYL.

Internal job identifier. An input value to other APIs to increase the speed of locating the job on the system. Only IBM i APIs use this identifier. The identifier is not valid following an initial program load (IPL). If you attempt to use it after an IPL, an exception occurs. Do not attempt to use the identifier until after this exit program returns.

Hold on job queue Whether the job is held at the time that it is put on the job queue. The values are *YES or *NO.

Job date This is the date to be used for the job. It is in the format CYYMMDD where C is the century, YY is the year, MM is the month, and DD is the day. A 0 for the century flag indicates years 19xx and a 1 indicates years 20xx. The special value 0010000 indicates the system date will be used for the job date when the job starts.

Job description The name of the job description for the submitted jobs. The job description contains attributes that determine how the job is run.

Job description library The library containing the job description.

Job log output How the job log will be produced when the job completes.

Job message queue full action The action to take when the job message queue is full. The possible values are *NOWRAP, *WRAP, *PRTWRAP.

Job message queue maximum size The maximum size (in megabytes) that the job message queue can reach. The range is 2 to 64.

Job name The name of the submitted job. See usage notes.

Job number The number of the submitted job.

Job queue The name of the job queue for the submitted job.

Job queue library The name of the library where the job queue is located.

Job queue library ASP device name The name of the auxiliary storage pool (ASP) device description for the ASP containing the job queue.

Job queue priority The scheduling priority of the job compared to other jobs on the same job queue.

Job switches The initial setting of the job switches used by the job.

Job user The user profile name of the submitted job.

Language ID The language identifier associated with the job.

Length of command or request data The length of the command or request data.

Log CL program commands Whether or not commands are logged for CL programs that are run. The possible values are *YES and *NO.

Logging level What type of information is logged in the job log of the submitted job. The possible values are 0 - 4.

Logging severity The severity level that is used in conjunction with the logging level to determine which error messages are logged in the job log.

Logging text The level of message text that is written in the job log when a message is logged according to the logging level and logging severity. The possible values are *MSG, *SECLVL, *NOLIST.

Message queue The message queue where the completion message is sent when the submitted job has completed running. Possible values include *USRPRF and *WRKSTN.

Message queue library The library containing the message queue for the completion message.

Number in system library list The number of libraries in the system library list.

Number in user library list The number of libraries in the user library list.

Offset to command or request data The offset from the start of the format to the start of the command or request data.

Offset to system library list The offset from the start of the format to the start of the system library list.

Offset to user library list The offset from the start of the format to the start of the user library list.

Output queue The name of the default output queue that is used for spooled output produced by the job.

Output queue library The name of the library containing the output queue.

Output queue priority The output priority for spooled files the job produces.

Print device The printer device used for printing output from the job.

Print text The line of text (if any) that is printed at the bottom of each page of printed output for the job.

Routing data The routing data that is used to determine the routing entry that identifies the program to start for the routing step.

Scheduled date and time Date and time the job is scheduled to become active. This field is returned as hexadecimal zeros if the job is not a scheduled job. The format for this field is the system time-stamp format.

Sort sequence The sort sequence table associated with the job. Possible values include *HEX, *LANGIDSHR, and *LANGIDUNQ.

Sort sequence library The library containing the sort sequence table associated with thes job.

Spooled file action Whether spooled files are accessed through job interfaces after the job has completed its normal activity. The possible values are *KEEP, *DETACH.

Submitted for job - qualified The format of the qualified job name is a 10-character simple job name, a 10-character user name, and a 6-character job number.

System library list The initial system part of the library list for the job. This field will contain an array of library names or *SYSVAL.

Time-stamp job entered system Date and time the job entered the system. The format for this field is the local system time-stamp format.

User library list The initial user part of the library list for the job. This field will contain an array of library names or *SYSVAL.

Program Data

When you register the exit program, the following is required for the program data.



Field Descriptions

Job queue. The exit program will be called when a job is submitted to this job queue. The following special value is supported:

Job queue library. The name of the library that contains the job queue. The following special value is supported:




Usage Notes

  1. The exit program is called from the job executing the SBMJOB command. The submitting job's environment can be referenced by the exit program as the current job.
  2. The exit program is called before the submitted job is put on the job queue. The submitted job is not yet visible from most interfaces. The submitted job cannot be retrieved, changed, held, or ended.
  3. The exit program is not called from system jobs including the job scheduler job.
  4. The exit program is not called if the thread was masked from interrupts when the SBMJOB command was executed.
  5. The information is retrieved from the registration facility and saved the first time the exit is used in a job. Changes to the job queues registered may not be reflected until a new job starts.
  6. Exceptions signalled to the caller of the exit program will not cause the job submission to fail.
  7. The job attributes for the submitted job cannot be changed by the exit program.
  8. See the Command analyzer exit points and Job Notification exit point for other exits related to submitted jobs.

Exit program introduced: V7R4

[ Back to top | Work Management APIs | APIs by category ]