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



Jeff Crosby wrote:
>
> For future reference, can the parms be data structures?
>

Yes.  Say you have this code:

D someds          ds
D   subf1                10a
D   subf2                 5p 2

C          call   'SOMEPGM'
C          parm               someds

Then you'd code this:

D someds          ds
D   subf1                10a
D   subf2                 5p 2

D somepgm         pr         extpgm('SOMEPGM')
D   dsparm                   likeds(someds)

 /free
        somepgm (someds);

LIKEDS is new in V5R1.  Prior to that, you would just use LIKE(someds).
It wouldn't make any difference to the caller, but if the called program
was using the prototype too, there would be some ugliness involved in
using the passed data structure.  But in V5R1, with that prototype and
DS, the called program would look like this:

 /copy pr_and_ds
D somepgm         pi
D   ds                       likeds(someds)

 /free
         ds.subf1 = 'x';
         ds.subf2 = 1.0;




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