× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have a "new" file I just created under v5r4. I used SQL to delete a set of
records. DBU RDR found all the values.

A similar problem does exist on our "old" files (pre-v5r4). If I use DBU RDR
on them, it appears they are all default (regardless of deletion method).
However, if I restore that file to our system, I can RDR the records and get
back the data.

Mike

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Douglas Handy
Sent: Thursday, June 21, 2007 1:20 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: SQL Mass Delete Vs. READ/DELETE

Joe,

Hee hee! (oiling up the torches, getting out the pitchforks)


Just last week I think I came across a difference between the methods which
surprised me. A nightly purge was using SQL to perform a DELETE on sets of
records, because as you say, SQL shines at this and it was the perfect tool
for the job. Its been that way for years in this jobstream.

Because of an unrelated user error, we decided to go back and undelete a few
records to examine the previous contents of them. The machine is on V5R4,
so needs to use UNDEL2 instead of the patched older UNDELM program, but I
don't think that is related to the issue.

On the file where we used SQL DELETE, the deleted records did not have any
recoverable contents. All fields were at the default values; character
fields were blank, numerics were zero, dates were 01/01/0001, etc. For
files where we did not use SQL DELETE, we could see and recover the contents
of deleted records.

So it appears like SQL must also wipe the contents of records as it deletes
them. Maybe this was anecdotal and due to something else. I didn't run
additional tests to see what happened, but it did mean we couldn't use
UNDEL2 to examine the contents.

Not that I'd say having the ability to undelete is a legitimate reason to
not use SQL -- I have no plans on quit using SQL for this. I just found it
interesting.

Doug
--
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 thread ...

Follow-Ups:
Replies:

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

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.