Spooled Output Considerations
Note: This section applies only to AS/400 CLcommands.
The REXEC server overrides the default printer file (*PRTF) to capture spooled
output. Any resulting spool files are tagged with the user data field set to REXECSVR.
After the REXEC server runs the specified command, each spooled file with this
user data tag is retrieved, returned to the client, and then deleted. If more than one
spool file is created, the files are processed in the order created, as determined by
the spool file number.
If the command or program run through REXEC performs its own print file override
and changes the user data, the REXEC server is unable to capture and return the
resulting spooled data.
Client Considerations
The AS/400 REXEC client (RUNRMTCMD) uses a single connection for returned
data, which is written to a spooled file on the client system. The RUNRMTCMD
command is documented in
CL Reference (Abridged)
, SC41-5722.
The UNIX, OS/2, Windows 95, and Windows NT REXEC clients all use two
connections, returning the normal output to the stdout stream and the error output
to the stderr stream.
The VM REXEC client uses a single connection for the returned data, which is
written to the console of the user.
REXEC Server Jobs and Job Names
REXEC server jobs start when you run the STRTCP command and setthe REXEC
AUTOSTARTparameter to *YES. You can also start REXEC server jobs by running
the STRTCPSVR command with a SERVER parameter of *REXEC or *ALL. These
jobs run in the QSYSWRK subsystem. Their purpose is monitoring and processing
requests from REXEC client users. The format for the names of these jobs is
QTRXCnnnnn, where nnnn is a 5-digit decimal number.
Towork with jobs in the QSYSWRK subsystem, including REXEC server jobs,
specify the following command:
WRKSBSJOB SBS(QSYSWRK)
If you choose to have commands processed by the Qshell command interpreter,
you start Qshell is by using the spawn() application program interface (API) to
create a child job.
If you choose to have commands interpreted as spawn path names, the REXEC
server treats command strings as path names and passes them to the spawn() API.
Spawned child processes are batch jobs or prestart jobs. Shell scripts are allowed
for the child process. If you specify a shell script, the appropriate shell interpreter
program is called. The shell script must be a text file and must contain this format
on the first line of the file:#!interpreter_path <options>.
402 OS/400 TCP/IPConfiguration and Reference V4R4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|