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
 

 

Partial Key for dynamic read

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Partial Key for dynamic read
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    Post subject:
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    Post subject: Re: Partial Key for dynamic read
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: 3158
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 3:20 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


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