I have a production job which until recently performed as expected, using ICETOOL to compare today's file with yesterday's file, and write out a file of today's records which have changed from yesterday (other than changes to the date and a file identifier). Within the last couple of weeks, the results have been inconsistent, as sometimes the change file contains only the changed records as expected, while sometimes it contains basically all of the new file records, whether they have changed or not.
I tried the job with changes as you suggested, but am still having inconsistent results. With the test files I am using sometimes I get 724 records in CHGFILEO (which is the number I expect), and sometimes I get 82,555 records in CHGFILEO. This is running the exact same JCL with the exact same input files.
The only other thing I have noticed is that for runs where I get 82,555 records in CHGFILEO, I also get the following message displayed:
ICE080I 0 IN MAIN STORAGE SORT
This message does not appear in the runs when I get 724 records.
In order to analize this kind of thing, I'd need to see exactly you're doing and what results you're getting. This is NOT the kind of thing we can do on a helpboard. If you like, add the following to your job:
//SORTDIAG DD DUMMY
and send the JES, TOOLMSG and DFSMSG output for a "good" run and a "bad" run to me offline (email@example.com) and I'll take a look. Please put "DFSORT" somewhere in your Subject line to catch my attention.