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

comparision between two files to extract records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rbheemana

New User


Joined: 07 Jan 2008
Posts: 8
Location: hyderabad

PostPosted: Mon Sep 14, 2009 10:27 pm
Reply with quote

Hi,
I have two files
File1:
01/02/2008

File2:
01/03/2007
header1
header2
header3
01/08/2009
header4
header5
....
.
.
.

Now i have to take date from first file and check with dates in files two. If date in file1 is less than date in file2 i need to write all header records under it to output file.
in our case. Output file should have
01/08/2009
header4
header5
....
.
.
.

I need to do this thru JCL. Can Anybody help me on this?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Sep 14, 2009 10:54 pm
Reply with quote

Quote:
I need to do this thru JCL
Dont you need any "program" to execute icon_question.gif

If you are trying to do this using sort, please post here the sort product name and version.
Input and Output RECFM/LRECL?
Does file-1 always have a single record? Whats the date format here-MMDDYYYY or DDMMYYYY?
Back to top
View user's profile Send private message
rbheemana

New User


Joined: 07 Jan 2008
Posts: 8
Location: hyderabad

PostPosted: Tue Sep 15, 2009 11:29 am
Reply with quote

yes file1 has 1 record..
date is exactly same as i mentioned in example..
mm/dd/yyyy
SYNC SORT...
Back to top
View user's profile Send private message
rbheemana

New User


Joined: 07 Jan 2008
Posts: 8
Location: hyderabad

PostPosted: Tue Sep 15, 2009 11:32 am
Reply with quote

there is no program to execute in between.. i need to execute a program on the output file of the mentioned sort..
second file length is 80 bytes..
output file is also of 80 bytes..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top