Sample REXX SPOC program
The following sample REXX program issues the IMS operator command /DIS TRAN PART and displays the command response.
Sample REXX program
Address LINK 'CSLULXSB'
Address IMSSPOC
/*-------------------------------------------------------------
| 'ims' defines the IMSplex that receives the commands |
| |
| 'route' defines which IMSplex members in the IMSplex |
| receives the commands. If ROUTE is not specified or if |
| ROUTE * is specified, commands are routed to all IMSplex |
| members. |
| |
| 'wait' provides a timeout value to OM. The time is in |
| mmm:ss format (or ssss if no colon is specified). |
| |
| 'cart' establishes the command response token for subsequent |
| commands. |
| |
| 'end' frees control blocks |
| |
--------------------------------------------------------------*/
"IMS IPLX4"
"ROUTE IMS1,IMSB"
"WAIT 5:00"
"CART DISTRAN"
"/DIS TRAN PART"
/*-------------------------------------------------------------
| The cslulgts function retrieves data associated with a |
| a specific token and fills in a REXX stem variable. In |
| this example, it waits 59 seconds. |
| |
| The XML statements returned are put in the stem variable |
| specified by the user. |
| |
--------------------------------------------------------------*/
spoc_rc = cslulgts('DISINFO.','DISTRAN',"59")
do z1 = 1 to DISINFO.0
/* display each line of XML information */
Say disinfo.z1
end
"END"