Customer needs to set up an EVENT CAPTURE to issue the RXEXEC command to execute the REXX.
/* REXX */
/* TRACE I */
ADDRESS "LINK" "GSVXRXAA"
dropbuf 0
ADDRESS SYSVIEWE "C(RMCAP)"
LINES = queued()
mailine.1 = 'SysID LPARName CPC Image 4hAve'
mailine.1 = mailine.1 'WaitType WaitName CPUTime'
num = 1
DO J = 1 TO LINES
pull l.J
if substr(l.j,1,1) = 'D' then do
num = num + 1
mailine.num = translate(substr(l.J,3,80),' ')
End
END
userfrom = "
[email protected]"
userto = "
[email protected]"
Subject = "SYSVIEW : Threshold Limit reached " date() time()
ADDRESS SYSVIEWE "C(SET EMAILID C'"userfrom"')"
ADDRESS SYSVIEWE "C(SENDMAIL TO "userto" SUBJECT C'"subject"')"
DO I = 1 to num
ADDRESS SYSVIEWE "INPUT(1,'"mailine.I"')"
ADDRESS SYSVIEWE "C(DOWN 1)"
End
ADDRESS SYSVIEWE "C(SEND TEXT CLEAR)"
ADDRESS SYSVIEWE "C(END)"
ADDRESS TSO
DROPBUF
EXIT