× 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.



On 7.3 and miss the point of using SQL to monitor for messages in a CL
program so I can forward them.

The second link is great--thank you! Lots of information in one place.


On Mon, Nov 29, 2021 at 11:26 AM Rob Berendt <rob@xxxxxxxxx> wrote:

Unless you're on an ancient version of IBM i have you thought of
abandoning RCVMSG and using the following?
https://www.ibm.com/docs/en/i/7.4?topic=services-joblog-info-table-function
https://www.ibm.com/support/pages/node/1119123



Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of x y
Sent: Wednesday, November 24, 2021 5:29 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RCVMSG question: where's the *DIAG?

CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the content is safe.


RCVMSG works as expected when this (program not found) fails
ADDPFTRG FILE(FRP003) TRGTIME(*AFTER) +
TRGEVENT(*INSERT) PGM(FRR803) +
RPLTRG(*YES) TRG(FRP003_INSERT_AFTER_TEST)
but does not work as expected when this
ADDPFTRG FILE(FRP003) TRGTIME(*AFTER) +
TRGEVENT(*INSERT) PGM(MYTESTLIB/FRR803) +
RPLTRG(*YES) TRG(FRP003_INSERT_AFTER_TEST)
fails.

I took my original program, X, cloned it, and removed the trigger program
library qualification. This gave me the desired results, CPF9811 (*DIAG)
and CPF32C6 (*EXCP).

The *only* difference is the presence of the trigger program library name.
I'm getting *DIAG message CPF9811 ("Program () in library () not found" in
the job log with both test programs but only the *LIBL code traps and
forwards it.

The failing program (X) does this
From program . . . . . . . . . : QDBTRIG2
From library . . . . . . . . : QSYS
From module . . . . . . . . : QDBTRG2AUT
From procedure . . . . . . . : QDBGEN_SEND_PGM_MSG
From statement . . . . . . . : 1617
To program . . . . . . . . . . : QDBTRIGG
To library . . . . . . . . . : QSYS
Instruction . . . . . . . . : 0069

while the good program (Y) does this
From program . . . . . . . . . : QCADRV
From library . . . . . . . . : QSYS
Instruction . . . . . . . . : 041C
To program . . . . . . . . . . : Y
To library . . . . . . . . . : MYTESTLIB
To module . . . . . . . . . : Y
To procedure . . . . . . . . : Y
To statement . . . . . . . . : 3900

I am befuddled. In program Y, I'm picking up the *DIAG message because
it's being sent to the caller; in program X, the *DIAG message is
percolating up through the ADDPFTRG command and appears in the job log but
isn't seen by the RCVMSG as configured.

The RCVMSG command looks like this:
RCVMSG MSGTYPE(*PRV) MSGKEY(&KEYVAR) RMV(*NO) KEYVAR(&KEYVAR2) +

MSG(&MSG) MSGDTA(&MSGDTA) MSGID(&MSGID) RTNTYPE(&RTNTYPE) +

MSGF(&MSGF) SNDMSGFLIB(&MSGFLIB)


I'm guessing that CPF, when encountering a *LIBL, looks for the object and
returns an error if the object can;t be found *and* before invoking the
trigger CPP. When the object is qualified, CPF appears to pass control to
the CPP and the CPP is the routine that posts the "not found" error.

Any suggestions on cleaning up the RCVMSG command will be appreciated!

Stay safe, get your COVID and flu shots, and (if you're in the U.S.) enjoy
Thanksgiving.

Thanks!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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-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.