Difference between Ps and ESDS

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
nrajini
Member
Posts: 23
Joined: Sun Oct 05, 2008 4:35 pm

Difference between Ps and ESDS

Post by nrajini » Sat Nov 01, 2008 9:43 pm

Hi,

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.

Thanks,
Rajini

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Sun Nov 02, 2008 7:25 am

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..
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

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

Hi,

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.
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Nov 22, 2008 10:46 am

Hi,
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.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others