Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
SyncSort Subtotals

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message

Active User

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

PostPosted: Wed Jan 16, 2013 12:33 am    Post subject: SyncSort Subtotals
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:
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,                                                 
       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             
                045:'RECORD COUNT',                             

The (partial) output is:
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    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 Insert System Runtime in HEADER In SY... Rick Ryan SYNCSORT 9 Tue May 26, 2020 9:01 pm
No new posts SYNCSORT in Z/VSE nithinkarthika SYNCSORT 24 Mon May 11, 2020 3:44 pm
No new posts Removing Hyphens and Dots using Syncsort PORYES SYNCSORT 8 Tue Apr 28, 2020 9:52 pm
No new posts Accumulating fields using syncsort Hemant L SYNCSORT 6 Fri Feb 07, 2020 2:55 am
No new posts Syncsort for field to field comparision Deepti_R SYNCSORT 3 Thu Nov 07, 2019 11:04 pm

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