System REXX enhancements
System REXX (also known as SYSREXX) is a z/OS component that allows REXX execs to be run outside of conventional TSO/E and batch environments.
System REXX execs can be started by using an operator command; for example, it can start IBM MVS™ system commands and receive results in various ways.
This chapter describes new support and enhancements for SYSREXX in z/OS V2R2 and includes the following topics:
10.1 New functions and interfaces for SYSREXX
SYSREXX provides the following enhancements in z/OS V2R2:
New operator commands:
 – Cancel command for SYSREXX execs
 – End AXRnn address spaces
 – Run operator-started TSO=NO SYSREXX execs
 – A clean STOP AXR command support
The following new parmlib customization keywords are available:
 – A TimeInt keyword to override the time interval default of 30 seconds
 – A MaxTsoServers keyword to change the default of eight servers to a value of 1 - 16.
A new AXRWTOR function provides the ability for an exec to issue a write to operator with reply (WTOR) and receive the response.
10.1.1 New operator cancel command
You can start a SYREXX exec by using the new OREQTOKEN option, as shown in Figure 10-1.
MODIFY AXR,rexxname,OREQ
Figure 10-1 Start a SYREXX exec by using the new OREQTOKEN option
 
Note: A request token uniquely identifies an in-progress exec.
You can use the request token that is displayed in this case to cancel the REXX exec, as shown in Figure 10-2.
MODIFY AXR,SR CANCEL,REQTOKEN=reqtoken
Figure 10-2 Cancel a SYSREXX exec by using its request token
10.1.2 Stopping all TSO Server address spaces
You can use the MODIFY command that is shown in Figure 10-3 to stop all TSO Server address spaces.
MODIFY AXR,SR STOPTSO
Figure 10-3 Stopping all TSO Server address spaces
Consider the following points:
Running this command still allows running execs to complete. It also ends the execs if they do not complete within a time threshold (approximately 30 seconds to 1 minute).
Subsequent AXREXX TSO=YES requests fail with return code 0C and reason code xxxx0C11.
10.1.3 Starting TSO Server address spaces
A new STARTTSO command is available that is the inverse of STOPTSO, as shown in Figure 10-4.
MODIFY AXR,SR STARTTSO
Figure 10-4 Starting TSO Server address spaces
 
Note: This command also can be used to interrupt an in-progress STOPTSO processing.
10.1.4 New TSO parameter on running a REXX
Figure 10-5 shows how to use the new TSO parameter for running a SYSREXX exec with or without TSO setup.
MODIFY AXR,rexxname,TSO=<NO|YES>
Figure 10-5 Use of new TSO parameter on running a SYSREXX exec
The default setting for TSO is YES.
 
Note: Operator started TSO=NO execution might be used to run a REXX procedure without POSIX, console, and TSO commands.
10.1.5 Stopping System REXX
In z/OS V2R2, SYSREXX can be stopped by using the STOP command, as shown in Figure 10-6.
STOP AXR
Figure 10-6 Stopping system REXX
Consider the following points:
This command provides a graceful end that is a much better alternative than the use of the FORCE AXR,ARM command.
It waits for all in progress execs to complete and ends the execs if they do not complete within a time threshold (of about 30 seconds to 1 minute).
New SYSREXX execs no longer can be started.
An operator can still issue MODIFY AXR commands while STOP processing is in progress.
10.1.6 New and changed parmlib options
In z/OS V2R2, the following new parmlib keywords were introduced:
Option TIMEINT sets the default timeout interval that a SYSREXX exec can run until it is ended.
It can be used to override the default of 30 seconds.
You can specify a value of 0 - 21474536. A value of 0 means that SYSREXX execs do not time out by default.
Option MAXTSOSERVERS sets the maximum of TSO Servers.
You can specify a value of 1 - 16. This value overrides the current default of 8.
Option MAXWORKERTASKS limit was changed.
Previously, 4 - 64 tasks were supported. Now, 4 - 32 tasks are supported.
The default is still 32. An error message is issued if the value specified exceeds 32 and the default is used.
10.1.7 New AXRWTOR function
The new function AXRWTOR provides the ability for an exec to issue a WTOR and receive the response.
Consider the following points:
The message routing is identical to that of function AXRWTO.
The message is sent to console name as specified in the CONSDATA keyword of the AXREXX invocation. If CONSDATA is not specified, system default routing attributes apply.
10.1.8 Dependency on RACF passphrase support
Internal EMCS consoles are started at System REXX initialization time instead of when a worker task is created for TSO=NO.
 
Important: Potential deadlocks on SYSZMCS must be avoided when AXREXX is started during CONSOLE LOGON. A possible deadlock still exists for TSO=YES. Therefore, you should not use TSO=YES for parsing IBM RACF® passphrases.
10.2 Use of the new functions and interfaces
In this section, several examples of the new functions are described.
10.2.1 Canceling a SYSREXX exec by using a request token
Figure 10-7 on page 35 shows the use of the new OREQTOKEN option and the use of the token to cancel a SYSREXX exec.
F AXR,SLEEPING,T=300,OREQ
AXR0213I EXEC NAME=SLEEPING 768
REQTOKEN=0000400000000000CF5D33CE33745CC5
sleeping...
F AXR,SR CANCEL,REQTOKEN=0000400000000000CF5D33CE33745CC5
AXR0208I SYSREXX CANCEL OF REQTOKEN=0000400000000000CF5D33CE33745CC5
COMPLETED SUCCESSFULLY. EXEC NAME IS SLEEPING
 BPXP018I THREAD 13E2480000000001, IN PROCESS 33620842, ENDED 773
WITHOUT BEING UNDUBBED WITH COMPLETION CODE 0013E000
, AND REASON CODE 00000000.
AXR0203I AXREXX INVOCATION OF SLEEPING FAILED. 774
RETCODE=0000000C RSNCODE=05050C07
REQTOKEN=0000400000000000CF5D33CE33745CC5
DIAG1=00000000 DIAG2=00000000 DIAG3=00000000 DIAG4=00000000
Figure 10-7 Use of the OREQTOKEN option and cancel a SYSREXX by using the token
Note: Return code C and reason code 0C07 means that the request was canceled.
10.2.2 Stopping and restarting TSO Server an address spaces
Figure 10-8 shows excerpts of the SYSREXX status, including the current TSO Server address spaces.
F AXR,SR ST
AXR0200I SYSREXX STATUS DISPLAY 776
SYSTEM REXX STARTED AT 09.32.58 ON 07/29/2015
PARMLIB MEMBERS: AXR00
  CPF: § (SYSPLEX) AXRUSER: IBMUSER
  TIMEINT: 30 TMP: NOT ENABLED
SUBSYSTEM: AXR TSO=YES ENABLED
...
TSO SERVER SPACES: ACTIVE: 0 TOTAL: 1
                        IDLE: 1 MAX: 8
...
Figure 10-8 Excerpts of the SYSREXX status
Figure 10-9 shows stopping the TSO Server address spaces.
F AXR,SR STOPTSO
AXR0214I SYSREXX STOPTSO IS ACCEPTED. ALL SUBSEQUENT TSO=YES
REQUESTS WILL BE REJECTED
...
AXR0209I SYSREXX STOPTSO COMMAND COMPLETE. ISSUE SYSREXX STARTTSO TO
RESUME AXREXX TSO=YES PROCESSING
Figure 10-9 Stopping TSO Server address spaces
As shown in Figure 10-10, the new status excerpts show that TSO=YES is disabled.
F AXR,SR ST
AXR0200I SYSREXX STATUS DISPLAY 786
SYSTEM REXX STARTED AT 09.32.58 ON 07/29/2015
PARMLIB MEMBERS: AXR00
CPF: § (SYSPLEX) AXRUSER: IBMUSER
TIMEINT: 30 TMP: NOT ENABLED
SUBSYSTEM: AXR TSO=YES DISABLED
...
TSO SERVER SPACES: ACTIVE: 0 TOTAL: 0
IDLE: 0 MAX: 8
...
Figure 10-10 SYSREXX status shows TSO=YES being disabled
How to restart TSO Servers and receive TSO=YES is shown Figure 10-11.
F AXR,SR STARTTSO
AXR0211I AXREXX TSO=YES PROCESSING IS RESUMED
 F AXR,SR ST
AXR0200I SYSREXX STATUS DISPLAY 791
SYSTEM REXX STARTED AT 09.32.58 ON 07/29/2015
PARMLIB MEMBERS: AXR00
CPF: § (SYSPLEX) AXRUSER: IBMUSER
TIMEINT: 30 TMP: NOT ENABLED
SUBSYSTEM: AXR TSO=YES ENABLED
...
TSO SERVER SPACES: ACTIVE: 0 TOTAL: 0
IDLE: 0 MAX: 8
...
Figure 10-11 Restarting TSO Server address spaces
10.2.3 Stopping and restarting SYSREXX
In z/OS V2R1, the new SYSREXX function was available to run under the Terminal Monitor Program (TMP) to retrieve unsolicited syslog messages, if wanted. To use the TMP instead of the TSO Environment Service, AXRRXWKD must be set up as an authorized command in IKJTSOxx.
 
Attention: This set up must occur before System REXX initialization.
As shown in Figure 10-11, TMP is listed as not enabled. It is assumed AXRRXWKD was updated and activated as authorized and needed.
 
Note: The new stop command cleanly recycles SYSREXX and enables the use of TMP.
Stopping and restarting SYSREXX is shown in Figure 10-12.
P AXR
AXR0218I STOP AXR COMMAND COMPLETE
AXR0116I SYSTEM REXX IS TERMINATING
...
 IEA631I OPERATOR *AXR0174 NOW INACTIVE, SYSTEM=SC74 , LU=AXREMCS
...
 IEF196I IEF142I IEESYSAS AXR - STEP WAS EXECUTED - COND CODE 0000
 F AXR,SR ST
IEE341I AXR NOT ACTIVE
 S AXRPSTRT
...
$HASP373 AXRPSTRT STARTED
$HASP395 AXRPSTRT ENDED - RC=0000
...
 IEE252I MEMBER AXR00 FOUND IN SYS1.PARMLIB
...
 IEA630I OPERATOR *AXR0174 NOW ACTIVE, SYSTEM=SC74 , LU=AXREMCS
...
 AXR0102I SYSTEM REXX INITIALIZATION COMPLETE
Figure 10-12 Stopping and restarting SYSREXX
Figure 10-13 shows TMP as enabled.
F AXR,SR ST
AXR0200I SYSREXX STATUS DISPLAY 969
SYSTEM REXX STARTED AT 22.34.04 ON 08/07/2015
PARMLIB MEMBERS: AXR00
CPF: § (SYSPLEX) AXRUSER: IBMUSER
TIMEINT: 30 TMP: ENABLED
SUBSYSTEM: AXR TSO=YES ENABLED
...
Figure 10-13 TMP shown as enabled via SYSREXX status display
10.2.4 Showing how to use the AXRWTOR function
Figure 10-14 shows how to issue a WTOR and receive the response.
F AXR,SENDWTOR,T=0
/* REXX using WTOR */ 503
connect_id = "FIRSTLINE"; lines = Sourceline()
Do i=1 To lines; Call Axrmlwto Sourceline(i), "connect_id", "D"; End
Call AXRMlwto, "connect_id", "E"
Call AXRWtor "Reply to this message with any text."
Call AXRWto "Replied data is:" AxrReply /* Reply stored in AxrReply */
Exit
*017 Reply to this message with any text.
R 17,'This is an arbitrary text.'
IEE600I REPLY TO 017 IS;'This is an arbitrary text.'
Replied data is: This is an arbitrary text.
Figure 10-14 Sending a WTOR and receiving the response
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.251.56