There was just a thread on this...check the archives. Basically, use a
DS with the EXTNAME keyword to identify the physical file, and then
use LIKEDS and PREFIX for a different data structure. Read into the
first data structure, then EVAL (or =) to the second data structure.

On Mon, Aug 18, 2008 at 9:04 AM, John Furniss
<JFurniss@xxxxxxxxxxxxxxxxx> wrote:

I've searched the archives for this, but all I could find
was involving SQL, which I am not using. Here is my problem: I have
restored a backup copy of ITEMASB (a Mapics file) to a user library
called JOHN, calling it JITEMASB. I need to write records to this file
from the live file.

I have tried many different variations of the code below
using data structures, renaming record formats, etc, with no luck. The
code looks like this:

0000.01 H Option(*nodebugio:*srcstmt)

0000.02 F***********************************************

0000.03 FFixcostp Ip E K DISK

0001.00 FItemasb If E K DISK

0001.03 FJitemasb UF A E K DISK rename(itemaseb:itemasec)

0001.06 F***********************************************

0006.02 *

0006.14 C Itemno Chain Itemasb

0006.15 C If %found


0007.26 C Write Itemasec

0007.27 C endif

The compiler chokes on this saying the types in the eval statement do
not match. Is there a way to do this without EVALing each field in the
file? It seems such an easy and basic thing, but I can't figure it out.

Any suggestions are greatly appreciated.


John Furniss

Allied Machine & Engineering, Corp

Phone: 330-343-4283, ext. 8371

email: jfurniss@xxxxxxxxxxxxxxxxx

This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...


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

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