|
if %parms = 1 eval workfield = parm1 else eval workfield = *zeros endif then at LR time I might say if %parms = 1 eval parm1 = workfield endifThat way, if no parm is passed, the program still runs because field parm1 is never called out. Of course you don't need to limit it to one parm, but it does have to be in order. You can't skip any parms. If you use parm 4 then you must have parm 1, 2, &3.
James H H Lampert wrote:
Fellow geeks:Is there a way to have a couple of optional parameters in an ILE RPG program?-- JHHL
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.