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
 

 

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

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to write oldest date record in VSAM file to output file?
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    Post subject:
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    Post subject:
Reply with quote

double post
http://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.    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 1 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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