rexx - Run REXX procedure
Synopsis
rexx [ -c cmdenv ] [ -t type ] path [ arg ... ]
Description
The rexx utility runs the REXX procedure specified by path with the
specified arguments. For more information about programming with REXX, see the
REXX information.
The REXX interpreter cannot read REXX commands from standard input. It can only run REXX procedures
stored in members of database files in the QSYS.LIB file system. The interactive debug feature of the
REXX interpreter is not supported by the rexx utility.
The program /QSYS.LIB/QSHELL.LIB/QZSHSHRX.PGM implements the Qshell command environment for
REXX procedures. The Qshell command environment sets the REXX return code and condition
as follows:
- When the the shell command ends normally with an
exit status of zero, the REXX return code is
set to zero and no condition is raised.
- If the shell command ends normally with an
exit status that is non-zero, the REXX return
code is set to the exit status value and the
ERROR condition is raised.
- If the shell command ends by signal, the REXX
return code is set to the signal number + 128
and the FAILURE condition is raised.
- If the shell command ends by exception, the
REXX return code is set to the exception
number from wait() and the FAILURE condition
is raised.
Options
- -c cmdenv
- Set the command environment program to process commands for the REXX procedure.
If the option is not specified, the default value is command.
The cmdenv can be one of the following values:
- command for the i5/OS(TM) CL command environment.
- cpicomm for the Common Programming Interface for communications command environment.
- execsql for the Structured Query Language (SQL) command environment.
- qsh for the Qshell command environment.
- path to specify the path to the command environment program. The path must specify a
program in the QSYS.LIB file system.
- -t type
- Control tracing for the REXX procedure. If the option is not specified, the default
value is normal. The type can be one of the following values:
- all to trace all clauses before processing.
- commands to trace host commands before processing and display any
error return codes.
- error to trace host commands after processing that result in an error return code.
- failure to trace host commands after processing that result in a failure along with the
return code.
- intermediates to trace all clauses before processing along with intermediate results
during the evaluation of expressions.
- labels to trace labels during processing.
- normal to trace host commands after processing that result in a failure.
- off to turn off all tracing.
- results to trace all clauses before processing.
Operands
The path is the path name of the REXX procedure. On i5/OS(TM), a REXX
procedure can only be stored in the QSYS.LIB file system.
Exit Status
- 0 when successful
- 1 when there is an error running the REXX procedure
- >1 when unsuccessful
Related information