Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Search randomly with the records in VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shahul hameed abdul kader
Currently Banned

New User


Joined: 20 Feb 2008
Posts: 5
Location: navalur

PostPosted: Tue Mar 04, 2008 11:28 am    Post subject: Search randomly with the records in VSAM file
Reply with quote

I have one sequential file with records like bank id and I want to search randomly with the records in VSAM file. So I declared in the file section access mode is random so how can I search the particular record in the VSAM file?
Back to top
View user's profile Send private message

r.ravikumar

New User


Joined: 05 Jan 2007
Posts: 18
Location: chennai

PostPosted: Tue Mar 04, 2008 12:04 pm    Post subject: Reply to: Search randomly with the records in VSAM file
Reply with quote

HI shahul,

You can pass the value from sequential file to 'Record Key' of VSAM file to access the record in random
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 04, 2008 12:40 pm    Post subject:
Reply with quote

Even though access is random, it is always good practice to sort the control file by the VSAM key before getting the records as you may eliminate a number of I/O operations by reusing the index CI's in memory rather than skipping around the KSDS totaslly randonly, and at some stage in the future reloading the same CI into memory.

In one case many years ago, this took over 30 minutes off of the elapsed time of one job.

Also may be an idea to increase the number of index buffers allocated to your KSDS file, say 10.
Back to top
View user's profile Send private message
shahul hameed abdul kader
Currently Banned

New User


Joined: 20 Feb 2008
Posts: 5
Location: navalur

PostPosted: Tue Mar 04, 2008 2:09 pm    Post subject: syntax for random read
Reply with quote

I want to search a particular record from one ps file with set of records in VSAM file in random mode if any match then display the same. moreover I assigned access mode is random.

thanks
Back to top
View user's profile Send private message
kishorekyn

New User


Joined: 20 Feb 2008
Posts: 5
Location: Chennai

PostPosted: Sun Apr 13, 2008 1:55 pm    Post subject: Reply to: Search randomly with the records in VSAM file
Reply with quote

Just let me know what kind of a VSAM file it is... Then we could help you out
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Apr 13, 2008 4:36 pm    Post subject:
Reply with quote

Hello kishorekyn,

Please notice that the person you are replying to has been "banned", so they will probably not be able to post the info you asked for. . .
Back to top
View user's profile Send private message
kishorekyn

New User


Joined: 20 Feb 2008
Posts: 5
Location: Chennai

PostPosted: Mon Apr 14, 2008 11:12 am    Post subject: Reply to: Search randomly with the records in VSAM file
Reply with quote

Thanks Dick.... I din't notice that. Sorry
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 14, 2008 7:10 pm    Post subject: Reply to: Search randomly with the records in VSAM file
Reply with quote

You're welcome icon_smile.gif

I'm sure there will be other opportunities icon_wink.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 1 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us