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

How to write oldest date record in VSAM file to output file?


IBM Mainframe Forums -> COBOL Programming
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
babu_hi

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Fri Oct 30, 2009 12:23 pm
Reply with quote

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
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri Oct 30, 2009 1:16 pm
Reply with quote

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... icon_smile.gif

Note: You could have posted this in your original post itself...
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Oct 30, 2009 4:03 pm
Reply with quote

double post
ibmmainframes.com/viewtopic.php?t=44784
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top