Hi John,

Maybe the following example might help you. Its old stuff but works.

DWrk_File DS 150
D Wrk_NameFile 1 8
D Wrk_Ext 10 12
D Wrk_Size 21 26
D Wrk_DatRcv 29 36
D Wrk_TimRcv 39 43
D Wrk_PcfNam 45 64
D Wrk_FilSeq 49 52 0
D Wrk_FleExt 54 56
DWrk_File2 DS 150
D Wrk_NameFile2 1 8
D Wrk_Ext2 10 12
D Wrk_Size2 21 26
D Wrk_DatRcv2 29 36
D Wrk_TimRcv2 39 43
D Wrk_PcfNam2 45 64
D Wrk_FilSeq2 49 52 0
D Wrk_FleExt2 54 56
I 1 150 FLD
C Eval Wrk_File = Fld
C Movel Wrk_NameFile Wrk_NameFile2
C Movel Wrk_Ext Wrk_Ext2
C Movel Wrk_Size Wrk_Size2
C Movel Wrk_DatRcv Wrk_DatRcv2
C Movel Wrk_TimRcv Wrk_TimRcv2
C Movel Wrk_PcfNam Wrk_PcfNam2
C Movel Wrk_FilSeq Wrk_FilSeq2
C Select
C When Wrk_FleExt = 'TVG'
C Move 'GSZ' Wrk_FleExt2
C When Wrk_FleExt = 'TPY'
C Move 'TPZ' Wrk_FleExt2
C When Wrk_FleExt = 'TVX'
C Move 'SRZ' Wrk_FleExt2
C EndSl
C Write XXSRFFP2 Wrk_File2
C Clear Wrk_File
C Clear Wrk_File2
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of John Furniss
Sent: 18 August 2008 2:04 PM
To: RPG programming on the AS400 / iSeries
Subject: Move an entire PF record


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,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at

This email and any attachment(s) may contain information
which is personal or otherwise confidential and/or privileged.
Unauthorised access, use, distribution, reproduction or
disclosure is prohibited. If you are not the intended recipient
and/or received this message in error please tell us by reply
(or telephone the sender) and delete all copies from your
system. Any privilege, confidentiality or copyright that
attaches to this email is not waived, lost or destroyed if you
have received this email in error.

We do not warrant that this email and any attachment(s) is
free from viruses or defects and you should scan this email
for viruses prior to opening or saving any attachments. The
Hogg Robinson Group accepts no liability for any damage
caused by any virus transmitted by this email.

Statements or opinions expressed in this email may be
personal to the sender and do not necessarily represent the
views of Hogg Robinson Plc or any other member of the Hogg
Robinson Group. Unless expressly stated otherwise, no
member of the Hogg Robinson Group is bound by any
contract or obligation purported to be created by this email or
its attachment(s).

HRG and HRG worldwide network are all Hogg Robinson
Group trading names and trade marks.

This email and any attachment(s) is © Hogg Robinson Plc
(trading as HRG - Incorporated and Registered in England
and Wales, Registered Office: Global House, Victoria Street,
Basingstoke, Hampshire RG21 3BT, UK. Company No.
2107443. VAT No. GB413640679)

This thread ...


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

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