Edit pattern Mask in SUM fields



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

Edit pattern Mask in SUM fields

Postby fornanthakumar » Fri Jan 27, 2012 1:16 pm

Hi,

I need to sum up based on certain numeric fields and i just want to change the pattern of display using mask

Input;

12341000
12342050
12341040
12351000
12355050

output:
123440.90
123560.50

My SORT card is,

SORT FIELDS=(1,4,CH,A)
SUM FIELDS=(5,4,ZD) but when i tried
SUM FIELDS=(5,4,ZD,M14) -> IT says syntax error. i have even tried SUM FIELDS=(5,4,ZD,EDIT=(TT.TT))
Please help me out..
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Edit pattern Mask in SUM fields

Postby NicC » Fri Jan 27, 2012 5:13 pm

Are either of those options for SUM recorded in the manual? You cannot just make up syntax.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Edit pattern Mask in SUM fields

Postby skolusu » Fri Jan 27, 2012 9:57 pm

fornanthakumar,

You cannot reformat the summed fields on the SUM Fields statement. You need to use OUTREC or Reporting features to edit mask your summed field. Use the following DFSORT JCL which will give you the desired results.
//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//SORTIN   DD *                           
12341000                                 
12342050                                 
12341040                                 
12351000                                 
12355050                                 
//SORTOUT  DD SYSOUT=*                   
//SYSIN    DD *                           
  SORT FIELDS=(1,4,CH,A)                 
  SUM FIELDS=(5,4,ZD)                     
  OUTREC OVERLAY=(5:5,4,ZD,EDIT=(TT.TT)) 
//*   
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post