Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
After SUM FIELDS, i am still getting duplicates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 2:50 pm    Post subject: After SUM FIELDS, i am still getting duplicates
Reply with quote

Hi Guys,
I am using a sort to sum up the Units and Amounts per Dept, Class Item and Location-id. when i do this,i still find few records(duplicates) creeping in instead of summing up. If i use the SUM FIELDS=NONE, using the same keys, they are getting eliminated(getting unique records per Dept,class,item,loc)

SORT FIELDS=(Dept,Class,Item,Location-id)
SUM FIELDS=(21,4,BI,25,4,BI)

//*they are not being summed up.Atleast one record is being left out *//

Kindly Help. Many thanks in advance.
Vijay
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Jul 04, 2008 3:09 pm    Post subject:
Reply with quote

teevijay

when u mention
SUM FIELDS=(21,4,BI,25,4,BI)

check if the sum total is exceeding the length 4, if so the SORT will wont sum those records!!
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 3:17 pm    Post subject: Reply to: After SUM FIELDS, i am still getting duplicates
Reply with quote

No KrisPrems,
The Units and Amount Numbers are very small Eg : 1.25 Etc
More over its actually (Sorry for my mistake)

SUM FIELDS=(14,8,BI,22,8,BI)

Hence it should not be a problem i guess.

Thanks.
Vijay
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Jul 04, 2008 4:52 pm    Post subject:
Reply with quote

check the below example at adjust asper ur need...
Code:
//****************************************************
//S1       EXEC  PGM=ICEMAN                           
//SYSOUT   DD  SYSOUT=*                               
//SORTIN   DD *                                       
123  M  CS 64858                                     
234  D  DB 45645                                     
434  D  CS 64858                                     
/*                                                   
//SORTOUT  DD SYSOUT=*                               
//SYSIN    DD    *                                   
  SORT FIELDS=(9,2,CH,A)                             
  OUTFIL NODETAIL,                                   
    SECTIONS=(9,2,                                   
      TRAILER3=(1,11,12:TOT=(12,5,ZD,EDIT=(TTTTTT))))
/*                                                   


If this still doesnt work out, u need to show the sample i/p and your SYSOUT details as well.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 5:07 pm    Post subject: Reply to: After SUM FIELDS, i am still getting duplicates
Reply with quote

Here is what i try to do.
Instead of getting a unique record with summed up values, i am still left with Dup records for few Dept-Class-Item-Loc

//STEP05 EXEC SORTD
//SORTIN DD DSN=TEST.EXTRACT.SRT.IN,DISP=SHR
//SORTOUT DD DSN=TEST.EXTRACT.SRT.SUM,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(800,200),RLSE),
// DCB=*.SORTIN
//SYSIN DD *
SORT FIELDS=(1,4,BI,A,5,2,BI,A,7,2,BI,A,9,2,BI,A,11,2,BI,A)
SUM FIELDS=(14,8,BI,22,8,BI)
/*

Hope this helps.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 5:07 pm    Post subject: Reply to: After SUM FIELDS, i am still getting duplicates
Reply with quote

Here is what i try to do.
Instead of getting a unique record with summed up values, i am still left with Dup records for few Dept-Class-Item-Loc

//STEP05 EXEC SORTD
//SORTIN DD DSN=TEST.EXTRACT.SRT.IN,DISP=SHR
//SORTOUT DD DSN=TEST.EXTRACT.SRT.SUM,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(800,200),RLSE),
// DCB=*.SORTIN
//SYSIN DD *
SORT FIELDS=(1,4,BI,A,5,2,BI,A,7,2,BI,A,9,2,BI,A,11,2,BI,A)
SUM FIELDS=(14,8,BI,22,8,BI)
/*

Hope this helps.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Jul 04, 2008 5:19 pm    Post subject:
Reply with quote

Quote:
If this still doesnt work out, u need to show the sample i/p and your SYSOUT details as well.


i want the SYSOUT details as well as the sample i/p and op that u r expecting and sample o/p that u r getting!!
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 5:30 pm    Post subject:
Reply with quote

Here it is...

SORT FIELDS=(1,4,BI,A,5,2,BI,A,7,2,BI,A,9,2,BI,A,11,2,BI,A)
SUM FIELDS=(14,8,BI,22,8,BI)
WER276B SYSDIAG= 865757, 1022951, 1022951, 1347768
WER164B 24,612K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 24,564K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 29; BLKSIZE= 27985
WER110I SORTOUT : RECFM=FB ; LRECL= 29; BLKSIZE= 27985
WER410B 23,584K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 23,584K BYTES USED
WER036B G=490220,B=1835,BIAS=98
WER045C END SORT PHASE
WER055I INSERT 0, DELETE 0
WER418I DATASPACE(S) AND/OR ZSPACE USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER049I SUM FIELD OVERFLOW
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=34,UNIT=3390,DEV=D410,CHP=(8191829283938494,2),VOL=T
WER416B SORTOUT : EXCP'S=156,UNIT=3390,DEV=D417,CHP=(8191829283938494,2),VOL=
WER416B TOTAL OF 190 EXCP'S ISSUED FOR SORTING
WER246I FILESIZE 476,622,772 BYTES
WER054I RCD IN 16435268, OUT 16435268
WER072I NOEQUALS IN EFFECT
WER169I RELEASE 1.2 BATCH 0427 TPF LEVEL .3
WER052I END SYNCSORT - A5104874,STEP05,SORT,DIAG=FD00,FBC5,C03B,285D,A5D7,49CA
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Jul 04, 2008 5:56 pm    Post subject:
Reply with quote

thanks for posting the spool details...
1. WER**** shows that u r using SYNCSORT not DFSORT( so you should have posted your question in JCL forum rather than DFSORT forum)
2. you need to provide
Quote:
the sample i/p and op that u r expecting and sample o/p that u r getting
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Fri Jul 04, 2008 6:56 pm    Post subject:
Reply with quote

Thanks Krisprems,
i think i found the problem.

Quote:
WER049I SUM FIELD OVERFLOW


Regards,
Vijay
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us