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
 

 

Multiple start and read for KSDS VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
raviprabhu

New User


Joined: 20 Oct 2006
Posts: 29

PostPosted: Tue Feb 04, 2014 9:00 pm    Post subject: Multiple start and read for KSDS VSAM
Reply with quote

Is the Multiple start and read for KSDS VSAM in COBOL program is recommendable ?
If not whats the reason ?
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 04, 2014 9:07 pm    Post subject: Reply to: Multiple start and read for KSDS VSAM
Reply with quote

During the multiple START (assuming ACCESS IS DYNAMIC), are you reading the same record? If not, then read each record independently and randomly.

But, the worse thing you could do, would be to issue many CLOSE and OPEN's, for whatever reason.
Back to top
View user's profile Send private message
raviprabhu

New User


Joined: 20 Oct 2006
Posts: 29

PostPosted: Tue Feb 04, 2014 10:06 pm    Post subject:
Reply with quote

I have 5 records - I have read all records and then again i need to read from 1st record to 5th record, I am using start and then read (without closing the fie)
Is this fine to do ?
My requirement is for reading multiple times same 5 records
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 04, 2014 10:28 pm    Post subject: Reply to: Multiple start and read for KSDS VSAM
Reply with quote

Instead of re-reading the five records over and over, when you read them the first time, place them in a a WS array/table (with an occurs 5) and then upon the next need for them, obtain each one from the array.
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: Tue Feb 04, 2014 11:09 pm    Post subject:
Reply with quote

Hello,

Why does someone believe you need to re-read these records?

With only 5 records, suggest you do as Mr. Bil recommended.
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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