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



Your cl is expecting 4 parameters.
Your command has only 3 defined.

Paul

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Wednesday, April 17, 2013 4:57 PM
To: 'Midrange Systems Technical Discussion'
Subject: how to build a CL command with OPTIONAL parms

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 ______________________________________________________________________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.