|
The number of parms can be gotten from the program status data structure also.
*
*----------------------------------------------------------------
D psDS SDS 500
D psdsPgm 1 10
D psdsParms *PARMS
D psds_msgid 40 46A
D psdsExcTyp 40 42
D whatever else....
C *ENTRY PLIST
C PARM Date1In
C PARM Date2In
*
C IF psdsParms > 0
C EVAL Date1 = Date1In
C EVAL Date2 = Date2In
C ELSE
C EVAL Date1 = dfltDate1
C EVAL Date2 = dfltDate2
C ENDIF
*
------------------------------
message: 2
date: Mon, 26 Jul 2004 11:23:07 -0400
from: Chris Payne <CPayne@xxxxxxxxxxxxxxx>
subject: variable number of paramaters
Hello,
I have a program that takes 2 parameters, a start date and a end
date. I would like to make it so that the program can check and see how many
parameters are passed. If 2 parameters are passed then use those as the
start and end date. If no parameters are passed, then use some defaults. I
am using RPG ILE and freeform syntax.
Thank You,
Christopher Payne
------------------------------
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.