Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example illustrates the use of an IBM i command on a remote system with spooling enabled.

Anchor
113745011376501137450
1137650
It assumes that manager fault tolerance is active on the client platform via the UCMD configuration file. The example should execute from either a UNIX shell or a Windows system environment. The command is submitted via USBMJOB to allow the output data and the job log of the executed command to be brought back to the system initiating the command.

Panel
STRUCM SCRIPT(myscript) HOST(dallas) USERID(joe) PWD(password)


Anchor
113749211376921137492
1137692
For this example, USBMJOB requires no input; however, the user must supply <NUL to satisfy Windows operating system requirements. Without <NUL, the request will hang.

Anchor
113749311376931137493
1137693
USBMJOB outputs data via the standard output file stream (stdout) and outputs job logs and error messages via the standard error file stream (stderr). The system takes data sent back to UCMD and stores it in out400.txt; it takes any error messages and the job logs and stores them in err400.txt.

Anchor
113749411376941137494
1137694
With the Universal Command server JOBLOG_COPY_KEEP configuration option set to yes, a copy of the job log remains on the originating IBM i system.

Anchor
113749511376951137495
1137695
The command USBMJOB is installed as part of UCMD Server on the IBM i system.

Anchor
113749611376961137496
1137696

Command Line Options

Option

Description

-cmd

Remote command to execute on the IBM i.

-host

Directs the command to a computer with a host name of sysName.

-userid

IBM i user ID with which to execute the command.

-pwd

Password for the user ID.

-cmdid

UCMD Server (running under UBroker) puts the Command ID in its database to keep track of requests regarding a specific unit of work.

...