View previous topic :: View next topic
|
Author |
Message |
abdul
EXPERT
Joined: 28 Jul 2003 Posts: 23 Location: Bangalore,India
|
|
|
|
Hi,
Is there anyway to read ESDS file randomly in Cobol Batch program.Can we read it using RBA? If yes how? and if you can provide me any reference program that will be appreciated.
Thanks
Abdul |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
Hello abdul,
there are 2 secnarios for this question.
1) The file is not sorted.
In this case you can not read the ESDS file randomly
2) The file is sorted on some key.
I think you can read the file randomly by using START command.
With the help of START command, you can point to the specific record using a key and then read sequentially.
Hope this helps.
Regards
Mayuresh Tendulkar[/u] |
|
Back to top |
|
|
Johore
Specialist
Joined: 12 Sep 2003 Posts: 19
|
|
|
|
Hi ,
Entry-sequenced data sets are accessed by address, either sequentially or directly.When addressed sequential processing is used to process records in ascending relative byte address (RBA) sequence, VSAM automatically retrieves records in stored sequence.
To access a record directly from an entry-sequenced data set, you must supply the RBA for the record as a search argument.
Skip-sequential processing is not supported for entry-sequenced data sets.
Skip- Sequential is use of START to locate a key and then reading sequentilally.
Hope this helps
johore |
|
Back to top |
|
|
yashu_mys
New User
Joined: 09 Nov 2003 Posts: 4 Location: India
|
|
|
|
Hi ,
For RBA i think one needs PL/1 , cobol doesn't support RBA right..?
Thanks ,
Yashvanth . |
|
Back to top |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
on your question :
did u check in IBM manuals ? |
|
Back to top |
|
|
xzsymr
New User
Joined: 06 Jun 2003 Posts: 7 Location: NZ
|
|
|
|
Yes it is possible to read a ESDS randomly, You can define an alternate index, just like in a KSDS and use that as the path etc to access the file randomly |
|
Back to top |
|
|
Ananya
New User
Joined: 26 Feb 2004 Posts: 19 Location: Chennai
|
|
|
|
Dear Tendulkar,
Can START verb be used in ESDS?? are you sure about this? I don't think this is possible... but anyways,if I'm wrong pls correct me
Cheers
-Ananya |
|
Back to top |
|
|
sai_dd
New User
Joined: 01 Aug 2005 Posts: 5 Location: Cyprus
|
|
|
|
We can use START verb for accessing an ESDS file in a normal COBOL program too.
COBOL Syntax:
START <COBOL File name> ...
Sai |
|
Back to top |
|
|
kiran.v2
New User
Joined: 29 Jul 2005 Posts: 9
|
|
|
|
hi
in this case we can use search verb for accessing the sequential file randomly |
|
Back to top |
|
|
|