|
Input/primary does not need you to read the records. The entire C-spec is one line: C Write (e) MyFile2R You do not need nor the read loop nor to to set on *INLR. This will not copy over deleted records. You are chaining to see if the record exists in the new file. Why? Is there more to the problem than you have mentioned? Are you trying to avert duplicate records? If so, you can just use the (e) extender and ignore errors, as those will be your duplicates. --------------------------------------------------------- Booth Martin http://www.MartinVT.com Booth@xxxxxxxxxxxx --------------------------------------------------------- -------Original Message------- From: RPG programming on the AS400 / iSeries Date: 12/22/2003 2:31:44 PM To: rpg400-l@xxxxxxxxxxxx Subject: Skip deleted records from a file Hi to all: I have a very simple problem and after checking the archives (without any clear rout to take) I decide to let you know about it. I have an input / primary file that I am converting into an output file. I have this: C *Loval Setll MyFile1 C Dou *In99 C Read MyFile1 9999 C 99 Iter . . . C FullKey Chain MyFile2 C If not %found(MyFile2) C Write MyFile2R C Endif C Enddo * End of program C Eval *InLR = *On However, there is one deleted record that is copied as well into the new file. How I can skip this record? I do not want to get rid of this record via RGZPFM; I want to be able to handle this situation in the program. TIA, Peter Vidal Pall Aeropower Corp. SR Programmer Analyst WWW.Pall.com "Have a very Merry Christmas and a more blessed new year 2004 and remember: JESUS is the reason for the season." Myself
As an Amazon Associate we earn from qualifying purchases.
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.