Posted: Mon Apr 27, 2009 11:14 am Post subject: Req:compare 2 files and write it to match and nomatch
Here is my requirement....
I have 2 input files of 5200 length. A 7 byte key is used to compare both the files, if there is a match than it needs to be written to match file but while writing to match file i need few fields from infile1 and all other fields from infile2.
If there is no match than write to no match output file.
Is it possible to do it in sort...i know it can be easily done using COBOL pgm but just want to know in sort/icetool/iceman/EZTRIEVE....
Thank you very much for the quck reply Natarajan...
Is it possible for you to elaborate your concept a bit...can you plz explain..
//SORTJNF1 DD *
//SORTJNF2 DD *
what the above statements will do....and i believe here i should specify my input files..
SORTJNF1 is the input file 1
SORTJNF2 is input file2
JOINKEYS FILES=F1,FIELDS=(1,7,A) <-- specify key of file 1
JOINKEYS FILES=F2,FIELDS=(1,7,A) <-- specify key of file 2
REFORMAT FIELDS=(F1:1,5200,F2:10,3) <-- specify what fields needs to be move
moved to output file from each file.. _________________ Natarajan
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum