Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us