Page 1 of 1

Difference between Ps and ESDS

Posted: Sat Nov 01, 2008 9:43 pm
by nrajini

Kindly clarify.

Seeing a cobol program how to identify whether it is a PS or ESDS file..

If we are using Alternate index it is ESDS File other than this what are the ways we can identify it is PS or ESDS file.


Posted: Sun Nov 02, 2008 7:25 am
by Natarajan
Again - It look like this is a interview question, please post your queries in INTERVIEW QUESTIOS forum.

Answer to your question -
Normally there is a standard, using AS- for VSAM ESDS datasets in SELECT clause.

SELECT filename ASSIGN TO AS-name.

I am not sure... this is the standard for all shops... or it is shop specific..

Posted: Sat Nov 22, 2008 10:38 am
by Anuj Dhawan

A non-VSAM sequential file is simply a sequential file somewhere; could be disk, tape, cards, printer (or spooler) for example. On a z-OS(MVS) system, these files are normally accessed via QSAM IO modules. A VSAM ESDS is a file located on disk in VSAM-managed space (i.e. is listed in the VSAM catalog) and is accessed via VSAM IO modules. As far as COBOL is concerned, either type of file is OK for use as a SEQUENTIAL file with no program changes needed.

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.

Posted: Sat Nov 22, 2008 10:46 am
by Anuj Dhawan
Natarajan wrote:SELECT filename ASSIGN TO AS-name.

I am not sure... this is the standard for all shops... or it is shop specific..
That's the way ESDS VSAMs are designed, this is not shop specific.