Previous Topic: Remote Job: RJCLROOT=ICPYNext Topic: How to Tailor the Command Stream


BPXBATCH Remote Job Step for USS Objects

If a package shipment contains any USS objects, then an extra step (BPX) is inserted into the remote copy jobs to perform the required un-archive and copy commands. As delivered, the remote commands perform the following:

trap 'exit 1;' ERR -

Enables trapping of any errors following this point.

Note: If an error is encountered, a return code 256 is set and this can be tested in the confirmation steps. For more information, see How to Build, Track and Confirm Shipments.

set -x

Enables echoing of the commands, prefixed with a plus ('+') to the STDERR output DD which makes it easier to diagnose any problems.

mkdir -p '<remoteStaginPath>'

Creates a target staging directory if it doesn't already exist.

pax -rvzk -f "//'<remoteDatasetPrefix>.ARPAX'"-s …

Performs the un-archive of the pax file.

rm -fv '<targetFile>'

Builds a corresponding delete request, for each copy, before the copy is performed. This command ensures that time stamp information is preserved in the following copy command.

cp -Bm '<stagingFile>' '<targetFile>'

Invokes a binary copy for each file maintaining the date and timestamp from the original file.

Note: The remote copy and delete command pairs will repeat for as many USS objects as need to be managed.