Reader Feedback and Insights: Copying Records in RPG
September 6, 2002 Timothy Prickett Morgan
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,
On July 1, 2002, 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, |