SORT using WHEN=GROUP



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

SORT using WHEN=GROUP

Postby jorgess » Fri Nov 29, 2013 11:11 pm

Hi,

Could someone help me with this please?

Input:
<...+....1....+....2....+....3....+....
     ABC 13.02.2013            5203,42
     BOP 13.02.2013         2731356,48
     RRR 13.02.2013               0,00
     ABC 14.02.2013         3034718,66
     ABC 14.02.2013             749,44
     BOP 14.02.2013           27013,82
     RRR 14.02.2013               0,00
     BOP 15.02.2013          738599,25
     RRR 15.02.2013               0,00
     ABC 18.02.2013           10808,49
     BOP 18.02.2013          129649,51
     RRR 18.02.2013               0,00
     BOP 20.02.2013          929333,96
     RRR 20.02.2013               0,00
     RCB 20.02.2013              30,59


Expected Output:

<...+....1....+....2....+....3....+....
     ABC 13.02.2013            5203,42
     BOP 13.02.2013         2731356,48
     RRR 13.02.2013               0,00
     ABC 14.02.2013         3034718,66
     ABC 14.02.2013             749,44
     BOP 14.02.2013           27013,82
     RRR 14.02.2013               0,00
     ABC 18.02.2013           10808,49
     BOP 18.02.2013          129649,51
     RRR 18.02.2013               0,00


Important Points:
1. Each groups has the same date, 10-19, (e.g. 13.02.2013 group has three lines,
group 20.02.2013 has two lines. There is not a defined number of possible lines);

2. The output will have only the groups that have ABC and RRR identifiers, 6-8. In the example listed above,
group 15.02.2013 and 20.02.2013 will not be part of the output.Identifiers may appear more than once in a group.



Query:

I know I need to use IFTHEN(WHEN=GROUP).
How do I do it?

Code'd
jorgess
 
Posts: 1
Joined: Fri Nov 29, 2013 9:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SORT using WHEN=GROUP

 

Re: SORT using WHEN=GROUP

Postby BillyBoyo » Sat Nov 30, 2013 2:24 am

Use IFTHEN=(WHEN=GROUP with KEYBEGIN= for the data. PUSH the identifier.

OUTFIL INCLUDE= for the identifier(s) you want.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post