|
In the following CL, I am making a call and expecting MYPGM to have 3
parameters, but if the pgm doesn't have the proper parameter list, I just wanna
catch it and avoid.
DCL VAR(&P#OBJL) TYPE(*CHAR) LEN(10)
VALUE('MYLIB') /* Object library
DCL VAR(&P#PGMN) TYPE(*CHAR) LEN(10) +
VALUE('MYPGM') /* Program name */
CALL PGM(&P#OBJL/&P#PGMN) PARM('*NO' '*YES' ' ')
MONMSG MSGID(MCH0801 RPG0221 MCH0000 CPF0000 +
RPG0000)
But unfortunately, when I run the pgm I got the following hard message first.
Is there a way to trap this message?
Thanks for any leads in advance.
Message ID . . . . . . : RPG0221 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 12/09/04 Time sent . . . . . . : 11:01:55
Message . . . . : MYPGM 99999999 referenced to a parameter not passed (C
G S D F).
Cause . . . . . : The RPG program MYPGM in library MYLIB used the
parameter at statement 99999999 which was not passed to program.
Recovery . . . : Enter C to cancel, G to continue processing at *GETIN, S
to obtain a system dump, or D to obtain an RPG formatted dump.
Possible choices for replying to message . . . . . . . . . . . . . . . :
D -- Obtain RPG formatted dump.
S -- Obtain system dump.
G -- Continue processing at *GETIN.
C -- Cancel.
F -- Obtain full formatted dump.
Bottom
Press Enter to continue.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.