Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us