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



Have you tried CL. I know this is the RPG list but WTH.

CPYF FROMFILE(FROMFILE) TOFILE(TOFILE) FROMMBR(*ALL) TOMBR(*FROMMBR)
MBROPT(*REPLACE) FMTOPT(*MAP)

(exerpt from IBM help text)
FMTOPT(*MAP)
    Fields with the same name in the from-file and to-file record
    formats are copied, and any fields in the to-file that do not exist
    in the from-file format are set to the default value specified on
    the DFT keyword for the data description specification (DDS) of the
    to-file or zero for numeric fields, blanks for character fields,
    current date/time for date/time fields, or null value for
    null-capable fields.

Frank Kolmann

Elonna Thompson wrote:

>I have to convert a file with multiple members to a new file with a
>slightly different record format.  I have the RPGLE program ready to go to
>do the conversion to the new record format, but I was wondering if anyone
>knew an easier way to read/write the multiple members.  The only way I can
>think of would be to use an OVRDBF command and create a variable for the
>member name that I would pass into the CL and loop through reading then
>writing each member then passing the next member name to be read.  If
>anyone has any ideas, it would be greatly appreciated.



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.