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

SyncSort Subtotals


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

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Wed Jan 16, 2013 12:33 am
Reply with quote

More SyncSort fun!

After RTFM'ing, I've gotten to a point where I need some advice. I've reformatted an input file into the layout I want using OUTREC. Now I want to add subtotals, but unlike the FM, I need 4 layers of subtotals, wach one totalling into the next one up and resetting on control breaks, etc.

Here's the easy part:
Code:
OUTREC FIELDS=(01:01,01,                   COMPANY NUMBER 
               02:02,02,                   STATE ID       
               04:04,03,                   COUNTY CODE     
               07:07,29,                   COUNTY NAME     
               36:36,04,                   CITY CODE       
               40:40,30,                   CITY NAME       
               70:80,13,                   HIGH ORDER PREM
               83:94,02,                   PREMIUM CENTS   
               85:48X,C' ')                FILLER         
OUTFIL NODETAIL,                                                 
      SECTIONS=(01,01,SKIP=1L,                                   
                02,02,SKIP=1L,                                   
                04,03,SKIP=2L,                                   
                36,04,SKIP=3L,                                   
       HEADER3=(01:'COMPANY: ',                                 
                10:01,01,                  COMPANY CODE         
                13:'STATE: ',                                   
                21:02,02,                  STATE ID             
                25:'COUNTY: ',                                   
                33:07,15,                  COUNTY NAME           
                49:'CITY: ',                                     
                55:40,25),                 CITY NAME             
      TRAILER3=(001:'SUBTOTAL:',                                 
                019:TOT=(70,15,ZD,EDIT=('I,III,III,III,IIT.TT')),
                045:'RECORD COUNT',                             
                058:COUNT))                                     


The (partial) output is:
Code:
COMPANY: 1  STATE:  17  COUNTY: ACADIA          CITY: Acadia Parish FD #8
SUBTOTAL:                       704.00 RECORD COUNT        2             
                                                                         
                                                                         
COMPANY: 1  STATE:  17  COUNTY: ALLEN           CITY: Oakdale           
SUBTOTAL:                       459.00 RECORD COUNT        2             
                                                                         
                                                                         
COMPANY: 1  STATE:  17  COUNTY: ASCENSION       CITY: Donaldsonville     
SUBTOTAL:                     1,849.20 RECORD COUNT        5             
                                                                         
                                                                         
                                                                         
COMPANY: 1  STATE:  17  COUNTY: ASCENSION       CITY: Gonzales           
SUBTOTAL:                       505.00 RECORD COUNT        2             


Very nice so far, except these all appear to be City breaks. The money subtotal for the city isn't rolling into a common bucket for the County, and then for the State, and finally for the company.

I know this something simple I've overlooked, but I'll be danged if I can figure out what. My money is that I haven't been specific enough with TRAILER3, but I'm not sure what to add to it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts getting subtotals for multiple sections SYNCSORT 4
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
Search our Forums:

Back to Top