IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc...
Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Read The VSAM file from Start without Key.

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CICS
View previous topic :: View next topic  
Author Message
hitesh0000



Joined: 01 Feb 2008
Posts: 6
Location: Noida

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

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  
Bill O'Boyle



Joined: 14 Jan 2008
Posts: 269
Location: Orlando, FL, USA

Posted: Thu Jul 03, 2008 4:04 pm    Post subject: Re: Read The VSAM file from Start without Key.  

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  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1388
Location: germany

Posted: Thu Jul 03, 2008 4:10 pm    Post subject:  

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  
hitesh0000



Joined: 01 Feb 2008
Posts: 6
Location: Noida

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

Hi Bill O'Boyle,

Its working, thank you very much.



U have really been of great help.



Thanks,
Hitesh
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CICS
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
Related Links