×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Don't you need to CONCAT your "SQL" and RIGHT(...) clauses? You want
MSGID to be SQLnnnn, right?

Eric

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Wednesday, December 17, 2008 9:02 AM
To: Midrange Systems Technical Discussion
Subject: SNDPGMMSG

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.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2026 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.