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



For ILE CL:

PGM PARM(&INPARM)
DCL VAR(&INPARM) TYPE(*CHAR) LEN(3)
DCL VAR(&WKPARM) TYPE(*CHAR) LEN(3) VALUE('ABC')

CHGVAR VAR(&WKPARM) VALUE(&INPARM)
MONMSG MSGID(MCH3601)

ENDPGM

If you don't pass in the parm you'll get the MCH3601 and the initial value of &WKPARM will be retained. If you do pass in the parm then the CHGVAR will set &WRKPARM to the new value.

Bruce Vining


Jonathan Mason <jonathan.mason@xxxxxxxxxxxxxxxx> wrote:
Hi Everyone

I'm sure I saw this in a thread within the last six months, but can't
seem to find anything in the archives or the FAQ.

Does anybody have a technique for determining whether or not a parameter
has been passed to a CL program - similar to Option(*NoPass) in RPGLE.

What I want to do is somehting like

PGM PARM(&INPARM)
DCL VAR(&INPARM) TYPE(*CHAR) LEN(3)
DCL VAR(&WKPARM) TYPE(*CHAR) LEN(3) VALUE('ABC')

IF COND(%PARMS *GE 1) THEN(CHGVAR VAR(&WKPARM) VALUE(&INPARM))
...
...
ENDPGM


Thanks

Jonathan


_______________________________________________________
This message was sent using NOCC v1.14 webmail software
_______________________________________________________





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.