Communicating with System REXX

You can use the MODIFY AXR command to either obtain status about System REXX, initiate the execution of a REXX exec, cancel a REXX exec, or start and stop TSO Server address spaces.

Syntax

The MODIFY AXR command has the following syntax:

F AXR,{SYSREXX|SR},{STATUS|ST}[,{DETAIL|D}]

F AXR,{SYSREXX|SR},{REXXLIB|R}

F AXR,{SYSREXX|SR},CANCEL,REQTOKEN=token

F AXR,{SYSREXX|SR},STARTTSO

F AXR,{SYSREXX|SR},STOPTSO

F AXR,rexxexecname[,{TIMEINT|T}=seconds][,{OREQTOKEN|OREQ}][,TSO={YES|NO}][ [']arg1[ arg2argn][']]

You can also use the prefix defined in the CPF parameter of the AXR00 parmlib member to replace MODIFY(F) AXR. For more information, see AXRxx in z/OS® MVS™ Initialization and Tuning Reference.

Parameters

The parameters are:

SYSREXX|SR
Indicates that the SYSREXX command is to be run. Either a comma or a blank is permitted between SYSREXX or SR, and the subsequent operand. For instance, you can enter:
F AXR,SYSREXX,STATUS 
or
F AXR,SYSREXX STATUS
STATUS|ST
Specifies or indicates that general information about System REXX execs is to be returned to the invoker.
DETAIL|D
An optional parameter that indicates that detailed information about execs that are currently running in System REXX is to be returned to the invoker.
REXXLIB|R
Indicates that information about data sets in the REXXLIB concatenation is to be returned to the invoker. The information includes the following details:
  • Concatenation order number
  • Data set name
  • Volume serial of the data set
CANCEL
Indicates that a REXX request is to be canceled.
REQTOKEN=token
Specifies the 16-byte token that identifies the request to be canceled.
STARTTSO
Indicates that the effects of STOPTSO are to be reversed. The operator can determine the status of TSO=YES processing by issuing F AXR,SYSREXX,STATUS.
STOPTSO
Indicates that all idle TSO Server address spaces will be terminated. Any TSO Server address spaces with ongoing work will complete, and then those address spaces will terminate. Any inbound AREXX TSO=YES request or request that has not started execution, when the STOPTSO request was issued, will be rejected with a return code of X'0C' and reason code of xxxx0C11x.
rexxexecname
A 1-8 character name of a member of the System REXX library (SYS1.SAXREXEC) where the exec resides. The exec will be executed in a TSO=YES environment with CONSNAME=name of issuing console. See z/OS MVS Programming: Authorized Assembler Services Guide for more information. The invoker should avoid flooding the console with messages because any SAY or TRACE output will be sent to the invoking console.

For information about IBM-supplied System REXX execs, see System REXX commands reference.

TIMEINT|T=seconds
An optional parameter to specify a time limit, in seconds, for the exec to run. If you specify TIMEINT=0, no time limit is applied. If the exec exceeds this time threshold, it will be halted. A maximum of 21474536 seconds may be specified. The default value is 30.
OREQTOKEN|OREQ
An optional parameter that indicates that a request token is to be returned. The request token is returned with message AXR0213I, and that token can subsequently be used to cancel the request.
TSO=YES|NO
An optional parameter that indicates whether an exec will run in a TSO environment. When you specify TSO=NO, the exec is run in the AXR address space, which has the following characteristics:
  • It runs under the MASTER subsystem, which allows users to run System REXX execs after the primary subsystem has terminated.
  • It is not integrated into TSO, so TSO host commands, SYSCALL host commands, and CONSOL host commands are not available.
  • It shares the resources of the address space with other requests.
  • It does not support dynamic allocation.
'arg' or 'arg1 arg2argn' or arg or arg1 arg2argn
The remainder of the command line after the exec name is passed to the exec as a single argument string. The argument string must be preceded by a blank.

The format for passing arguments to the REXX exec may include blanks and may have all or parts of the argument string enclosed within quotation marks. An odd number of quotation marks is an error. Any bounding quotation marks are removed, and two consecutive quotation marks within a quoted string result in a single quotation mark being included as part of the final argument processed by the REXX exec. System command processing converts all characters of any argument string that are not quoted to uppercase characters. All formats are passed as a single string of data. However, when multiple arguments are to be passed, separating each argument with a blank makes it simpler to parse them into the runtime REXX arguments required by the exec.

Examples

Example 1: To obtain status information, enter the following command:
F AXR,SYSREXX,STATUS

AXR0200I SYSREXX STATUS DISPLAY      FRAME LAST   F  
 SYSTEM REXX STARTED AT 11.30.30 ON 02/04/2016         
 PARMLIB MEMBERS:      AXR00                           
 CPF:  REXXB0 (SYSPLEX)      AXRUSER:  IBMUSER         
 TIMEINT:       30     TMP: NOT ENABLED                
 SUBSYSTEM:   AXR      TSO=YES ENABLED                 
 REQUESTS QUEUED:      0  ACCEPTING NEW WORK           
 REXX WORKER TASKS:    ACTIVE:   0     TOTAL:   4      
                       IDLE:     4     MAX:    32      
                       ASYNC:    0     SYNC:    0      
                       UNTIMED:  0                     
 TSO SERVER SPACES:    ACTIVE:   0     TOTAL:   0      
                       IDLE:     0     MAX:     8      
                       ASYNC:    0     SYNC:    0      
                       UNTIMED:  0                     
Example 2: To obtain detailed status information, enter the following command:
F AXR,SYSREXX,STATUS,DETAIL

AXR0201I SYSREXX STATUS DETAIL       
EXEC=WAITLOOP CJBN=AXR      CASID=0015 TSO=Y T/L=00.00.30
  REQTOKEN=0000520000000000BF3A704A6511A3B5
  EJBN=AXR02    EASID=0033 TCB=006FF098 CPU=000.004S TIME=005.739S
EXEC=INFINITE CJBN=AXR      CASID=0015 TSO=Y T/L=00.00.30
  REQTOKEN=0000540000000000BF3A704C2088405C
  EJBN=AXR03    EASID=0032 TCB=006FF098 CPU=000.006S TIME=003.925S
Example 3: To obtain information about data sets in the REXXLIB concatenation, enter the following command:
F AXR,SYSREXX,REXXLIB

AXR0202I SYSREXX REXXLIB DISPLAY       
NUMBER   VOLUME         DATA SET
01			    TSTO05         RONN.REXX 
02			    SBOX00         SYS1.SAXREXEC 
Example 4: To invoke a REXX exec from a console with part of its argument string kept as lower case and part converted to upper case by system command processing, enter the following command:
F AXR,TheExec 'here''s a lower case string'  here''''s an uppercase string