× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi all,

I am having a problem understanding my own code.

My CL runs a rexx procedure that does an insert with SQL.

In my REXX procedure, I have this :
IF RC <> 0 THEN DO
MSGID = "SQL"RIGHT(STRIP(ABS(SQLCODE)),4,'0')
'SNDPGMMSG MSGID(&MSGID) MSGF(QSQLMSG) MSGDTA(&SQLERRMC) MSGTYPE(*ESCAPE)'
END

Which I hasten to say was kindly given to me on this list.

Returning to my program, I check the execution like this :

MONMSG MSGID(SQL0000) EXEC(DO)
RCVMSG MSGTYPE(*EXCP) MSGID(&MSGID)
IF ( &MSGID *EQ 'SQL0100' ) RTNSUBR RTNVAL(0)
ELSE RTNSUBR RTNVAL(-1)

ENDDO


I could have sworn this used to work, but now I'm getting unreadable messages in the log.
Message . . . . : 12 - SNDPGMMSG MSGID(SQL0206) MSGF(QSQLMSG)
MSGDTA(X'0006C1C1C1F0F0E200025CD500025CD5') MSGTYPE(*ESCAPE)

If I call the REXX directly from the command line, I get the message on the bottom of my greenscreen.

Could someone tell me what do I do to get the human readable message in the job log?

Thanks.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.