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



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!

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.