IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Multiple start and read for KSDS VSAM


 
IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 04, 2014 9:07 pm
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
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 04, 2014 10:28 pm
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

Moderator Emeritus


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

PostPosted: Tue Feb 04, 2014 11:09 pm
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 All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Need to read duplicate rows from tabl... DB2 3
No new posts Creating a single-record file with CO... DFSORT/ICETOOL 8
No new posts Read 4MB message and split into multi... COBOL Programming 9
No new posts VSAM Alter Command - Cylinder Extent ... JCL & VSAM 3
No new posts RPLDDDD field for extended VSAM - ESDS JCL & VSAM 0

Back to Top