Where and how is the code failing? BTW, you don't need the STRIP the output of the WORD function.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of saurabh khandelwal [sourabhkhandelwal...@gmail.com] Sent: Monday, November 30, 2020 3:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Auto Reply on SDSF Console Dear Group , We have requirement to automate below manual reply comes in console every time, when we don’t find volume in our system and the standard reply to these message is *Reply id, NO.* 10.14.03 JOB09020 *29 *IEF455D* MOUNT *SP5145* ON 0FAA FOR CASPLPRO SARBCH OR REPLY 'NO'l In this above message, whenever we get message id *IEF455D *on SDSF console and on 4th place in this line, we get volume name* SP5145 or SP5146 , SP5147, SP5149 *then immediately using automation we should reply With* reply id, no.* In order to do this, we created IF MSGID = 'IEF455D' THEN EXEC(CMD('AUTREXX')) NETLOG(Y) SYSLOG(Y); Then into *'AUTREXX'* REXX side, /* REXX */ trace r 'PIPE SAFE * | STEM MSG.' TOvolume = Word( Msg,4 ) MsgID = Word( Msg,1 ) MsgID1 = substr(MsgID,2,2) volume = 'SP5145 ' , 'SP5146 ' , 'SP5147 ' Do i = 1 to Words(volume) comp_vol = Word(volume,i) If Strip(comp_vol) = TOvolume Then But unable to complete this logic in to REXX. Can you please help in building this REXX, which can help in replying on console once the above mentioned criteria matches. *Regards* *Saurabh* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN