View previous topic :: View next topic |
Author |
Message |
MFfresher Beginner
Joined: 14 Dec 2006 Posts: 1 Topics: 1
|
Posted: Thu Dec 14, 2006 11:56 pm Post subject: KSDS - Acess Sequentially |
|
|
Hello Gurus,
Can you help me on below issues for a KSDS VSAM using COBOL programming.
1. Can organization be declared as Sequential (I think NO)?
2. If access is mentioned as Sequential should Record Key be mentioned. Also, how do we do the sequential processing (like do we need to give a START etc.).
Thanks a lot.
Regards, Mffresher. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
ReinerZ Beginner
Joined: 30 Nov 2006 Posts: 11 Topics: 4 Location: Germany
|
Posted: Thu Dec 28, 2006 7:22 am Post subject: |
|
|
Hi,
In COBOL for a KSDS you must code the SELECT-Statement with
"ORGANIZATION IS INDEXED" and
"ACCESS IS SEQUENTIAL"
if you want to process the file sequentially, or code
"ACCESS IS DYNAMIC"
if you want access records directly by key, or if you want to process the file in a "skip-sequential" manner (means you would begin reading at a specific key and then read (next) a number of records. In this case you must code a START-Statement with the key (usually greater or equal) of the records you'd like to read. After a successful START (check success with the INVALID KEY-clause!) you can issue READ NEXT-Statements against the file.
Hope this helps a little...
Best regards
Reiner |
|
Back to top |
|
|
|
|