Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Priya,
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: 1287 Location: Chennai, India
Priya,
Quote:
Thanks a lot. It really worked.
You are welc me.
Quote:
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.
Code:
SORT FIELDS=(1,3,CH,A)
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.
Code:
OUTFIL REMOVECC,NODETAIL,
From the manuals for REMOVECC
Quote:
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
Quote:
NODETAIL tells DFSORT to process the data records in the usual way, but not to write them to the report data set.
Code:
SECTIONS=(1,3,
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.
Code:
TRAILER3=(1,4,5:COUNT=(M11,LENGTH=6)))
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.