Page 1 of 1

What is the difference between PS file and ESDS file?

Posted: Mon Jun 10, 2013 10:14 am
by Angel
Hi,

In a recent interview I've been asked what is the difference between PS file and ESDS file?

Apart from knowing that they both can be accessed sequentially, I could not get a better answer - can someone please help?

Re: What is the difference between PS file and ESDS file?

Posted: Mon Jun 10, 2013 7:56 pm
by Anuj Dhawan
You had a good start I think, in the interview! :)

Here is what I'll try to add in:

A very simple thing which you perhaps knew but did not notice & that is - in physical sequential file records are stored in "blocks", where as in VSAM files it's ControlInterval(C.I.).

Other thing is, QSAM (PS) "files" can be created on tapes while the VSAM files cannot.

Said that, ESDS is the which is VSAM-speak for sequential file. Unless 'am mistaken, the original idea was to replace PS by ESDS which, possibly, had faster I/O but with these days of RAID, Cache etc. the DASD perform much faster than they ever did before and perhaps, that's why they never really caught on that well.

Additional functionality of ESDS is that it can be overlayed by an AIX while for sequential files, this can not be done.

Re: What is the difference between PS file and ESDS file?

Posted: Mon Jun 10, 2013 8:09 pm
by Anuj Dhawan
An ESDS is essentially a sequential dataset where new records are always inserted at the end. You cannot access records directly with a key. However, you may access specific records with a relative byte address (RBA), if you have or can calculate it. In fact, it's fairly common to see CICS application use an ESDS as a log file to write records in sequential order while retrieving the new record's RBA from the RIDFLD operand of the EXEC CICS WRITE command. If the application squirrels away the RBA it can later retrieve the log record directly. Also note that you cannot physically delete a record from an ESDS. Instead, most applications utilize a "logical delete" scheme where a field in the ESDS record is set to a value indicating the record is no longer valid.

Re: What is the difference between PS file and ESDS file?

Posted: Mon Jun 10, 2013 11:37 pm
by Akshya Chopra
This is a good question, Thanks for posting Angel.

Re: What is the difference between PS file and ESDS file?

Posted: Wed Jun 12, 2013 11:00 am
by Angel
Thanks Anuj - this is more than enough for me to remember! :)

Re: What is the difference between PS file and ESDS file?

Posted: Wed Jun 12, 2013 4:41 pm
by Anuj Dhawan
Gald that I had been helpful.

Good Luck with Interviews! :)