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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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