Description
|
The EVORXCON command is used to establish an extended console session using MVS console services. This session allows you to enter MVS system commands (or subsystem commands) from the REXX program. |
Syntax
|
EVORXCON('cmd','var'[,'HC'][,'consname'][,'NR'][,'MAXSIZE=max'][,'RCA'])
where:
command |
An MVS console command |
returnmsg |
A 1-to-17-character variable name that will be used as a compound variable containing any response message to the command |
'HC' |
"Hard Copy": An optional third parameter which will cause the MVS command and response to be written to the hardcopy log. |
|
|
Syntax
|
consname
|
An optional name to be used when initializing the extended console. The name must be 1-8 uppercase alphanumeric characters. If no name is given or an invalid name is specified, the name is set to the default name of "EVORXCON". If this parameter is to be specified, then the third parameter must also be specified, even if only with a null value (two consecutive commas). See the second example below. |
'NR'
|
"No Response": An optional parameter which will cause the EVORXCON to return without waiting for any response message from the command. |
|
|
Syntax
|
'MAXSIZE=max'
|
An optional parameter to define the maximum memory size (in bytes) to be allocated to hold the command's response messages. If not specified, the default memory allocation is 56 Kbytes. |
'RCA'
|
"Route Codes All": An optional parameter which specifies that the messages making up the response can accept all MVS route codes. If not specified, command responses are, by default, expected to have no route codes.
Note: Using this option may result in receiving message responses that are not associated with the original command if other messages with route codes are generated while the command is being processed. This option is primarily intended to be used for receiving responses to a WTOR reply.
|
|
|
Return Value
|
A variable can be assigned to the command to hold one of the return texts:
OK - The command completed.
|
REXX Example
|
Issue the "D A,L" command to display the names of all active address spaces on the mainframe. The response lines are printed by reading the RMSG compound variable.
/*REXX*/
x = EVORXCON('D A,L','RMSG')
if x = 'OK' then
do
do i = 1 to RMSG.0
say RMSG.i
end
end
exit
|
REXX Example
|
Issue the "D R,U" command to display the devices that require operator intervention. The response lines are printed by reading the RMSG compound variable. Use the console name "REXXCON", and do not display the command/response on the hardcopy log.
/*REXX*/
x = EVORXCON('D R,U','RMSG',,'REXXCON')
if x = 'OK' then
do
do i = 1 to RMSG.0
say RMSG.i
end
end
exit
|