IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

random esds reading


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aklima

New User


Joined: 25 Nov 2005
Posts: 18
Location: uae

PostPosted: Mon Dec 19, 2005 7:56 am
Reply with quote

hi
can anyone tell me is there any option how to read esds file randomly?
if posible give the description detaily
thanks in

Success is not a destination that you ever reach. Success is the quality of your journey. --Jennifer James
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Dec 19, 2005 12:59 pm
Reply with quote

Hi frnd,
ESDS file cannot be read randomly. since it's a sequential file in VSAM v dont have the option for ESDS file to read it randomly
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Mon Dec 19, 2005 2:15 pm
Reply with quote

HI,

You can read ESDS randomly by using RBA. (Relative byte address).

EXEC CICS
read dataset("ds name")
into("WS-rec")
rba("address")
end cics.

you can find this in any cics books.
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Mon Dec 19, 2005 2:41 pm
Reply with quote

hai aklima,

in addition to the reply of raghunathns, i want to add that, we can access an ESDS randomly from vsam through the RBA with the option FROM ADDRESS and TO ADDRESS option.


corrections welcomed,

gowtham
Back to top
View user's profile Send private message
Balasubramanian

New User


Joined: 23 Apr 2005
Posts: 13
Location: Bangalore

PostPosted: Mon Dec 19, 2005 4:07 pm
Reply with quote

Hi,

Random access in ESDS is not possible by using COBOL, but the same can be done by using CICS

Thanks & Regards,
Balasubramanian S
Back to top
View user's profile Send private message
aklima

New User


Joined: 25 Nov 2005
Posts: 18
Location: uae

PostPosted: Mon Dec 19, 2005 11:09 pm
Reply with quote

hi to all,
first of all thanx for all the answers.
hey i got the answer for random reading.
see why not decribing a data variable in working storage section with occurs clause and the moving the file to that variable and then read the variable randomly.
u just try out this cause i can tell only but cant do this practically.
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Thu Dec 29, 2005 2:23 pm
Reply with quote

hi aklima,

ur solution is good if there are very few records.But if there are some millions of records means...then the program might take more storage space which is not accepted....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top