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
 

 

Read The VSAM file from Start without Key.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
hitesh0000

New User


Joined: 01 Feb 2008
Posts: 6
Location: Noida

PostPosted: Thu Jul 03, 2008 3:31 pm    Post subject: Read The VSAM file from Start without Key.
Reply with quote

Hi,

I have to code a new online program which reads the VSAM file from start to end.

But i dont have the key for the first record, so my question is can i read the first record of the file and henceforth the entire VSAM file.

If yes, which way?

How is it that i bring the pointer to the first record so as to read the entire record and thereafter read the next record until EOF.

It doesnt allow me to Read file without RIDFLD.

Thanks,
Hitesh
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: Thu Jul 03, 2008 4:04 pm    Post subject: Re: Read The VSAM file from Start without Key.
Reply with quote

Move LOW-VALUES to the WS KEY and use this WS KEY as the RIDFLD in the STARTBR command to begin your browse.

FWIW, you cannot Browse a KSDS file without the RIDFLD as you'll get a translator error.

If for some strange reason a NOTFND condition is raised on the STARTBR, then the file is EMPTY.

Otherwise, issue subsequent READNEXT commands until you've reached EOF (EIBRESP=20) or the record that you've just read contains the information that you need. If this is the case, then it would be wise to issue an ENDBR command rather than wait until task termination.

Regards,

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 03, 2008 4:10 pm    Post subject:
Reply with quote

Quote:

I have to code a new online program which reads the VSAM file from start to end.


good use of online resources.
Back to top
View user's profile Send private message
hitesh0000

New User


Joined: 01 Feb 2008
Posts: 6
Location: Noida

PostPosted: Thu Jul 03, 2008 7:35 pm    Post subject: Reply to: Read The VSAM file from Start without Key.
Reply with quote

Hi Bill O'Boyle,

Its working, thank you very much.



U have really been of great help.



Thanks,
Hitesh
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am


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