View previous topic :: View next topic
|
Author |
Message |
Selva-kumar
New User
Joined: 01 Mar 2007 Posts: 52 Location: chennai
|
|
|
|
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 |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
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 |
|
|
Selva-kumar
New User
Joined: 01 Mar 2007 Posts: 52 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
No, it is not possible.
You can start with A only, then you have to read untill C meets your requirements. |
|
Back to top |
|
|
|