Jorge, Try this logic. It completes the GETMSG logic *before* attempting the SAY
getcode = 0 Do while getcode = 0 /* get console message */ getcode = GETMSG('salida.','SOL',Cart_V,,time_value) If getcode = 0 then Do Do i = 1 to salida.0 k = i + j wto.k = salida.i End j = j + salida.0 End End Do ii = 1 to wto.0 Say wto.ii ii = ii + 1 End -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jorge Garcia Sent: Monday, September 18, 2017 4:55 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: GETMSG null with out ADABAS command Hi all, We're trying to execute a REXX with a GETMSG statement to trap the out of ADABAS or event Publisher command (Software AG products). We can't trap anything. Below the REXX executed TRACE I "CONSOLE DEACTIVATE" "CONSPROF SOLDISP(NO) SOLNUM(400)" "CONSOLE ACTIVATE NAME("USERID()")" ADDRESS CONSOLE "F CACEPR04,CMD,CACDS,"REPORT"" msg = GETMSG(salida.,SOL,,,6) if msg = 0 then nop else do say 'Command error' exit 8 end /* do 11 */ do a = 1 to salida.0 say salida.a end /* do */ exit GETMSG always finishs with RC = 4. We don't know if GETMSG statement only Works fine with IBM applications non ISV products. Any help would be appreciated Regards Jorge Garcia Juanino Coordinador sistemas z/OS ACTP – DIAC – Operación y Soporte EMEA MAPFRE Avenida del Talgo 100-103 – 3ª Planta CP 28023 Madrid Tel. 91 581 27 34, Movil 618333559 jgarc...@mapfre.com<mailto:jgarc...@mapfre.com> ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu<mailto: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