IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sum records thru SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu May 03, 2007 10:53 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu May 03, 2007 11:36 pm
Reply with quote

Hello,

Please post some sample data and the error output. The "fields" posted do not match your sort control statements.
Back to top
View user's profile Send private message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu May 03, 2007 11:45 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu May 03, 2007 11:57 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri May 04, 2007 1:48 am
Reply with quote

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..... icon_evil.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
No new posts Filter records where condition is in ... SYNCSORT 6
Search our Forums:


Back to Top