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
 

 

How to read multiple records having same alternate key?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to read multiple records having same alternate key?
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: 147
Location: Columbia, MO

PostPosted: Thu Oct 04, 2007 8:24 pm    Post subject: Reply to: How to read multiple records having same alternate
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: 2150
Location: At my coffee table

PostPosted: Thu Oct 04, 2007 9:09 pm    Post subject: Re: How to read multiple records having same alternate key?
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    Post subject:
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    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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 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
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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