
When an ADDRESS instruction includes only the name of the host command
environment, all commands issued afterward within that exec are processed as
that environment’s commands.
ADDRESS ispexec
/* Change the host command environment to ISPF*/
"edit DATASET("dsname")"
The ADDRESS instruction affects only the host command environment of the
exec that uses the instruction. When an exec calls an external routine, the host
command environment reverts back to the default environment, regardless of the
host command environment of the exec that called it. Upon return to the original
exec, the host command environment that was previously established by an
ADDRESS instruction is resumed.
v
Single command
When an ADDRESS instruction includes both the name of the host command
environment and a command, only that command is affected. After the command
is issued, the former host command environment becomes active again.
/* Issue one command from the ISPFhost command environment
*/
ADDRESS ispexec "edit DATASET("dsname")"
/* Return to the default TSO host command environment
*/
"ALLOC DA("dsname") F(SYSEXEC) SHR REUSE"
Note:
Keywords, such as DATASET, within an ISPF command must be in
uppercase when used in a REXX instruction.
Determining the Active Host Command Environment
To find out what host command environment is currently active, use the ADDRESS
built-in function.
x = ADDRESS()
In this example, x is set to the active host command environment, for example,
TSO.
Checking if a Host Command Environment is Available
To check if a host command environment is available before trying to issue
commands to that environment, issue the TSO/E REXX SUBCOM command
followed by the name of the host command environment, such as ISPEXEC.
SUBCOM ISPEXEC
If the environment is present, the REXX special variable RC returns a 0. If the
environment is not present, RC returns a 1. For example, when editing a data set,
before trying to use ISPF/PDF edit, you can find out if ISPEXEC is available as
follows:
ARG dsname
SUBCOM ISPEXEC
IFRC=0 THEN
ADDRESS ISPEXEC "SELECT PGM(ISREDIT)"
/* select ISPF/PDF edit */
ELSE
"EDIT" dsname
/* use TSO/E line mode edit */
Examples Using the ADDRESS Instruction
Issuing Other Types of Commands from an Exec
Chapter 8. Entering Commands from an Exec
107
Содержание TSO/E REXX
Страница 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 2: ......
Страница 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Страница 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Страница 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Страница 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 241: ......