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

How to read multiple records having same alternate key?


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

New User


Joined: 06 Aug 2007
Posts: 4
Location: chennai

PostPosted: Thu Oct 04, 2007 8:07 pm
Reply with quote

hi all,
can any one tell me how to read multiple records having same alternate key using read browse next command?
Actually my problem is Read browse next is reading only one record from multiple records having same alternate key but I want all the record to be read.
please reply me soon
Thanks
vijay
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Oct 04, 2007 8:24 pm
Reply with quote

Is this a VSAM file? IMS? Sequential?

Many of the applications I work with have similar situations: read for a "base" key - usually part of the full key - and process until the base key is no longer equal using get next or read next logic.

Post your code and let us take a look at it.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Oct 04, 2007 9:09 pm
Reply with quote

er_vijaysingh wrote:
Actually my problem is Read browse next is reading only one record from multiple records having same alternate key but I want all the record to be read.
Unless I'm missing something, a read next should continue to get all the records....What does the manual say?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Oct 05, 2007 1:57 am
Reply with quote

Hi vijay,

Put your read next in a perform until the status key = 00 or eof. If there are more alt key recs the status is 02.

Don't forget to init the status before each perform.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top