mgo
OS/400 Edition
Volume 2, Number 68 -- September 6, 2002

Reader Feedback and Insights: Copying Records in RPG


Hey, Ted:

I'm writing about the August 23 Midrange Guru Tech Tips regarding moving records between files with different field names. One option that I didn't see, and the one I now prefer, with RPG IV is using the prefix keyword to rename the fields from one of the files.

Here's an example:

Fpaywork   if   e           k disk
Fpayhist   o    e             disk     prefix(pw : 2)

C                   read      paywork
C                   dow       not %eof(paywork)
C                   write     histrec
C                   read      paywork
C                   enddo

C                   eval      *inlr = *on

-- Scott

Good idea, Scott. A few other readers suggested the same thing. That technique will work in the example I gave because the trailing portions of the field names are the same in the two files. It would not work in cases where the trailing portions of names differed.

-- Ted







Sponsored By
WORKSRIGHT SOFTWARE

On June 30, 2002,
$$$$$$$$    Postal Rates went UP!    $$$$$$$$

On July 1, 2002,
$$$$$    you wanted your postage bill to go down.    $$$$$

We have the solution! CASS certify your mailing names and addresses and presort your outgoing mail and save. Our CASS certification software ensures that your address files have valid ZIP Code and address information. Our presort software ensures that you can properly prepare you mail for delivery to your Post Office.

WorksRight Software, Inc. is the number-one source for iSeries and AS/400 CASS, presort, ZIP Code, and area code software and data.

Visit our Web site - www.worksright.com - to learn more about our CASS and presorting software, or contact WorksRight Software, Inc., phone 601-856-8337,
e-mail software@worksright. com .


THIS ISSUE
SPONSORED BY:

WorksRight Software
COMMON


BACK ISSUES

TABLE OF CONTENTS

Convert J.D. Edwards Dates to Other Formats

Edit with Parentheses in Query/400, Take Two

Reader Feedback and Insights: Copying Records in RPG


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris

Managing Editor
Mari Barrett

Publisher and
Advertising Director

Jenny Thomas

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com



Last Updated: 9/06/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.