|
Barbara, So you're saying that this is valid: D myProc1 PI D myfixedParm 1A D work1 S 50A callP myproc1(work1) But this is not valid: D myProc2 PI D myfixedParm 50A VARYING D work2 S 100A D work3 S 10A Callp myproc2(Work2) Callp myproc2(Work2) But by adding OPTIONS(*VARSIZE) to MYPROC2's parm, it the callp's would be permited? Is that true? Bob Cozzi Cozzi Consulting www.rpgiv.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris Sent: Monday, June 23, 2003 2:37 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: parameters - const, value, reference "M. Lazarus" wrote: > > Joe, > > I apologize - I looked at the code quickly and thought that I saw > "varying" on the prototype variable. The code will work. But would > putting *VARSIZE on the Cmd line perform better or would that just add > operational descriptor overhead? > Mark, *VARSIZE doesn't cause operational descriptors to get passed. (And operational descriptors don't apply to program calls anyway.) When you code *VARSIZE, you have to make sure the called procedure has a way to know how much data was passed. The most usual ways are through operational descriptors (you would code OPDESC on the prototype), or through an extra parameter giving the length. If *VARSIZE has any effect on a call to QCMDEXC, it would be to make the call faster, since only the actual command length needs to be copied to the parameter. _______________________________________________ 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.