Joel
You have 3 parameters in the command and 4 in the program - mismatch!!
This has nothing to do with optional kinds of things - you have to have an exact match in ILE CL. Seems we did not have to with CLP, that was kind of neat, since we could have a simple CPP tester that got all the parameters in a long character variable.
But ignore that last thought for now, anyhow!
HTH
Vern
----- Original Message -----
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.