Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Difference between PS file and ESDS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 135
Location: Coimbatore

PostPosted: Thu Oct 08, 2009 8:36 am    Post subject: Difference between PS file and ESDS file
Reply with quote

Could you please give me a clear idea on what is the difference between PS file and ESDS file. As both are sequential file and not indexed (if not please correct me) how can we differentiate both in a COBOL program.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Oct 08, 2009 9:28 am    Post subject: Reply to: Difference between PS file and ESDS file
Reply with quote

Hmm.

Well, an ESDS dataset is a VSAM dataset and can only exist on DASD. A sequential dataset can exist on any supported media (DASD, Tape, SYSOUT, etc.).

A COBOL program differentiates between the two by the options you specify in the FILE-CONTROL paragraph.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Thu Oct 08, 2009 9:31 am    Post subject:
Reply with quote

The COBOL Language Reference Manual has the details.
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 135
Location: Coimbatore

PostPosted: Thu Oct 08, 2009 11:15 am    Post subject: Reply to: Difference between PS file and ESDS file
Reply with quote

Thanks for your reply. Ya i would like to know how to give it in COBOL program only. Could you please pass me the link on so that i can find it or else please pass me the FILE SECTION(to differentiate between both).
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 08, 2009 11:19 am    Post subject:
Reply with quote

A non-VSAM sequential file is simply a sequential file somewhere; could be disk, tape, cards, printer (or spooler) for example as Kevin has said. 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.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 08, 2009 11:21 am    Post subject:
Reply with quote

1. In physical sequential file records are stored in terms of blocks,where as in VSAM files records are stored in ControlInterval(C.I).

2. PS files can be created on tapes while the VSAM files cannot. And (probably that's why) VSAM files can have ALTINDX(alternate index) while no such facility exists for PS files.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 08, 2009 11:27 am    Post subject:
Reply with quote

Please have a look on the link Kevin has provided and keep in mind, if the file is a VSAM ESDS, your COBOL SELECT statement must be in the form
Code:
ASSIGN TO <comment>-AS-<ddname> 
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Thu Jan 21, 2010 4:54 pm    Post subject:
Reply with quote

FYI superk...


i have few Vsam datasets which reside on tapes in migrated state...
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 21, 2010 4:57 pm    Post subject:
Reply with quote

praveensinha wrote:
FYI superk...


i have few Vsam datasets which reside on tapes in migrated state...


Well I have a lot of punched cards on dasd and probably also migrated.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 21, 2010 5:20 pm    Post subject:
Reply with quote

praveensinha wrote:
i have few Vsam datasets which reside on tapes in migrated state...

I think that you will find that although the original structure of the file was VSAM, but when the file is migrated to tape it becomes a straight ol' PS file and NOT a VSAM file.

Please make sure that your statements are factual rather than fancifull.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 21, 2010 5:31 pm    Post subject:
Reply with quote

expat,
he is a Mainframe Storage Engineer,
why would not every breath that he utters be factual?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 21, 2010 5:47 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
he is a Mainframe Storage Engineer,

If his title was aviation engineer I'd probably never fly again icon_biggrin.gif
Back to top
View user's profile Send private message
praveensinha
Warnings : 1

New User


Joined: 02 Oct 2009
Posts: 64
Location: Hyd

PostPosted: Thu Jan 21, 2010 7:35 pm    Post subject:
Reply with quote

thank my friends... icon_biggrin.gif

Anyways its always a source of learning in this forum...
Back to top
View user's profile Send private message
Suresh Uthirapathy

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Thu Aug 04, 2011 1:32 pm    Post subject:
Reply with quote

Thanks All..!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us