I am attempting to build a CL command (w/o ILE) with OPTIONAL parms.

The IBM manual seems to show a simple MIN(0) MAX(1) on the PARM statement is all that is required.

PARM KWD(DBLIB) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
MIN(0) MAX(1) PROMPT('database lib: _CMISDB')

However if I use the command and skip some parms, I receive the error shown below.

set_envr &EMADDR1

Is there a trick to using OPTIONAL parms in a CMD and CL pgm?

Thanks





Message ID . . . . . . : CPD0162
Date sent . . . . . . : 04/17/13 Time sent . . . . . . : 16:35:41

Message . . . . : Parameters do not match those in program SET_ENVR in
*LIBL.


Set_Envr command

CMD PROMPT('Set Envr Names')
PARM KWD(TEXT) TYPE(*CHAR) RTNVAL(*YES) VARY(*YES +
*INT2) PROMPT('TEXT')

PARM KWD(DBLIB) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
MIN(0) MAX(1) PROMPT('database lib: _CMISDB')

PARM KWD(DATALIB) TYPE(*CHAR) LEN(10) RTNVAL(*YES) +
PROMPT('work lib: _DATALIB')


SetEnvr CLP pgm:

PGM parm(&text &dblib &datalib &forceD2T)
dcl &text *char len(500)
dcl &dblib *char len(10)
dcl &datalib *char len(10)
dcl &forceD2T *char len(10)

dcl &workText *char len(500)
dcl &textLen *int len(4)
dcl &envr1 *char len(1) value('?')
dcl &envr4 *char len(4) value('????')
dcl &patternlen *dec len(3)
dcl &start_pos *dec len(3)
dcl &start_pos1 *dec len(3)
dcl &end_pos1 *dec len(3)
dcl &start_pos2 *dec len(3)
dcl &end_pos2 *dec len(3)

...



______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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.