Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

overflow sum fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bsaxton

New User


Joined: 11 Sep 2008
Posts: 4
Location: mississippi

PostPosted: Thu Mar 29, 2012 9:29 pm    Post subject: overflow sum fields
Reply with quote

how to increase these sum fields to prevent overflow(duplicate) records?
SUM FIELDS=(41,5,PD,46,3,PD,49,5,PD,54,4,PD,60,5,PD)
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Mar 29, 2012 9:33 pm    Post subject: Reply to: SORT - Reformatting the input file into required f
Reply with quote

It is traditional to start a new topic for a new question. Although this might be the "shortest" tailgater in history...

One of us ought to be embarrassed, at least, but I haven't the remotest idea of what you are actually asking :-)

Can you re-state the problem, with example input and expected output. Recfm/lrecl of files involved. Information about how to get Saints tickets, etc, please?
Back to top
View user's profile Send private message
bsaxton

New User


Joined: 11 Sep 2008
Posts: 4
Location: mississippi

PostPosted: Thu Mar 29, 2012 9:39 pm    Post subject: overflow sum fields
Reply with quote

thanks..
problem i'm having with sorting a file and encountering duplicate records where too much money is present in the fields i am summing.
Organization . . . : PS
Record format . . . : FB
Record length . . . : 70
Block size . . . . : 6230

example of data
TB-GROSS-TAX
5/PS
(41-45)
9-----------
TOP OF DATA
18737.85
21414.61
64725.15
53728.34

waiting on Bill Parcells commitment before ticket purchase!
thanks
billy
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Thu Mar 29, 2012 9:48 pm    Post subject:
Reply with quote

bsaxton,

If SUM FIELDS is all you are doing, you can use SECTIONS/TRAILER3 function with TOT to expand field size while summing. Alternatively, you can expand the field size in advance and then do summing as well.

You would have received ICE152I message. Read explanation for that under Programmer Response:
If appropriate, redesign the records so that summary fields do not overflow, or, if possible, use INREC to increase the size of the summary fields (see z/OS DFSORT Application Programming Guide ), or specify the OVFLO=RC0, OVFLO=RC4, or OVFLO=RC16 run-time option to provide
a different return code for this situation.

Bill,
OP is referring to the situation where DFSort, upon overflow condition, sets RC4 (if OVFLO=RC4 installation is set) and creates/splits record in to multiples.

For better answer, please provide complete sort card.

Thanks,
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Mar 29, 2012 9:50 pm    Post subject: Reply to: overflow sum fields
Reply with quote

See to be far too many Bills to keep track of on this one...

Anyway, if there is ever too much money anywhere, feel free to contact me and I'll be happy to relieve you of the excess...

You are summing and the fields being summed-into are too small? I don't get the "duplicate" problem. Can you show all your SORT cards and the messages showing the failure?
Back to top
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Thu Mar 29, 2012 10:19 pm    Post subject:
Reply with quote

You can use the trailer option.

Code:
//STEP010 EXEC PGM=SORT                                   
//SYSPRINT  DD SYSOUT=*                                   
//SYSOUT    DD SYSOUT=*                                   
//SORTIN    DD *                                         
ArqËÌ*                                                   
ArqËÌ*                                                   
ArqËÌ*                                                   
ArqËÌ*                                                   
ArqËÌ*                                                   
BrqËÌ*                                                   
BrqËÌ*                                                   
BrqËÌ*                                                   
BrqËÌ*                                                   
BrqËÌ*                                                   
//SORTOUT   DD SYSOUT=*                                   
//SYSIN  DD  *                                           
 SORT FIELDS=(1,1,CH,A)                                   
 OUTFIL FNAMES=SORTOUT,REMOVECC,NODETAIL,                 
 SECTIONS=(1,1,                                           
 TRAILER3=(1:1,1,2:TOT=(2,5,PD,M10)))                     
/*                                               


Input Value in Zoned Decimal Format

Code:
A9998737.85
A9998737.85
A9998737.85
A9998737.85
A9998737.85
B9998737.85
B9998737.85
B9998737.85
B9998737.85
B9998737.85


Output:

Code:
A     4999368925
B     4999368925
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Mar 29, 2012 11:58 pm    Post subject:
Reply with quote

bsaxton,

For an example with SUM, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/3.20.2.5?SHELF=&DT=20110608113434
Back to top
View user's profile Send private message
bsaxton

New User


Joined: 11 Sep 2008
Posts: 4
Location: mississippi

PostPosted: Thu Apr 05, 2012 9:20 pm    Post subject: overflow sum fields sort
Reply with quote

thanks guys, did make some progress, but only on one of the fields, using this inrec
SORT FIELDS=(4,5,CH,A)
OMIT COND=(1,1,CH,NE,C'X')
INREC FIELDS=(1,40,41:X'00',42:41,6,48:46,24)
SUM FIELDS=(41,6,PD)

the field in question (tb-gross-tax) did not overflow, guess i need to use same method on the other fields!
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Apr 05, 2012 9:33 pm    Post subject: Reply to: overflow sum fields
Reply with quote

Yes, go for it!

Just a thought:

Code:
INREC FIELDS=(1,40,41:X'00',42:41,6,48:46,24)


You've made that more complicated than it need be by specifying columns at the same position in the INREC record as you already are at the time. You specify 41: when 41 is already the next position, same with 42: and 48:.

Code:
INREC FIELDS=(1,40,X'00',41,6,46,24)


However, if I take out the columns it becomes clear that you have built a couple of bytes twice. 41,6 and 46,24 have an overlap, bytes 46 and 47 being used twice. Did you want that?
Back to top
View user's profile Send private message
bsaxton

New User


Joined: 11 Sep 2008
Posts: 4
Location: mississippi

PostPosted: Thu Apr 05, 2012 10:32 pm    Post subject: overflow sum fields sort
Reply with quote

thanks.. this does make it easier.. and i was over stepping myself.. i've tried to do same with 2 other fields.. but looks like i may need more than just one zero.. how to insert two? x'0000'

this is my lateste try
INREC FIELDS=(1,40,X'00',41,6,X'00',47,4,X'00',51,6,57,13)

it works but getting overflow in field 47,4
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 05, 2012 10:35 pm    Post subject: Re: overflow sum fields sort
Reply with quote

bsaxton wrote:
thanks.. this does make it easier.. and i was over stepping myself.. i've tried to do same with 2 other fields.. but looks like i may need more than just one zero.. how to insert two? x'0000'

this is my lateste try
INREC FIELDS=(1,40,X'00',41,6,X'00',47,4,X'00',51,6,57,13)

it works but getting overflow in field 47,4


Quite Simple . You can use X'0000' or 2Z to insert 2 binary zeroes.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Pool Overflow in Mainframe ADABASE polymathtarun Java & MQSeries 4 Fri Jun 03, 2016 11:57 am
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am
No new posts Fields in File-Aid Browse menu screen boyti ko Compuware & Other Tools 5 Mon Apr 04, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us