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 a VSAM file using a partial key in easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Kumail Fazal

New User


Joined: 29 May 2007
Posts: 12
Location: Mysore

PostPosted: Thu Nov 08, 2007 3:51 pm    Post subject: How to read a VSAM file using a partial key in easytrieve
Reply with quote

Hi,
Is there a simple way using which we can a read a KSDS VSAM file using a partial key.
Say the key for the given VSAM file is of length 15(7+3+5) bytes but i need to search the VSAM(not sequential) using only the 7 bytes of partial key. There can be multiple records on the partial key(7 bytes) and i would just require the first record.

I think the above task can be done in numerous ways but i m looking for a very simple way.

Thanks
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu Nov 08, 2007 4:16 pm    Post subject:
Reply with quote

Kumail,

Quote:
i need to search the VSAM(not sequential) using only the 7 bytes of partial key.

I doubt we have this in easytreive.

If you put your requirement clearly, someone may come with the solution.
Back to top
View user's profile Send private message
Kumail Fazal

New User


Joined: 29 May 2007
Posts: 12
Location: Mysore

PostPosted: Thu Nov 08, 2007 5:18 pm    Post subject: Reply to: How to read a VSAM file using a partial key in eas
Reply with quote

The detail explaination for the problem is as follows
say i define a VSAM file
FILE INFILE1 VS
INFILE1-KEY 1 15 A
and then i define my PS file
FILE INFILE2
INFILE2-KEY 1 7 A

Now i read the first occurence of input file2(which is PS file) and take the first 7 bytes (which would be my key) and using it search the VSAM(partial key search) and after i have found the first occurence in the VSAM, write that record to output file.
I want a random partial search to be done on VSAM, please let me know what could be the most effective way of doing this
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Nov 09, 2007 8:14 am    Post subject:
Reply with quote

Kumail,

Quote:
Now i read the first occurence of input file2(which is PS file) and take the first 7 bytes

Are you expecting dups in flat file?

Quote:
please let me know what could be the most effective way of doing this

I belive your requirement could be accomplished using utils (like sort). Do you still want to proceed with Easytreive.
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: Fri Nov 09, 2007 3:09 pm    Post subject: Re: How to read a VSAM file using a partial key in easytriev
Reply with quote

Kumail Fazal wrote:
I think the above task can be done in numerous ways but i m looking for a very simple way.
Simple, use the POINT statement with a GE (greater than/equel to)....If I read the manual correctly, the key MUST be the same length as the VSAM key, but a simple area with the one file's 7 bytes and an additional 8 bytes of low values will work....
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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