|
Add options(*nopass) to the parameter defintion of outDatFmt.
Having a working variable such as wOutDatFmt defined as
like(OutDatFmt). Then use %parms to determine what OutDatFmt
should be and use wOutDatFmt anywhere else in the procedure.
If %parms >= 5;
wOutDatFmt = OutDatFmt;
else;
wOutDatFmt = inpDatFmt ;
EndIf ;
Scott Mildenberger
--- Bill <billzbubb@xxxxxxxxxx> wrote:
> I have a program where I'd like one of the parameters to be
> optional (to maintain compatiblity with a prior version of the
> program). This is the current prototype of the new program:
>
> D CalcDat pr ExtPgm('CALCDAT')
>
> D inpDat 10
>
> D inpDatFmt 10
>
> D inpDays 4 0
>
> D outDat 10
>
> D outDatFmt 10
>
>
> I'd like to make outDatFmt optional since the original didn't
> have that parameter. I believe this is done via the
> "Options(*NoPass)", correct? If so, I believe if I use
> *NoPass I can't change the value of outDatFmt like this:
>
> If outDatFmt = *Blanks ;
> outDatFmt = inpDatFmt ;
> EndIf ;
>
> So, my question is: What would be the best way to accomplish
> the above goals? Something along the lines of a working
> variable for outDatFmt? Are there other ways of checking for
> the missing parameter than "If %Parms" ?
>
> Bill
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.