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 

Read VSAM file using partial Key - Batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Arian
Beginner


Joined: 24 Sep 2004
Posts: 10
Topics: 3

PostPosted: Tue Sep 28, 2004 9:37 am    Post subject: Read VSAM file using partial Key - Batch Reply with quote

Hi,

I have a batch program that reads a VSAM file.
The key lenght is 10 bytes. But I dnt know the first 5 bytes of the key. I know the last 5 bytes of the key.
Can i read the VSAM file with this information.
I dnt want to do a sequential read.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Sep 28, 2004 11:53 am    Post subject: Reply with quote

Arian,

Populate the first 5 bytes of the key with low-values and read the vsam file until your key is GE than the look up key

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Arian
Beginner


Joined: 24 Sep 2004
Posts: 10
Topics: 3

PostPosted: Tue Sep 28, 2004 1:39 pm    Post subject: Reply with quote

Kolusu, this would mean start from the begining ?
Its sequential read !
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Sep 28, 2004 2:12 pm    Post subject: Reply with quote

Arian,

If the access mode is dynamic, code START followed by READ NEXT, the next record is read and the file position indicator is reset to the next record. You can move the file position indicator randomly by using START, but all reading is done sequentially from that point.

Check this link which explains in detail Reading records from a VSAM file

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg10/1.10.3.3?DT=20020923143836

Hope this helps...

cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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