SUM can't group variable with the same value



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

SUM can't group variable with the same value

Postby tivrfoa » Tue Nov 06, 2012 11:20 pm

Hi friends,

I don't understand why "COMP" does not group. :(
Please, help me.

//*-------------------------------------------------------------------*
//SORT4     EXEC PGM=SORT
//*
//SYSOUT    DD SYSOUT=*
//*
//SORTIN    DD DSN=DST.BOOK.STORE.SS000111,DISP=SHR
//*
//SORTOUT   DD DSN=DST.BOOK.SUM3.SS000111,DISP=(NEW,CATLG),
//          DSORG=PS,AVGREC=K,
//          SPACE=(080,(100,100),RLSE)
//*
//SYSIN     DD *
   SORT FIELDS=(1,4,CH,A)
   SUM FIELDS=(7,4,ZD)
/*


SORTIN FILE:
0295
9900
BIOL 2350
BUSIN 2350
BUSIN 1925
COMP 3195
COMP 0360
COMP 1899
COMP 2199
COMP 2600
ENGL 1520
ENGL 0625
ENGL 0450
ENGL 1450
ENGL 0595

SORTOUT FILE:
0295
9900
BIOL 2350
BUSIN 4275
COMP 7653
COMP 2600
ENGL 4640
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time

Re: SUM can't group variable with the same value

 

Re: SUM can't group variable with the same value

Postby Pandora-Box » Tue Nov 06, 2012 11:58 pm

The issue is since sum of comp is greater than 10000 7,4 in sum couldnt accomodate to one record

These users thanked the author Pandora-Box for the post:
tivrfoa (Wed Nov 07, 2012 4:32 pm)
User avatar
Pandora-Box
 
Posts: 65
Joined: Fri Feb 10, 2012 8:30 pm
Location: Mars
Has thanked: 3 times
Been thanked: 6 times

Re: SUM can't group variable with the same value

Postby BillyBoyo » Wed Nov 07, 2012 1:11 am

Pandora-Box is correct. Did you get an ICE152I message in your sysout and a non-zero return-code?

These users thanked the author BillyBoyo for the post:
tivrfoa (Wed Nov 07, 2012 4:32 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: SUM can't group variable with the same value

Postby tivrfoa » Wed Nov 07, 2012 5:00 pm

Pandora-Box wrote:The issue is since sum of comp is greater than 10000 7,4 in sum couldnt accomodate to one record

Thanks a lot Pandora-Box. :D

So it was as "Sum Overflow". IBM's DFSORT tutorial explains how to avoid this:
http://publib.boulder.ibm.com/infocente ... ca5075.htm

So I needed to add 1 to the length and I used INREC to do this:
//SYSIN     DD *
   INREC FIELDS=(1,6,Z,7,4)
   SORT FIELDS=(1,4,CH,A)
   SUM FIELDS=(7,5,ZD)
/*


Is this the best way to avoid this to happen?
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time

Re: SUM can't group variable with the same value

Postby tivrfoa » Wed Nov 07, 2012 5:02 pm

BillyBoyo wrote:Pandora-Box is correct. Did you get an ICE152I message in your sysout and a non-zero return-code?

Hi Billy,
I didn't find ICE1521 ...
RC = 00, and it shows the message "WER049I SUM FIELD OVERFLOW"
tivrfoa
 
Posts: 83
Joined: Wed Aug 22, 2012 6:35 pm
Has thanked: 58 times
Been thanked: 0 time

Re: SUM can't group variable with the same value

Postby enrico-sorichetti » Wed Nov 07, 2012 5:05 pm

WER049I SUM FIELD OVERFLOW


the message tells that You are not using DFSORT but SYNCSORT

the topic should be moved to the SYNCSORT section :geek:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
tivrfoa (Wed Nov 07, 2012 5:26 pm)
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: SUM can't group variable with the same value

Postby BillyBoyo » Wed Nov 07, 2012 5:16 pm

OK. You need to get hold of SyncSort documentation. Not so much for this, but for the next thing you need.

Yes, that is the best way to do it - ensure that you understand what the Z is doing and how that helps you. On occasion you may need "even more space", so ensure that you are happy about how to extend a field by any number of positions, and when the field being extended is not the last.

These users thanked the author BillyBoyo for the post:
tivrfoa (Wed Nov 07, 2012 5:26 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post