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



Duh! Factor 1 and 2 on the parm statement, I forgot about those! And yes,
LIKE() would be a better way to define them.

Thanks,
-Walden


------------
Walden H Leverich III
President
Tech Software
(516)627-3800 x11
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com



-----Original Message-----
From: Joe Pluta [mailto:joepluta@PlutaBrothers.com]
Sent: Tuesday, December 18, 2001 11:32
To: midrange-l@midrange.com
Subject: RE: RPGLE - DS Subfields as parameters or contiguous memory for
standalone fields


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

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.