Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
> 
> The problem comes in when I define fields in the /COPY prototypes using
> the data structures in the /COPY member.  In the RPG program I call the
> procedure using the fields from the data files as parameters.  The
> program blows up because the field I am passing as a parameter doesn't
> match the definition on the prototype.  To make it work I have to move
> the contents of the files fields into the /COPY fields before the call.
> If not for that, I wouldn't place data into the /COPY data structure
> fields.
> 

Another way to make it work, and the way that I would use, is to define
a second externally-described data structure in your main source, to map
the fields in your file.

You don't even have to name the data structure in the main source.  Just
code

D             E DS           EXTNAME(myfile)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.