Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us