Executing URC and UMET within a Script via UCMD Manager for zOS

Executing Universal Return Code and Universal Message Translator within a Script via Universal Command Manager for z/OS

Note

As of Windows 2000, the Universal Return Code command is no longer necessary in Windows batch files. Microsoft added the ability to specify a script return code as an argument to the EXIT command in Windows 2000 and above.

The following example builds onto the Executing Universal Return Code within a Script via UCMD Manager for zOS example by adding a step that executes the Universal Message Translator (UMET) utility.

UMET could be used if the first command does not set the return code properly. The example exits with the return code of a command in the middle of the script with the use of Universal Return Code. A user variable called RC is set to the value of the return code of the UMET execution. The last line of the script then uses that value as the URC value to set the return code of the script equal to the exit code of the UMET execution.



The first command executes a backup script. The second command executes the UMET program and sets the return code of UMET based on the table definitions and the file being interrogated. The next line sets a variable called RC to the value of the return code of the UMET execution. The UCOPY command copies the log file to the Universal Command Manager. The next line deletes the log file. The last line of the script then uses the variable RC as the URC value in order to set the return code of the script equal to the return code of the UMET execution instead of the return code of the DEL command.

Script Options

The script options used in this example are:

Option

Description

-table

Translation table file name.

-file

Input message file name.

SYSIN Options

The SYSIN options used in this example are:

Option

Description

-host

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

-script

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

-userid

Remote user ID with which to execute the command.

-pwd

Password for the user ID.

Components

Universal Command Manager for z/OS

Universal Return Code

Universal Message Translator