The external indicators are U1 through U8. These indicators
can be set in a CL program or in an RPG IV program. In a CL program,
they can be set by the SWS (switch-setting) parameter on the CL commands
CHGJOB (Change Job) or CRTJOBD (Create Job Description). In an RPG IV program,
they can be set as a resulting indicator or field indicator.
The status of the external indicators can be changed in the program
by specifying them as resulting indicators on the calculation specifications
or as field indicators on the input specifications. However, changing
the status of the
IBM® i job switches with a CL program during processing
of an
RPG IV program has no effect on the copy of the external indicators
used by the
RPG IV program. Setting the external indicators on or
off in the program has no effect on file operations. File operations
function according to the status of the U1 through U8 indicators when
the program is initialized. However, when a program ends normally
with LR on, the external indicators are copied back into storage,
and their status reflects their last status in the
RPG IV program.
The current status of the external indicators can then be used by
other programs.
Note: When using
RETURN (Return to Caller) with
the LR indicator off, you are specifying a return without an end and,
as a result, no external indicators are updated.