View previous topic :: View next topic |
Author |
Message |
pmsteam Beginner
Joined: 06 Nov 2003 Posts: 3 Topics: 2
|
Posted: Tue Nov 18, 2003 12:29 am Post subject: Random read of ESDS file in COBOL. |
|
|
Hi,
We have ESDS file. We need to read the records randomly from it. We need to do it in COBOL.
I thought of doing it by RBA but i have read few post in here which say that it is not possible in COBOL. Is their any other way to read a ESDS file randomly in COBOL?
If yes can some one please give me the code for it.
Thanks,
PMSteam |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Tue Nov 18, 2003 4:46 am Post subject: |
|
|
Why even try? That is what KSDS or RRDS is for. |
|
Back to top |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Wed Nov 19, 2003 10:40 am Post subject: |
|
|
If you absolutely have to do this, I think you may have to code an assembler subroutine. |
|
Back to top |
|
 |
pmsteam Beginner
Joined: 06 Nov 2003 Posts: 3 Topics: 2
|
Posted: Tue Nov 25, 2003 12:36 am Post subject: |
|
|
Thanks for your sugestions.
Can you please tell me how I can use this assembler code in COBOL.
And can I user altternate index and BLDINDEX commands to craete index for the existing file and then read it randomly using index?
Thanks
PMSTEAM  |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Tue Nov 25, 2003 1:57 am Post subject: |
|
|
pmsteam, when you talk about alternate index and bldindex you are not talking about an esds anymore. Instead you are talking about a KSDS dataset. You will have to define a ksds dataset, sort your esds dataset according to the key you want to use, and fill the ksds set with the sorted data. You can also define an alternate index and path, build the alternate index with bldindex, and then read the dataset randomly using the alternate index or primary index (do not forget to have a DD for the path if using alternate index). You do not need assembler at all to do all of this. Please look at the manuals and other threads about this subject. |
|
Back to top |
|
 |
neilxt Beginner
Joined: 01 Mar 2004 Posts: 23 Topics: 1
|
Posted: Wed May 12, 2004 4:38 pm Post subject: |
|
|
Quote: |
Can you please tell me how I can use this assembler code in COBOL.
|
You write an assembler subroutine and call it. I don't think you can mix assembler language code into COBOL and I'm not sure I'd want to if you could.
Quote: |
And can I user altternate index and BLDINDEX commands to craete index for the existing file and then read it randomly using index?
|
and
Quote: |
pmsteam, when you talk about alternate index and bldindex you are not talking about an esds anymore. Instead you are talking about a KSDS dataset.
|
Forgive me if I'm wrong, it was a long time ago, but I do actually believe this is possible and may be your answer. In fact I'm pretty certain that I've read somewhere that this is a reccommended method for achieving efficiency gains in some (fairly unusual) types of file access situations.
OTOH you might just be better sorting it into sequence and doing a 2 file match. Occasionally the boring answer is the right one. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu May 13, 2004 2:52 am Post subject: |
|
|
Maybe, this would help.
Reading ESDS files randomly using COBOL II _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
|
|