MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading VSAM file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
Nithyama
Beginner


Joined: 28 Dec 2006
Posts: 3
Topics: 3

PostPosted: Sat Apr 28, 2007 1:37 am    Post subject: Reading VSAM file Reply with quote

How to read the VSAM sequential file from the beginning of the record?

I have read upto 5 th record. but i need to read the file again from the first record. could anyone pls help me?
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Tue May 01, 2007 1:33 am    Post subject: Reply with quote

I think closing and opening the file again should do it.
Back to top
View user's profile Send private message Send e-mail
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Wed May 02, 2007 2:25 am    Post subject: Reply with quote

Quote:
How to read the VSAM sequential file from the beginning of the record?

I would guess from your description of the file above, that it is an ESDS rather than a KSDS. If this is the case then you have to close and reopen the file as said above.

If there are unique keys for the file, then perhaps this can be achieved using RANDOM access, or even overlaying the ESDS with an AIX.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
blitz2
Beginner


Joined: 23 Jan 2007
Posts: 84
Topics: 14

PostPosted: Wed May 02, 2007 7:31 am    Post subject: Reply with quote

I think you should consider using tables, if you do not wish to lose the file pointer on the 5th record
________
California dispensary


Last edited by blitz2 on Thu Mar 10, 2011 5:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed May 02, 2007 8:00 am    Post subject: Reply with quote

beats me why you should do this but - if it always the 5th record then why not just store the first (or first four) record(s) in working storage so that it/they is/are there ready and waiting? But what happens when you read the 5th record the second time around? Repeat the process? Big loop!
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
jajularamesh
Beginner


Joined: 14 Apr 2006
Posts: 87
Topics: 33

PostPosted: Wed May 30, 2007 5:38 am    Post subject: Reply with quote

Can you move Low values to the key and make it point to the first record.I am not sure about this

I haerd it from one of my collegue's

Please let me know if this can be done or not
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group