MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Random read of ESDS file in COBOL.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
pmsteam
Beginner


Joined: 06 Nov 2003
Posts: 3
Topics: 2

PostPosted: Tue Nov 18, 2003 12:29 am    Post subject: Random read of ESDS file in COBOL. Reply with quote

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.

Question

Thanks,

PMSteam
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Nov 18, 2003 4:46 am    Post subject: Reply with quote

Why even try? That is what KSDS or RRDS is for.
Back to top
View user's profile Send private message Visit poster's website
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Wed Nov 19, 2003 10:40 am    Post subject: Reply with quote

If you absolutely have to do this, I think you may have to code an assembler subroutine.
Back to top
View user's profile Send private message
pmsteam
Beginner


Joined: 06 Nov 2003
Posts: 3
Topics: 2

PostPosted: Tue Nov 25, 2003 12:36 am    Post subject: Reply with quote

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 Question
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Nov 25, 2003 1:57 am    Post subject: Reply with 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. 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
View user's profile Send private message Visit poster's website
neilxt
Beginner


Joined: 01 Mar 2004
Posts: 23
Topics: 1

PostPosted: Wed May 12, 2004 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu May 13, 2004 2:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group