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



David L Clark/it/crp/WinWholesale wrote on 10/06/2016 09:57:13 AM:
... the RPG compiler already has a %parms() built-in similar to $argc.
So, it sure would be a lot easier if the RPG compiler provided a
%parma() or %parmv() built-in to reference a parameter list as a
pointer array -- similar to $argv[].

By the way.... That *is* how I ended up using CEETSTA:

// build minimum fields (by key) to satisfy request
RTSFA_KCnt = 2; // at least two keys required
RTSFA_Keys(1) = RTSFA_Codes(1); // key code for internal job
ident
RTSFA_Keys(2) = RTSFA_Codes(2); // key code for internal splf
ident
for RTSFA_CCnt = 3 by 1 to (%elem(RTSFA_Codes) - 1);
ParmNumb = RTSFA_CCnt + 3; // match to a parm number
callp CEETSTA(ValidParm: ParmNumb: iFeedback); // test it
if %parms >= ParmNumb // if parm passed
and ValidParm > *zero; // and not omitted
RTSFA_KCnt += 1; // increment key count
RTSFA_Keys(RTSFA_KCnt) = RTSFA_Codes(RTSFA_CCnt);
if RTSFA_Codes(RTSFA_CCnt) = 223; // special key code
RTSFA_KCnt += 1; // increment key count
RTSFA_Keys(RTSFA_KCnt) = 222; // for matching key pair
endif;
endif;
endfor;

It would have just been *so* much more convenient if I could have
coded that as follows.

// build minimum fields (by key) to satisfy request
RTSFA_KCnt = 2; // at least two keys required
RTSFA_Keys(1) = RTSFA_Codes(1); // key code for internal job
ident
RTSFA_Keys(2) = RTSFA_Codes(2); // key code for internal splf
ident
for RTSFA_CCnt = 3 by 1 to (%elem(RTSFA_Codes) - 1);
ParmNumb = RTSFA_CCnt + 3; // match to a parm number
if %parms >= ParmNumb // if parm passed
and %parma(ParmNumb) <> *null; // and not omitted
RTSFA_KCnt += 1; // increment key count
RTSFA_Keys(RTSFA_KCnt) = RTSFA_Codes(RTSFA_CCnt);
if RTSFA_Codes(RTSFA_CCnt) = 223; // special key code
RTSFA_KCnt += 1; // increment key count
RTSFA_Keys(RTSFA_KCnt) = 222; // for matching key pair
endif;
endif;
endfor;

But, I've got something that is working so all's well that ends
well. Thanks all.

Sincerely,

Dave Clark

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.