View previous topic :: View next topic
|
Author |
Message |
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
I am searching for a A/C No = 124 and Amount = 200 in VSAM file.Suppose 3 records are found and i want to write the oldest date record in to output file.
VSAM key is A/C no,Amount,Sequnce Num.
A/C No|| Amount|| capture-date || Sequnce num
124 || 200 || 27/10/2009 || 32322
124 || 200 || 25/10/2009 || 32323
124 || 200 || 28/10/2009 || 32324
How can i write the oldest date record ie 124 200 25/10/2009 32323 .how can i do this in cobol-vsam? |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Babu,
Assuming you are having a VSAM KSDS.... You will have to do a dynamic read based on the key and then do a date comparison for every read...
Note: You could have posted this in your original post itself... |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
|