IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

A basic question on flat / ESDS file.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Mar 17, 2006 3:41 pm
Reply with quote

Hi,

We generally use the following code in a COBOL program to access a FLAT (PS) file.

Code:

SELECT I-XXX-XXX ASSIGN TO XXXXXX.


For flat files, we don't use ACCESS MODE IS SEQUENTIAL because it is the default.

For VSAM ESDS file, we use the following code.

Code:

SELECT I-XXXXXXX              ASSIGN TO XXXXXXX     
                              ORGANIZATION IS INDEXED
                              ACCESS IS SEQUENTIAL       




Does the above SELECT statement holds good for the ESDS file instead of a PS file? If yes, then how can we find whether a COBOL program is using a FLAT or VSAM ESDS file by just looking at the program?

Please help.

TIA.
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Fri Mar 17, 2006 4:08 pm
Reply with quote

hi mf_user,

for esds file we are giving ORGANIZATION IS SEQUENTIAL.Generaly in our organization we are folloing convention as infront of esds data set.

for example in the given eaxple ,we are using like this

SELECT I-XXXXXXX ASSIGN TO AS-XXXXXXX
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.

then we can identify it is esam esds file.

With regard's
thanooz.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Mar 17, 2006 6:07 pm
Reply with quote

Quote:
for esds file we are giving ORGANIZATION IS SEQUENTIAL.Generaly in our organization we are folloing convention as infront of esds data set.

Well, thanooz that seems a Shop- Specific Standard to identify the files... It may differ shop to shop... So it would not be a great idea to look for those with out referring your system standards.

For VSAM File ORGANIZATION is INDEXED (again an exception in ESDS).
For PS file ORGANIZATION is SEQUENTIAL.

Regards,
Priyesh.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Fri Mar 17, 2006 6:15 pm
Reply with quote

hy guys,

VSAM ESDS means Entry sequenced dataset, means there is no index.
therefore you cannot give the clause is indexed. you are only able
to access it sequential.

VSAM KSDS is the Key sequenced datset which needs indexing...

martin9
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Sat Mar 18, 2006 10:13 am
Reply with quote

Actually, I haven't understood whether a ACCESS MODE IS must on VSAM ESDS or not?
Back to top
View user's profile Send private message
vjai6977

New User


Joined: 08 Aug 2008
Posts: 19
Location: Chennai

PostPosted: Wed Sep 09, 2009 5:50 pm
Reply with quote

Hi,

As a COBOL standard for a ESDS file we use the physical file name prefixed with 'AS-',

SELECT I-XXXXXXX ASSIGN TO AS-XXXXXXX
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.


What does this AS- stands for , is it COBOL syntax for ESDS file or JCL requirement for a ESDS file.

Regards,
Jai-Chennai
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 09, 2009 5:57 pm
Reply with quote

There is a link to the manuals at the top of the page. If you check out the COBOL Language Reference manual, section 4.2.3 on the ASSIGN clause, you will find that VSAM sequential (that is, ESDS) files require AS-ddname. There is no definition of what the AS stands for -- and it does not really matter, either. All you as an applications programmer need to know is that if you are using an ESDS file in COBOL, the ASSIGN must be to AS-ddname. The JCL statement will be //ddname DD ... for this file, so the AS- requirement is for COBOL not JCL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 09, 2009 6:16 pm
Reply with quote

Another Lazarus topic, dead for 3.5 years and suddenly .................
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Sep 09, 2009 8:17 pm
Reply with quote

Long back (probably), Mainframes were not that 'intelligent' to understand the whereabouts of a file. There were, I assume because of shop standards, different ways to tell the system about the files, whether the file is on DASD or on TAPE. In all the files which are referred as
Quote:
DA-INFIE
DA should stand for Direct Access

In my shop for the files which are supposed to be OPENed in INPUT mode they used to start with
Quote:
UT-S-File name
It can be read as Utility-Only Access Sequential

Having said that, 'am not sure ( icon_biggrin.gif ) what AS- means for ESDS, as Robert has said -- why to worry about that at first place but curiocity kills I know... icon_smile.gif.

May be that means Access is Sequential.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Sep 09, 2009 8:20 pm
Reply with quote

Anuj Dhawan wrote:
May be that means Access is Sequential.
When did Alternate Index for ESDS came into the existence then? Curiosity kills you know... icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top