REXX/CICS Server Exec Example

/* EXAMPLE REXX/CICS SERVER1 EXEC */

TRACE 'O' /* turn off source tracing */

/*----------------------------------------*/
/* Loop waiting on requests from clients  */
/*----------------------------------------*/
Do Forever
  'WAITREQ'
  parse var request cmd varname
  Select
    When request = 'COMMAND1' then CALL command1
    When request = 'COMMAND2' then CALL command2
    When request = 'STOP'     then CALL stop_server
    Otherwise
  End /* Select */
End /* Do Forever */
exit

/* subroutine to process command1 */
Command1:
'C2S' varname 'WORK'
WORK = WORK + 1
'S2C WORK' varname
 return

/* subroutine to process command2 */
Command2:
 return

/* routine to shut down this server */
stop_server:
 say 'The Server is stopping'
 exit

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/rvse599.html