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 All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts INPFIL FILES, FNAMES examples SYNCSORT 7
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Compare the member of two pds on las... DFSORT/ICETOOL 13
No new posts JCL to merge two files side by side DFSORT/ICETOOL 3
No new posts Create a specific record/file based o... SYNCSORT 8
Search our Forums:


Back to Top