Posted: Mon Jul 13, 2009 12:13 am Post subject: Want to compare two files using DFSORT or ICETOOL
Hi,
I want to compare two files A & B and I have to write the matched record output in another file.The sequence of the records should not change and It should be in the sequence as shown below.
File A
...1231...a...
...2231...a...
...1111...a...
Key starts from Position 13 length 3 bytes(i.e.,123,111,223...)
The output rec format should be like shown below
...1231...a...
...1232...x...
...1232...x...
...2231...a...
...2232...x...
...2232...x...
...1111...a...
...1112...x...
...1112...x...
the record sequence should be as showm above.....
Please help me out in this.
Thanks,
chethan M _________________ Thanks,
Chethan Mallaiah
FILE A is also of length 260 FB and File A does not contain Duplicates....If the record is present in file B and not in File A then those records should also be written in the output file. _________________ Thanks,
Chethan Mallaiah
Joined: 26 Nov 2002 Posts: 12385 Topics: 75 Location: San Jose
Posted: Mon Jul 13, 2009 10:31 pm Post subject:
Chethanm,
The following DFSORT JCL will give you the desired results. we create a 1 byte header record in step0100 with the same DCB properties as your input files and concatenate it with your input files which would be used to identify the record to the file when using the group function.
Thanks for your reply.....
I didn't get the desired output....I wanted the output records in the same sequence as that of the FILE A ...but i am getting the output in the sorted order which i don't want...
the output file should be in the same sequence as that of the input FILE A.
Please help me out in this regards.... _________________ Thanks,
Chethan Mallaiah
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