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

Compare Files in Natural


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shivendu

New User


Joined: 20 Feb 2009
Posts: 14
Location: Workstation

PostPosted: Mon Apr 06, 2009 10:59 am
Reply with quote

Need to write a natural program to compare data in two files FILE1 and FILE2. Data which is present ONLY in FILE2 should be written to a new file FILE3.
Please help.
Back to top
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Mon Apr 06, 2009 5:40 pm
Reply with quote

Can you please clarify a bit..that what exactly you are looking for ??

Data structure of your FILE1 and FILE2 are same ?

If yes then you can use following logic to create a program.

1) Create data definition for your FILE1 record and FILE2 record.
2) Select a key( Combination of 3-4 vars) from FILE2 and do a look up in FILE1.
3) Now if match does not occur then write the record into FILE3
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Apr 06, 2009 6:12 pm
Reply with quote

Why can't you invoke SORT from within Natural? (you can use ICETOOL with the ALLDUPS operand).

O.
Back to top
View user's profile Send private message
Shivendu

New User


Joined: 20 Feb 2009
Posts: 14
Location: Workstation

PostPosted: Mon Apr 06, 2009 6:34 pm
Reply with quote

Thank you all! I did it through ICETOOL.
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top