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



There's a new version of UNDEL2 (2.0.3) which has a fix for the problem
in which fields in un-deleted records are blanks or zeros.

I'll send the new version to the two websites where UNDEL2 is available.
In the meantime, if you, Cyndi, (or anyone else) want it, send me an
email at:

davemck at zbiggroup dot com

and I'll send it to you.

To use the new version with WRKDBF, you can delete the program
WRKDBF/UNDELM and use CRTDUPOBJ to copy UNDEL2/UNDELM2 to the WRKDBF
library, then rename it to UNDELM.

One case I've seen that causes the problem is when the original file has
a unique index. The old UNDEL2 copied the records to a file in QTEMP
using CPYF CRTFILE(*YES), which creates an indexed file. In that case,
CPYF sets fields in the deleted records in the QTEMP file to default
values (blanks/zeros). Don't ask me why :-)

The new version uses CRTPF to create the file in QTEMP first, without an
index, then CPYF's into it, which somehow induces the system not to set
the fields to defaults.

Chuck Pence inferred that the problem might be because date, time, &
timestamp fields are stored in the file in a different format from how
they appear in a program's buffer (or in DSPPFM). UNDEL2 already
handles that -- you can see the code in the source for UNDELM2,
subroutine "reformat".

--Dave


Douglas Handy wrote:
Cyndi,

... today I had the need to use WRKDBF's undelete function. It does
not work under V5R4 ....


Just FYI, the UNDEL2 variant eliminates the patched system state
program by
using the copy to SAVF method of getting at the data. Alas, it appears
the OS fails to copy the original raw data to the SAVF in some cases,
meaning
UNDEL2 is unable to recover the data and you get default values for the
fields instead (typically blank/zero). Speculation is that this occurs
whenever the file includes a data, time, or timestamp field but I'm not
sure
if that is always true or the only cases where the OS does not copy the
original data to the SAVF. The same limitation exists in other tools which
use the SAVF method. I'm not aware of a PTF to address this, though
perhaps one exists.

Another option at V5R4 may be to temporarily change the system value for
object restore to allow the patched MI program to restore to the system
then
continue to use the original UNDEL capabilities. This option may not be
available beyond V5R4 however.

Doug




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.