> From: Walden H. Leverich
>
> 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.

This should work: put your subfields into factor 1 of each parm statement.
Use like defined fields for your actual parms.  This will cause the contents
of the passed parameter to be copied into the subfield:

D PIBCST          s                   like(P1BCST)
D PIBBNB          s                   like(P1BBNB)

C     *ENTRY        PLIST
C     P1FLD1        PARM                    PIBCST
C     P1FLD2        PARM                    PIBBNB

Notice that the actual parameter field name starts with "PI" rather than
"P1"; that seems to work with your naming conventions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.