If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Joined: 03 Jul 2007 Posts: 1288 Location: Chennai, India
Thanks a lot. It really worked.
You are welc me.
It would be great if you let me know the significance of each commands.
As Frank suggested, read the manual as all these commands are explained very well.
First the input records are sorted based on the first 3 bytes.The SORT statement sorts on the first 3 bytes to bring all of the records for each value together, so only one section is produced for each value.
From the manuals for REMOVECC
REMOVECC tells DFSORT to remove the carriage control character from the first byte of each record. As a result, the data starts in column 1 of the report rather than in column 2.
NODETAIL tells DFSORT to process the data records in the usual way, but not to write them to the report data set.
SECTION parameter is used to divide the output into sections by the first 3 bytes. 1,3 tells DFSORT to start a new section every time the value in columns 1-3 changes.
TRAILER3 - Is for section trailers
1,4 - First 4 bytes are written to the output
COUNT - Prints a message containing the count of records in a data set.
M11 - edit mask with the pattern as TTTTTTTTTTTTTTT. This is used as per your reqts.
LENGTH=6 - As you wanted only 6 bytes for the count.
Hope this helps. Post if you still have any query.