The *DIAG is sent to lower level program QSQRUN3 during the execution of the programs behind the RUNSQL command.
At a higher level in the RUNSQL stack an *ESCAPE is sent up the stack to your application program to indicate that a problem occurred.
So at the subsequent point in your app where you want to receive messages from a program stack you cannot receive messages from QSQRUN3 because it is no longer in the stack.
You can only receive msgs from the current program or programs higher up the stack.
Peter
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan
Sent: Friday, 26 May 2017 9:17 AM
To: Midrange Systems Technical Discussion
Subject: [IE] RCVMSG *DIAG (seemingly) not working
I've got a test CLLE program that does the following:
RunSQL ('update MPWRATA set db_LINOSRV = TA_LINOSRY') +
Commit( *None ) Option(*List) SecLvlTxt(*Yes)
MonMsg MsgID(SQL0000 SQ20000 SQ30000) Exec(Do)
RcvMsg MsgType(*Diag) Rmv(*No) Msg(&RcvMsg) +
MsgID(&MsgID)
If (&RcvMsg *eq ' ') Then(Do)
RcvMsg PgmQ(*Prv) MsgType(*Diag) Rmv(*No) Msg(&RcvMsg) +
MsgID(&MsgID)
Enddo
Enddo
The RUNSQL command is designed to fail, because I am testing error handling. But &RcvMsg and &MsgID come back empty. At first, I'd used MsgType(*Excp), and that returned "RUNSQLSTM command failed", but I'm looking for the diagnostic message SQL0205 which will tell me that "Column DB_LINOSRV not in table MPWRATA in TESTLIB."
I am curious about the exception message "RUNSQLSTM command failed", as this seems to tell me that RUNSQL (on V7R1 at least) is just a simple command that runs RUNSQLSTM under its covers. So, maybe the diagnostic messages are a level "deeper" than the RUNSQL command? (But not the exception message?) Just a WAG on my part.
Any ideas?
- Dan
--
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.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
############################################################## This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Equifax. If you need assistance, please contact Equifax :- Australia www.equifax.com.au/contact New Zealand www.equifax.co.nz/contact ##############################################################
As an Amazon Associate we earn from qualifying purchases.