×

Good News Everybody!

The new search engine is LIVE!

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




Hi, Scott

Should have stopped on your first note lol. The code path for a *PGM call will get you the exception. There was a bug along these lines a loooong time ago, but it has been corrected (perhaps as long as two years ago?).

Bruce

Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:
...and in ILE CL, the parameter storage isn't reinitialized between
calls, is it? So you couldn't rely on the MCH3601 being generated each
time, unless *OMIT is passed from the CALL command, right?

I'm with Francis. Use a command front-end. Or, if it's REALLY
important that you use the CALL command, put an RPG front-end over your
CL program.


Scott Klement wrote:
Hi Bruce,

Wouldn't you still get a "Parameters passed on CALL do not match those
required." error when you tried to call this? Unless you used ILE CL,
that is?


Bruce Vining wrote:
Sure. But it does need to be a *PGM.

PGM PARM(&PARM1)
DCL VAR(&PARM1) TYPE(*CHAR) LEN(1)
DCL VAR(&TEST) TYPE(*CHAR) LEN(1)
CHGVAR VAR(&TEST) VALUE(&PARM1)
MONMSG MSGID(MCH3601) EXEC(DO)
RCVMSG MSGTYPE(*LAST)
SNDPGMMSG MSG('Not sent') TOPGMQ(*EXT)
RETURN
ENDDO
IF COND(&PARM1 = Y) +
THEN(SNDPGMMSG MSG('Sent') TOPGMQ(*EXT))
ELSE CMD(SNDPGMMSG MSG('Sent but no Y') +
TOPGMQ(*EXT))
ENDPGM

Bruce Vining



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.