Summary Display as per given input field



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Summary Display as per given input field

Postby Swapnilkumar » Mon Aug 27, 2012 9:57 am

We had an extract with some data in it and we had to prepare a summary report. The summary report had to contain the record count for each record in the extract along with the description of the Record status like e.g. Header11, header22...
Our input extract was as follows:
----+--
22 1000
33 2400
40 4832
40 5458
55 5458
22 5458
33 5458
29 5458
00 5458
00 5458

As per the record status we needed to count number of occurances of hte record statuses in the report and list down as mentioned below.
And the expected output was as follows:
COUNT OF RECORD STATUS 00 (HEADER11)       :        2   
COUNT OF RECORD STATUS 22 (HEADER22)       :        2   
COUNT OF RECORD STATUS 29 (OTHER)          :        1   
COUNT OF RECORD STATUS 33 (HEADER44)       :        2   
COUNT OF RECORD STATUS 40 (HEADER55)       :        2   
COUNT OF RECORD STATUS 55 (HEADER66)       :        1   

For this we developed following control/sort card
INREC FIELDS=(1,2,X,1,2,CHANGE=(17,C'00',C'(HEADER11)',             
                                   C'22',C'(HEADER22)',             
                                   C'33',C'(HEADER44)',             
                                   C'40',C'(HEADER55)',             
                                   C'55',C'(HEADER66)'),           
NOMATCH=(C'(OTHER)'),60X)                                           
SORT FIELDS=(1,2,ZD,A)                                             
OUTFIL REMOVECC,NODETAIL,                                           
SECTIONS=(1,2,TRAILER3=('COUNT OF RECORD STATUS ',1,20,': ',COUNT))


~ SECTIONS groups the data on the basis of the RECORD status
~ TRAILER3 displays the specified sting at the end of each section.
~ REMOVECC removes the ANSI printer control characters
~ NODETAIL suppresses the copying of the input data to the output.


This topic is for sharing, if you have any other solution for this then please feel free to post ;)
____________________________________________
Regards,
- Swapnilkumar.
Swapnilkumar
 
Posts: 12
Joined: Tue Aug 07, 2012 10:05 pm
Location: Pune, India
Has thanked: 0 time
Been thanked: 0 time

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post