z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The CONSOLE host command environment

z/OS TSO/E REXX Reference
SA32-0972-00

The CONSOLE host command environment is available only to REXX execs that run in the TSO/E address space. Use the CONSOLE environment to invoke MVS™ system and subsystem commands during an extended MCS console session. To use the CONSOLE environment, you must have CONSOLE command authority.

Before you can use the CONSOLE environment, you must first activate an extended MCS console session using the TSO/E CONSOLE command. After the console session is active, use ADDRESS CONSOLE to issue MVS system and subsystem commands. The CONSOLE environment lets you issue MVS commands from a REXX exec without having to repeatedly issue the CONSOLE command with the SYSCMD keyword. For more information about the CONSOLE environment and related TSO/E services, see Writing REXX Execs to perform MVS operator activities.

If you use ADDRESS CONSOLE and issue an MVS system or subsystem command before activating a console session, the CONSOLE environment will not be able to locate the command you issued. In this case, the REXX special variable RC is set to -3 and the FAILURE condition is raised. The -3 return code indicates that the host command environment could not locate the command you issued. In this case, the command could not be found because a console session is not active.

Note that the value that can be set in the REXX special variable RC for the CONSOLE environment is a signed 31-bit number in the range -2,147,483,648 to +2,147,483,647.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014