Page 1 of 1

Tricky question asked at IBM

PostPosted: Fri May 14, 2010 7:18 pm
by give_me_more
Interviewer). Can we delete a record from ESDS?

Me). No, we cannot delete a record from ESDS

Interviewer). Have you ever tried it?

Me). No. But I have read it that we cannot delete a record from ESDS

Interviewer). That is just a theoretical concept. I have deleted a record from ESDS many times.


That was the discussion that happened b/w me and interviewer. Still, I am not sure how to delete a record from ESDS?

Can anyone please throw some light on it?

Thanks

Re: Tricky question asked at IBM

PostPosted: Fri May 14, 2010 11:27 pm
by dick scherrer
Hello,

While the interviewer may not have actually lied, i believe he came very close. . .

Records cannot be deleted from an ESDS. At least never that i've heard/read about. . .

One way that is sometimes used to indicate a deleted record is to place an x'FF' in the first byte and all of the programs that read the file need to look for this and bypass that record. These records are still in the file. . .

Re: Tricky question asked at IBM

PostPosted: Sat May 15, 2010 7:43 pm
by MrSpock
I just wonder what the point was of even asking such a question, other than to provoke an argument? It certainly seems to be discriminatory, since I wonder if only an IBM insider might be able to answer it.

Re: Tricky question asked at IBM

PostPosted: Thu May 20, 2010 8:23 pm
by give_me_more
Thanks for the reply

Re: Tricky question asked at IBM

PostPosted: Thu Jun 01, 2017 6:42 pm
by djadhav147
record can be deleted from ESDS dataset but physically record will be there. It is not possible to physically delete record from ESDS. Record can be marked as deactivated record. Never tried though but have read it somewhere.
Hope this helps.!!

Re: Tricky question asked at IBM

PostPosted: Thu Jun 01, 2017 9:31 pm
by Robert Sample
Hope this helps.!!
7 years after the question was asked, I doubt it will help very much.

Re: Tricky question asked at IBM

PostPosted: Thu Jun 01, 2017 9:39 pm
by djadhav147
Robert Sample wrote:
Hope this helps.!!
7 years after the question was asked, I doubt it will help very much.

Will definitely help people who will search on this topic and end up at this page.

Re: Tricky question asked at IBM

PostPosted: Thu Jun 01, 2017 10:02 pm
by Robert Sample
Will definitely help people who will search on this topic and end up at this page.
Except your answer is misleading and only partially correct.

Once a record is written to an ESDS, there will be data located starting at that RBA as long as the ESDS data set exists. Saying
record can be deleted from ESDS dataset
is not a correct statement. If the application is coded to designate a bit or byte as indicating the record is invalid, then the application can treat the record as deleted even though there is still data in the record. This is what you call
Record can be marked as deactivated record
If the application is not coded to do this, then it will read the data and treat it as valid. The record being marked as "deactivated" is an APPLICATION convention and has nothing to do with the reality of what is stored in the ESDS data set. Some applications will replace the data in the "deactivated" record with LOW-VALUES or HIGH-VALUES (X'00' or X'FF') to prevent attempting to use the data for anything.

The only way to truly delete data from an ESDS is to unload the data into another data set, delete and define the ESDS, and load back the desired data into the ESDS (skipping the records that are to be deleted from the ESDS either on the unload or the reload).

Re: Tricky question asked at IBM

PostPosted: Thu Jun 01, 2017 10:10 pm
by djadhav147
Robert Sample wrote:
Will definitely help people who will search on this topic and end up at this page.
Except your answer is misleading and only partially correct.

Once a record is written to an ESDS, there will be data located starting at that RBA as long as the ESDS data set exists. Saying
record can be deleted from ESDS dataset
is not a correct statement. If the application is coded to designate a bit or byte as indicating the record is invalid, then the application can treat the record as deleted even though there is still data in the record. This is what you call
Record can be marked as deactivated record
If the application is not coded to do this, then it will read the data and treat it as valid. The record being marked as "deactivated" is an APPLICATION convention and has nothing to do with the reality of what is stored in the ESDS data set. Some applications will replace the data in the "deactivated" record with LOW-VALUES or HIGH-VALUES (X'00' or X'FF') to prevent attempting to use the data for anything.

The only way to truly delete data from an ESDS is to unload the data into another data set, delete and define the ESDS, and load back the desired data into the ESDS (skipping the records that are to be deleted from the ESDS either on the unload or the reload).


Whatever I have read I had posted but never tried it. Thanks for explaining it quite in detail. Now it will definitely help.