|
No, you would use OPTIONS(*NOPASS) but then use the %PARMS built-in function to detect the number of parms passed to your subprocedure. -Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bill Sent: Wednesday, July 09, 2003 1:37 PM To: RPG List Subject: Conditional Processing with NoPass Parameters 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.
As an Amazon Associate we earn from qualifying purchases.
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.