IBM OS/390 Time Clock User Manual


 
18.4 Environments
The system under which REXX procedures run is assumed to include at least
one environment for processing commands. An environment is selected by
default on entry to a REXX procedure.
You can change the environment by using the ADDRESS instruction:
address cms /* VM/ESA CMS environment */
address POWER /* VSE/ESA POWER host command environment */
address TSO ALLOC F(SYSOUT) DSN(my.dsn) SHR
address DOS DIR MDV1.ALL
TSO ISPF dialog invocation:
address ISPEXEC SELECT CMD(%myexec)
You can find out the name of the current environment by using the ADDRESS
built-in function. ADDRESS() returns the name of the environment to which
commands are currently being submitted.
if address() = CMDthen /* OS/2 environment */
The underlying operating system defines environments external to the REXX
procedure.
The environment selected depends on the caller. For example if a procedure is
called from CMS, the default environment is CMS. If called from an editor that
accepts subcommands from the language processor, the default environment
may be that editor.
ADDRESS temporarily or permanently changes the destination of commands.
Commands are strings, not interpreted by REXX itself but sent to an external
environment.
18.4.1 VSE/ESA Environment
REXX/VSE provides the following host command environments:
VSE for the REXX/VSE commands.
POWER for VSE/POWER spool-access service requests.
JCL to issue JCL commands via a REXX program.
CONSOLE lets you manage console sessions.
LINK and LINKPGM for linking to a program.
18.4.2 VM/ESA Environment
VM/ESA provides among others the following host command environments:
CMS implies full command resolution just as provided in usual interactive
command (terminal) mode.
COMMAND implies basic CMS CMSCALL command resolution.
CPICOMM can be used to call program-to-program communications routines.
OPENVM can be used to call OPENVM-type CSL routines, such as
OpenEdition for VM/ESA callable services.
370 VSE to OS/390 Migration Workbook