IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Partial Key for dynamic read


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Tue Jun 05, 2007 1:55 pm
Reply with quote

Hi,

I have a VSAM file with key as 25 bytes. A-19 bytes, B-3 bytes, C-3 bytes. Now i need to do a dynamic read on this file by populating the field A and C alone. I don't want to populate the field B. I need to do a read the file using A and C of the key which is not continuous. Is it possible?
Back to top
View user's profile Send private message
rz061m

New User


Joined: 03 Mar 2006
Posts: 48
Location: Chennai

PostPosted: Tue Jun 05, 2007 2:28 pm
Reply with quote

hi,

This can be achieved by Dynamic read using START command.

Move the values to A and C, move low-values to B and issue an START command with KEY greater than option. Refer manuals for actual syntax.

This will fetch the first record with value greater than A, B(Low values) and C. Now start issuing Read next to fetch records untill the A 7 C values changes.

I have a question here ??? If it is a VSAM file with key (KSDS) how could you say that A & C are not continuous.

Thanks,
Karthik. P
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Tue Jun 05, 2007 2:54 pm
Reply with quote

The ksds file is having the key as 25 bytes in total. It is a combination of 3 fields. In the ksds file, all the three fields will have values. But i need to fetch the record only using the first and last field. If i fetch using A and B, the two fields are continuous, so i can use the start key for the two fields. But here i need to fetch using first and last field of the key.

The key in the file is as such
1111111111111111111222333
6666666666666666666777888

Now can i use the start key to move values for A and C and get a record?

i.e., for the first record to be fetched , i need to move 1111111111111111111 to A and 333 to C.

Is it possible?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 3:20 pm
Reply with quote

No, it is not possible.
You can start with A only, then you have to read untill C meets your requirements.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top