×
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.
John--
I will defer to others concerning the reuse of system addresses.
As far as PFs and deleted records are concerned-- As you have noted,
the space for a deleted record is merely flagged as 'deleted' at the
system level. Programs reading the file don't even know those
records exist.
This space is reused when the PF is reorganized, or if the file is
set to REUSEDLT(*YES).
Records flagged as deleted are also dropped by CPYF on the
destination file. These records can be included if you select
COMPRESS(*NO) (Compress out deleted records).
The deleted records can be recovered since the space is not
physically deleted (as long as the file is not reorganized).
The hard way:
- SAVOBJ to a SAVF. This saves the entire object, including deleted records..
- A SAVF can be read by an RPG program (record length 528 bytes).
- Read the SAVF records, and divide up the information retrieved into
blocks the same length as the original file. I don't recall if each
record has any header information attached or not.
- Write the retrieved blocks to a copy of the original file.
- This can be interesting, because the length of the original records
will not map into 528 except in -very- rare cases! So you'll need to
assemble the records to be written into a buffer, fed from either
multiple SAVF records, or sub-segments of the 528 bytes.
The Easy way:
There are several commercial utilities that will let you read and
re-activate deleted records. We are using DBU.
--Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx
At 1:44 PM -0600 1/2/09, McKown, John wrote (in part):
Also, in a PF, when a record is deleted, the space for that record is
not used for a new record. New records are always added at the end of a
physical file. Space can only be reclaimed when the PF is re-organized.
Now for my question. Is there any way to read that deleted record? I ask
because there was an old access method on MVS called ISAM. It did not
delete records either. It simply marked the record as deleted with an
indicator in the record. But a person could use a special option which
would allow a program to read the deleted record. So I was curious if it
is possible to read a "deleted" record.
John McKown
Systems Engineer IV
As an Amazon Associate we earn from qualifying purchases.