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
 

 

Sum records thru SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sum records thru SYNCSORT
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

Site Director


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

PostPosted: Thu May 03, 2007 11:36 pm    Post subject:
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    Post subject: Re: Sum records thru SYNCSORT
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

Site Director


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

PostPosted: Thu May 03, 2007 11:57 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Fri May 04, 2007 1:48 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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