View previous topic :: View next topic
|
Author |
Message |
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
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 |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
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 |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Actually, I haven't understood whether a ACCESS MODE IS must on VSAM ESDS or not? |
|
Back to top |
|
|
vjai6977
New User
Joined: 08 Aug 2008 Posts: 19 Location: Chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Another Lazarus topic, dead for 3.5 years and suddenly ................. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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
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
It can be read as Utility-Only Access Sequential
Having said that, 'am not sure ( ) what AS- means for ESDS, as Robert has said -- why to worry about that at first place but curiocity kills I know... .
May be that means Access is Sequential. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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... |
|
Back to top |
|
|
|