Universal Submit Job Usage


Usage

Universal Submit Job (USBMJOB) submits a user command in its own job. USBMJOB supports all of the command parameters offered by the SBMJOB command that make sense for an unscheduled job submitted from a batch environment. This enables the user to fully customize the job environment for the user command. Internally, the SBMJOB command is called to submit the user job.

USBMJOB remains active for the duration of the submitted job. USBMJOB continuously monitors the state of the submitted job at a user-defined polling interval. In addition to monitoring for job completion, USBMJOB can detect when the submitted job is waiting for a reply to an inquiry message.

USBMJOB provides the option for inquiry messages generated from the submitted job to be sent to a remote z/OS console. Replies received from the z/OS console are sent as reply messages to the corresponding inquiry message.

When the submitted job completes, USBMJOB writes the joblog for the submitted job to standard error and, optionally, to a job log output queue. The spooled output generated by the submitted job is written to standard output.

After USBMJOB has finished processing the submitted job, it completes by issuing an escape message to the external message queue. The escape message sets the return code for the USBMJOB command. The severity code of the escape message indicates the return code.

If the user job submitted by USBMJOB completes normally (end code < 20), the severity code for the USBMJOB escape message will be 0. If the user job submitted by USBMJOB completes abnormally (end code > 10), the severity code for the USBMJOB escape message will be set to the highest severity code generated by the submitted job.

By issuing an escape message with a severity code correlated with the submitted job's end code/highest severity code, USBMJOB allows the Universal Command Server to pick up the severity code. This, in turn, allows the USBMJOB command to propagate its return code to the Universal Command Server.

Two helper commands - supplied by Stonebranch, Inc. - are called internally by USBMJOB:

  • Universal Job initializer (UJOBINIT)
  • Universal Message Handler (UMSGHNDLR)

Universal Job initializer (UJOBINIT) is called from within the job submitted by USBMJOB. UJOBINIT performs initialization that allows USBMJOB to redirect the joblog of the submitted job and then issues the user command.

Universal Command Server Options Affecting USBMJOB

The Universal Command Server JOBLOG_COPY_KEEP configuration option controls the keeping a copy of the job log returned via standard output on the local iSeries system.

Output

In addition to joblog redirection, USBMJOB returns the jobs spooled output to the Universal Command Manager via standard output.

When the submitted job user name and the user profile name passed to the Universal Command Manager differ, USBMJOB requires *SPLCTL authority to retrieve the spooled output. USBMJOB receives this *SPLCTL authority from the UNVUBR511 user profile.

If *SPLCTL special authority is removed from the UNVUBR511 user profile, USBMJOB will fail if:

  1. Security is set to DEFAULT via the UNVCONF(UCMDS) configuration file and the submitted job user name and the user profile name passed to the Universal Command Manager differ.
     
    Example:
     

  2. Security is set to NONE via the UNVCONF(UCMDS) configuration file and a user name is specified for the submitted job.
     
    Example: