Now I want to do summation of these values. When I used sum fields=(1,15,zd), it is giving S0C7 error. Can anybody tell how to achive this in one or 2 steps?
//SYSIN DD *
INREC OVERLAY=(81:1,15,SFF,TO=ZD,LENGTH=11)
SORT FIELDS=(17,1,SFF,A),EQUALS --> I tested with 1 byte key at 17th position, you can change accordingly
SUM FIELDS=(81,11,ZD)
OUTFIL BUILD=(81,11,ZD,EDIT=(III,III,IIT.TTS),SIGNS=(,,,-))
/*
Above example will suppress leading zeros, if you don't want leading zeros suppressed, use EDIT=(TTT,TTT,TTT.TTS).
Escapa,
Unless I misunderstood your solution for 92nd position, you could have used TRAILER1 or HEADER1 without SECTIONS. Was this field added for section break.?
Unless I misunderstood your solution for 92nd position, you could have used TRAILER1 or HEADER1 without SECTIONS. Was this field added for section break.?
Yes you are right.. I added sections .. incase TS wanted to use key field there.. as it wasnt clearly mentioned...
You don't have to perform the conversion to ZD if you are using reporting feature TRAILER1 to get the TOTAL. You can use UFF, SFF formats directly on the TRAILER.