Joined: 08 May 2005 Posts: 26 Topics: 12 Location: pune
Posted: Thu Mar 09, 2006 8:52 am Post subject: How to count duplicate records
Hi,
I have inputfile of rec length of 80.I have to count the total number of records as well as number of duplicate records.Could anybody please provide a solution either in syncsort or cobol program.
In additon to the below query posed. I have a necessity to sum up the amounts of all duplicate records along with its occurences.Can anyone please provide me a solution.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue Apr 04, 2006 10:47 am Post subject:
Hikernh,
REMOVECC can be used to remove the ANSI control characters from a report.For ex: if you have 80 byte FB input dataset and when you use reporting features like header/trailer1, then sort automatically will create the output dataset with FBA and the LRECL would be 81. The extra 1 byte is for the ansi control character which is at the 1st byte.
Removecc suprress the creation of carriage control chararacter. So using it will make both the input and output have the same DCB parameters when you are using reporting features.
NODETAIL is used to Specify that data records are not to be written out for the reports produced for this OUTFIL group. With NODETAIL, the data records are completely processed with respect to input fields, statistics, counts, sections breaks, and so on, but are not written to the OUTFIL data set and are not included in line counts for determining the end of a page. You can use NODETAIL to summarize the data records without actually showing them
Can u guys please let me know How exactly this works ( An Overview)
Am bit confussed.
Whatz d difference in using SUMFILEDS and TRAILER option
Whatz iiiii.t??
Whatz d difference in using SUMFILEDS and TRAILER option
Whatz iiiii.t??
The difference is that when using sum fields you are restricted by the size of the summing field. In the above example mohanty is summing on 3 bytes and the max number it can hold is 999. Once the total is more than that sort writes it as a seperate record. So you would get incorrect results.
However with trailer option it would expand the field internally and does the summation for you and there by giving you the correct results.
If you want to understand more run the jobs shown by mohanty with the test data I supplied in this topic.
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