|
>From: "Walden H. Leverich" <WaldenL@TechSoftInc.com> >Date: Tue, 18 Dec 2001 11:08:59 -0500 > >Ideally, I'd like to do the following (the real code has >40 parms): > >DP1PARM ds >D P1BCST 1 >D p1bbnb 5p 0 >D p1bdst 1 >C *entry plist >C parm p1bcst >C parm p1bbnb >C parm p1bdst >C call 'cblpgm' >C parm p1parm > >But I don't seem to be able to pass subfields as parms. So: > >1) Is there a way I can pass subfields? >-or- >2) If I define a series of standalone fields like: > >D W1BCST s 1 >D W1bbnb s 5p 0 >D W1bdst s 1 > >Are they GUARANTEED to be contiguous in memory? If so I could pass these >parms into the RPGLE program and then do a memcpy of the first parm for the >total number of bytes in all parms into the datastructure to move all the >parms in one shot. Walden, they're not even _likely_ to be contiguous in memory. Since the actual storage for parameters belongs from the caller, the layout of the storage depends on the COBOL program. But you can't count on any storage being contiguous unless it's actually in a data structure; this is true of any language. If the storage for those parameters was already contiguous, you wouldn't need this RPG program. Barbara Morris
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.