Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
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?
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
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.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
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?
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!
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
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?
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)
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
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.