![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/a/ec/aec6f60a-fbd9-460c-8ac0-6902d8420164/aec6f60a-fbd9-460c-8ac0-6902d8420164-bg18b.png)
18.4.3 TSO/E Environment
TSO/E provides among others the following host command environments:
•
TSO allows you to invoke TSO/E commands and services.
•
CONSOLE allows you to invoke MVS system and subsystem commands
during an extended MCS console session.
•
ISPEXEC and ISAREDIT allows you to invoke ISPF commands and services,
and ISPF edit macros.
•
CPICOMM, LU62, and APPCMVS allows you to use the SAA common
programming interface (CPI) Communications calls.
•
MVS gives you a host environment which is available in any MVS address
space.
18.4.4 REXX Exec Sample for the OS/2, TSO and CMS Environments
/* REXX */
say ′ REXX Exec is executed in the′ address() ′ environment′
if address() = ′ CMD′ then /* OS/2 environment */
do
infile = ′ my.data′
do until lines(infile) = 0
say linein(infile)
end
end
else
do
if address() = ′ TSO′ address() = ′ CMS′ then
do
io_op = ″EXECIO * DISKR″ /* common used EXECIO part */
if address() = ′ TSO′ then /* TSO environment */
do
e1 = ″ALLOC FI(DATAIN) DA(my.data) SHR″
e2 = io_op ″DATAIN (FINIS″
end
if address() = ′ CMS′ then /* CMS environment */
do
e1 = io_op ″my data A″
e2 = ″FINIS my data A″
end
e1;e2 /* execute I/O */
do i = 1 to queued()
parse pull line
say line
end
end
end
18.5 Migration Issues
″The REXX language is independent of both system and hardware. REXX
procedures, though, must be able to interact with their environment. Such
interactions necessarily have system dependent attributes. However, these
system dependencies are clearly bounded and the rest of the language has no
such dependencies.″ (M. F. Cowlishaw: The REXX Language)
REXX is compatible with the VM, VSE, MVS, AIX, OS/400, and OS/2 operating
systems, among others, and allows system independent coding.
Chapter 18. Procedure Language REXX 371