× 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.



Steve,
        Do you have TAATOOLS?  RTVDLTRCD is a command that has been around a
while. It retrieves about 90% of the time.  File size and if  the file is
locked open   "are some limitations " (whoops forgot that part).  It does
everything you are doing but it puts the data back into the format of the
original file.  You may be able to get the tool from someone who has the
free version in QUSRTOOLS, because on V4 + it is a paid for tool.


Thank you,
Matt Tyler
Mattt@wincofoods.com

-----Original Message-----
From: Steve Landess [mailto:steve_landess@hotmail.com]
Sent: Friday, October 11, 2002 11:02
To: midrange-l@midrange.com
Subject: Need to retrieve deleted records from an AS/400 file

Hello all...

Occasionally, I want to retrieve all of the deleted records from an AS/400
file.

I have various reasons for needing to do this, but it is mainly because we
have an EAI application where we have files with *INSERT trigger-handling
programs that are used to submit jobs to run for processing sales orders.
The only reason that the record is written to the file is so that the
trigger-handling program will submit a job to process a particular order.
When the submitted job runs, it deletes the record from the trigger file to
clean up.
We have periodic processes that reorg these files.  Because of system design
constraints these records MUST be deleted when processed, I can't just flag
them as processed and leave them in the file.

I now need to view all of the deleted records in a particular file via a
query in order to see an audit trail of transactions which have occurred
with a particular order.  I have the UNDEL utility, but it requires me to
display each record one at a time and press F23 twice...and this undeletes
the record in place in the data file.

I have figured out a kludgey way to do what I want by saving the physical
file to a save file, then copy the save file to a data file.  I then use
DSPPFM to see roughly where the file data begins in the save file data.

I know that each deleted record in the PF is prefixed by a X'C0' character
in the save file (good records are prefixed with X'80'), so in an RPG
program I can process the save file data records byte-by-byte to build a
record and write records to a work file that looks like the original data
file (I copy the DDS to another member and add an X suffix to the file name,
also removing the UNIQUE keyword, if specified).

I would like to build a more elegant solution so that I don't necessarily
have to write a new program every time I want to retrieve the deleted
records from a file.

1) where do I find the documentation that I need that describe the internal
layout of a physical file (both the live file and the format when stored in
a save file)?

2) How do programs like UNDEL work against the live file to retrieve deleted
records?  Is there an API to call for this?



_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.