Just a clarification. When we do some file comparison based on some keys. If we have billions of records then which will be better in performnce ICETOOL or Cobol ?
I know ICETOOL will easier to code but performnce wise need to decide also. I will be using SPLICE as I need to overwrite few fields based on some condition.
I'd say that for the I/O DFSORT/ICETOOL for a few billion records would knock Cobol into a cocked hat. Hare vs Tortoise, without any danger of the Hare going to sleep.
If you look at the Cobol manual for compiler option FASTSRT (or similar name), you get the idea if you want the faster processing of the files, let Sort do the IO.
For such volumes, you really want to get it right first time, and be nice and stable, to avoid lost time due to silly failures.
If you give us the information about the rest of the processing, I'm sure you can get some very good advice.
As sqlcode1 has said, get yourself some decent-sized, and representative, test files. For this task, performance is going to be important to you.
If some of the processing is too complex, there is always the option of "Sort Exit"s, modules which you write, can be in Cobol, and are called by the sort itself (saving Cobol reading the file(s) again).
JOINKEYS has been available for DFSort for quite a some time now. Read JOINKEYS for DFSort here
No matter how you do this, you need to make sure the input is sorted first. . .
DFSORT can sort and join the files in the same step. Input files doesn't have to pre-sorted as an input to DFSort JOINKEYS.
With Cobol, unless OP is using internal sort for this huge volume, he would need separate steps to sort both the input files on key fields first and then feed these 2 files in cobol, whereas with DFSort Joinkey, he doesn't have to do this in separate steps as JOINKEYS would sort the keys and match the files in a single step.
However, if I am to process files with "billions of records" and using JOINKEYS for match, I would go with separate sort steps each files and follow it up with SORTED,NOSEQCK in JOINKEYS.