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

SyncSort Reports


IBM Mainframe Forums -> SYNCSORT
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: Mon Oct 29, 2012 7:45 pm
Reply with quote

New topic for SyncSort! (And not related to any of my previous posts).

I've been asked to generate a quick report from a rather large input file that sums on three fields, producing a header, five summary lines and a footer.

Getting the report formatted - and with correct totals - was a breeze. Now I need some help with a couple of "small" formatting issues:

1. The only lines to appear on the report are the ones show below - not the 367,000 file records that I cannot seem to suppress (is there some sort of a NODETL command?).

2. The lines should appear consecutively, with no gaps, i.e., the header on lines 1 & 2 and the trailer lines on 54+).

3. The total records processed should be formatted with commas to separate millions & thousands: 366,499 - not 366499. ANd it should be right-aligned with the other totals - I can force it with the starting position, if I know the total, but if it goes over or under the hundred thousand records, it is misaligned.

Here's where I'm at:

Code:
082012- BEGIN CONTROL TOTALS FOR MACD9731 DATABASE EXTRACT
         CORRECTION FILE                                                 
    (...366,499 unwanted detail records....)
MACD9731-0001 RECORDS PROCESSED     (CORRECTION FILE) ==>              366499
MACD9731-0002 EARNED AMOUNT         (CORRECTION FILE) ==>       57,822,094.85
MACD9731-0003 LOSSES PAID AMOUNT    (CORRECTION FILE) ==>       38,643,021.79
MACD9731-0004 RESERVES AMOUNT       (CORRECTION FILE) ==>      258,339,278.11
--------------------------------------------------------------------------   
082012- END CONTROL TOTALS FOR MACD9731 EXTRACT           


Here's excerpts of the pertinent code:
Code:
  SORT   FIELDS=(01,02,CH,A)

  OUTFIL HEADER1=(...),
        TRAILER1=(002:'MACD9731-0001 RECORDS PROCESSED',
                  038:'(CORRECTION FILE) ==>',         
                  063:COUNT15,/,                       
           
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 29, 2012 7:53 pm
Reply with quote

If you only want HEADERn and TRAILERn lines, use NODETAIL.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 29, 2012 7:59 pm
Reply with quote

If you look at the definition of COUNT15 you may see how to get your commas and how to get it to align due to being the same length as the other fields.
Back to top
View user's profile Send private message
socker_dad

Active User


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

PostPosted: Mon Oct 29, 2012 8:00 pm
Reply with quote

Dang it - I need a syncsort spellchecker...... icon_redface.gif



Still trying to squeeze it down to 9 sequential lines - I've tried the LINES command, but that doesn't seem to work.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 29, 2012 8:05 pm
Reply with quote

What you need is to indicate when you've edited your post :-) I kept looking, changing mine, then looking back and yours is different again...

Run with the NODETAIL. For the spacing after that, look at your documentation, use scissors and glue on the "interim" report.

Let us know.
Back to top
View user's profile Send private message
socker_dad

Active User


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

PostPosted: Mon Oct 29, 2012 8:14 pm
Reply with quote

Sorry Bill, I hate mispelling words. And I forgot to include my code.

NODETAIL worked great!

And I discovered that what you see in SYSOUT is NOT always what you get in a dataset. It turns out that I was actually getting the line spacing exactly as I wanted, but the SYSOUT on the JESLOG was displaying a lot of extra blank lines.

The last detail (and I have RTFM several times for this!) is formatting the record count in an edited format, with commas. I have tried both COUNT and COUNT15 (couldn't tell any difference between the two), but it will not permit an edit parameter.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 29, 2012 8:23 pm
Reply with quote

For DFSORT COUNT= allows an EDIT to be applied. If there is nothing similar in your manual, then perhaps a "workaround". If you include a SEQNO on the end of each record, you should find that the value from the final detail record is available on the trailer. That you should be able to EDIT. I can't test this on SyncSort, and don't need to on DFSORT :-)

My spell-checker is inbillt in the browser, only failes me when I ignor it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Oct 29, 2012 9:02 pm
Reply with quote

Hello,

Syncsort allows an EDIT.

This is working for a non-zerosuppressed record count:
Code:
OUTFIL REMOVECC,NODETAIL,                                   
       TRAILER1=('TOTAL NEGATIVE: ',COUNT=(M11,LENGTH=7))   


giving:
Code:
TOTAL NEGATIVE: 0017597
Back to top
View user's profile Send private message
socker_dad

Active User


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

PostPosted: Thu Nov 01, 2012 12:47 am
Reply with quote

That did the trick, Mr. Scherrer.

Thanks for all the help folks!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Nov 01, 2012 1:37 am
Reply with quote

Good to hear it worked for you - thanks for letting us know icon_smile.gif

d
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
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
No new posts JPM Reports for each DB2 V12 Function... DB2 0
Search our Forums:

Back to Top