|
Hard delete or soft delete? A hard delete should not have been read at all. A soft delete could be handled via one of two ways: Process a logical which excludes soft deletes or via program logic. Hard delete will not show up on DSPPFM Soft delete will. An example of a soft delete: File IIM has several fields. Among them are IID IPROD IDESC ... If IID is equal to 'IM' then it is considered an active record. If it is equal to 'IZ' then it has been flagged as inactive, or soft deleted. Now, if the software vendor knew what a database was they would have a trigger on all of their transaction files that would not allow any new records in the transaction files in which IID was equal to 'IZ'. Currently they bury that logic into every transaction program. IPROD is the primary key, however this software vendor allows duplicates (unless you only use their maintenance program - they follow the logic that never do anything in the database that you can do in each program that touches the file. Sometimes I am surprised that they even externally defined their files). Rob Berendt -- "All creatures will make merry... under pain of death." -Ming the Merciless (Flash Gordon) "Peter Vidal" <Peter_Vidal@xxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 12/22/2003 03:19 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To rpg400-l@xxxxxxxxxxxx cc Fax to 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 _______________________________________________ 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 http://archive.midrange.com/rpg400-l.
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.