Universal Submit Job from zOS to IBM i Using Remote Reply Facility

Universal Submit Job from z/OS to IBM i using the Remote Reply Facility

This example demonstrates how to submit an IBM i batch job from z/OS and use the Remote Reply Facility.

Native IBM i SBMJOB parameters can be specified as part of the Universal Submit Job USBMJOB command. The Remote Reply Facility detects messages, issued by the submitted job, that require a reply. The message then will be passed to a remote z/OS system for a reply. When the reply is received, the reply will be sent to the IBM i message queue that is waiting for the reply.

z/OS issues the message to the z/OS console as a WTOR (Write To Operator with Reply) message. The WTOR message is written to the z/OS console using the Stonebranch USS uwto command. The reply to the message is sent back to the IBM i system.



This UCMD Manager executes the script on host called ibmi-hostname. The IBM i user ID ibmi-username and password ibmi-password are used for authentication on the IBM i system. The script runs with the authority of user ibmi-username.

The reply message, should there be one, is sent to the host name zos-hostname for a reply. The z/OS USS uwto command runs with user ID zos-username and password zos-password.

The first line of the script will add the library UNVPRD510 to the library concatenation. The second line will execute the command dsplib ibmi-username with the USBMJOB utility. All output created by the command will be spooled to stdout of the manager job.

The Remote Reply Facility is turned on with the RMTRPY parameter; therefore, USBMJOB will send all messages requiring a reply to the remote z/OS console on host zos-hostname, as specified on the RMTHOST parameter. Replies to the inquiry messages are received from the z/OS console and sent to the IBM i message queue waiting for the reply.

The z/OS USS UWTO command is executed with the authority of the z/OS user zos-userid and zos-password, as specified by the RMTUSER and RMTPWD parameters, respectively. The z/OS console message is prefixed with TESTPRFX, as specified by the RMTMSGPRFX parameter.

If a response is not received within 60 seconds, the WTOR will be deleted and a new one sent, as specified by the RMTREFRESH parameter. The UWTO executable is found on the z/OS USS system at /usr/local/universal/bin/uwto, as specified by the MSGCMDPATH parameter. If uwto is in the USS system PATH, MSGCMDPATH is not required.

USBMJOB Options

The USBMJOB options used in this example are:

Option

Description

CMD

Specifies a command that runs in the submitted batch job. The command can be a maximum of 3000 characters.

RMTRPY

Specifies whether USBMJOB will use the Remote Reply Facility.

RMTREFRESH

Specifies the number of seconds to refresh the z/OS console message if no reply is received. The previous message is deleted from the console and a new one is issued.

RMTMSGPRFX

Specifies a text string up to 12 characters that will prefix the message written to the z/OS console.

RMTHOST

Specifies the host name or IP address of the z/OS system on which the reply message is issued.

MSGCMDPATH

Specifies the path name of the z/OS USS uwto program. If the uwto program is in the system PATH, this parameter is not required.

RMTUSER

Specifies the z/OS user ID with which the uwto program is executed.

RMTPWD

Specifies the password for the z/OS user ID specified with the RMTUSR parameter.

SYSIN Options

The SYSIN options used in this example are:

Option

Description

-script

ddname from which to read a script file. The script file is sent to the remote system by UCMD Manager for execution.

-host

Host name or IP address of the remote system on which to execute the script.

-userid

Remote user ID with which to execute the command.

-pwd

Password for the remote user ID.

Components

Universal Command Manager for z/OS

Universal Submit Job