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
 

 

Is Partial Key Generic read possible in a VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sanfel_karan

New User


Joined: 04 Jan 2006
Posts: 4

PostPosted: Wed Jan 23, 2008 4:45 pm    Post subject: Is Partial Key Generic read possible in a VSAM file
Reply with quote

Hi,

I've a requirement where I'm supposed to read a VSAM file with a partial key only. Can you please give me some pointers about this and help me?

Thanks in anticipation,
Shiv
Back to top
View user's profile Send private message

murmohk1

Senior Member


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

PostPosted: Wed Jan 23, 2008 6:02 pm    Post subject:
Reply with quote

Karan,

Do you want it in cics?
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Wed Jan 23, 2008 9:03 pm    Post subject: Reply to: Is Partial Key Generic read possible in a VSAM fil
Reply with quote

Say the key is:
05 ws-key.
10 ws-partial-key pic x(10).
10 ws-rest pic x(20).

Then, in the code you can do START on the file using partial key and later read the file using READ filename NEXT RECORD.

MOVE 'XXXX' TO ws-partial-key.
START filename
KEY IS equal to ws-partial-key.

-Ajay
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jan 23, 2008 11:56 pm    Post subject:
Reply with quote

Oh, skip sequential processing. Not good from a performance view with the buffer refreshes at access mode swap.
Back to top
View user's profile Send private message
sanfel_karan

New User


Joined: 04 Jan 2006
Posts: 4

PostPosted: Thu Jan 24, 2008 12:02 am    Post subject: Reply to: Is Partial Key Generic read possible in a VSAM fil
Reply with quote

Thanks for giving me hope by responding.

The COBOL program runs in a Batch environment (JCL). I would like to give a little more information on this. please see the situation below:

Records in my VSAM file looks like this.
Key fields Non key fields
---------------------------- -----------------
| || |
01 Location1 Part1 extra fields
02 Location2 Part2
03 Location1 Spaces
04 Location1 Part4
.
.
.
This VSAM file has a composite key containing 1st 3 fields (Record Type, Location_Id and Part_Number).

I read Record which has value as seen in 3rd record which means, there wont be a Part_Number field filled for Record type '03'.

I need to delete this Record Type '03'. but before doing this, I need to check for '04' record type and for the same location (in this case Location1) - need to do some updates in those records.

So in this case - I've Record type field (hard coded value of '04') and Location_Id field (getting the value from record type '03' record). But i dont have Part_Number field.

There are few more scenarios where i want some help. I'll get them once i get into office tomorrow. Until then, can any one please help me finding a solution for the above scenario?

Thanks,
Shiv
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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