Tricky question asked at IBM



Tricky question asked at IBM

Postby give_me_more » Fri May 14, 2010 7:18 pm

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
give_me_more
 
Posts: 5
Joined: Tue May 11, 2010 8:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Tricky question asked at IBM

Postby dick scherrer » Fri May 14, 2010 11:27 pm

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Tricky question asked at IBM

Postby MrSpock » Sat May 15, 2010 7:43 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Tricky question asked at IBM

Postby give_me_more » Thu May 20, 2010 8:23 pm

Thanks for the reply
give_me_more
 
Posts: 5
Joined: Tue May 11, 2010 8:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Tricky question asked at IBM

Postby djadhav147 » Thu Jun 01, 2017 6:42 pm

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.!!
djadhav147
 
Posts: 3
Joined: Thu Jun 01, 2017 6:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Tricky question asked at IBM

Postby Robert Sample » Thu Jun 01, 2017 9:31 pm

Hope this helps.!!
7 years after the question was asked, I doubt it will help very much.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Tricky question asked at IBM

Postby djadhav147 » Thu Jun 01, 2017 9:39 pm

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.
djadhav147
 
Posts: 3
Joined: Thu Jun 01, 2017 6:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Tricky question asked at IBM

Postby Robert Sample » Thu Jun 01, 2017 10:02 pm

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).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Tricky question asked at IBM

Postby djadhav147 » Thu Jun 01, 2017 10:10 pm

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.
djadhav147
 
Posts: 3
Joined: Thu Jun 01, 2017 6:36 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Interview Questions

 


  • Related topics
    Replies
    Views
    Last post