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 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
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


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