View previous topic :: View next topic
|
Author |
Message |
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
Hi,
I have generated a report thru a sort card. I need to sum the fields
000033674
000000023
000000559
000000071
000000246
and print TOTAL:
I used the below code but its giving an error, the input file is a FBA file of LRECL = 80:
Code: |
SORT FIELDS=COPY
OUTFIL OUTREC=(1:1,30,32:32,10,49:42,10,64:52,10,77:3X),
TRAILER2=(/,15:'TOTAL # OF RECS:',
44:TOTAL(64,9,PD,EDIT=(IIIIIIIIT)))
|
Can anyone help me with this?
Thanks! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post some sample data and the error output. The "fields" posted do not match your sort control statements. |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
I need to add the fields in column 65-73 and write the total at the bottom.PFA screen shot of the output file.
I am getting SYSTEM COMPLETION CODE=0C7 REASON CODE=00000000 error while running the job. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Check your record layout/definition - what you have defined as PD. . . Of the attached browse of the input file, there is no packed decimal data (packed data does not display as 1-byte per digit). Try ZD (i'd look it up, but i've got to run and wanted to get you some feedback before stepping away - meetings are such fun. . .).
Your attachment has a blue that is nearly invisible - for using it in an attachment, you might want to change your terminal colors. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I'd prefer if they would just select all & copy then paste to notepad till they have everything ready.
Then just select all & copy then paste to the reply box.
After a couple of highliting and hitting the "code" button, it'll look great.
I hate attachments (they're ok for very large things) and i really hate .docs in them and I really despise those dang screen graphics..... |
|
Back to top |
|
|
|