MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFSORT: page header on grand total page

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Sterling Price
Beginner


Joined: 30 Aug 2004
Posts: 19
Topics: 8

PostPosted: Fri Oct 01, 2004 10:15 am    Post subject: DFSORT: page header on grand total page Reply with quote

Sorry for the urgency. This is going in production today, and I was just informed it can't be processed by our report archival software because the grand total line produces a page feed but no new page header. Is there any way to do code this so the grand total has a header on its page (or alternately, doesn't generate a page feed?) Report code follows:
Code:

SORT FIELDS=(7,3,CH,A,12,2,CH,A,3,4,ZD,A,1,2,ZD,A)       
                                                         
OUTFILE FNAMES=SALESRPT,                                 
                                                         
LINES=90,                                                 
                                                         
HEADER2=(2:C'Run on ',DATE=(4MD/),C' at ',&TIME,         
         66:'W A L - M A R T  S T O R E S,  I N C.',     
         136:'TX264101US',160:&PAGE,2/,                   
         2:62,14,76:'GROSS SALES REPORT',                 
         136:'UPDATED ',DATE=(4MD/)),                     

 SECTIONS=(7,3,SKIP=P,                                       
           12,2,SKIP=2L,                                     
             HEADER3=(75:'For the Company: ',7,3,/,           
                      76:'For the State: ',12,2,/,/,         
                      32:'610',                               
                      54:'629',                               
                      76:'650',                               
                      98:'655',                               
                     120:'663',                               
                     142:'925',                               
                     161:'Totals',/,                         
                      32:'---',                               
                      54:'---',                               
                      76:'---',                               
                      98:'---',                               
                    120:'---',                           
                    142:'---',                           
                    161:'------'),                       
          PAGEHEAD,                                     
          TRAILER3=(18:'------------------',             
                    40:'------------------',             
                    62:'------------------',             
                    84:'------------------',             
                   106:'------------------',             
                   128:'------------------',             
                   150:'------------------',/,           
                     1:'STATE ',12,2,' TOTAL:',         
                    18:TOTAL=(20,6,PD,M5,LENGTH=18),     
                    40:TOTAL=(26,6,PD,M5,LENGTH=18),     
                    62:TOTAL=(32,6,PD,M5,LENGTH=18),     
                    84:TOTAL=(38,6,PD,M5,LENGTH=18),     
                     106:TOTAL=(44,6,PD,M5,LENGTH=18),       
                     128:TOTAL=(50,6,PD,M5,LENGTH=18),       
                     150:TOTAL=(56,6,PD,M5,LENGTH=18)),     
                                                             
            4,4,SKIP=1L,                                     
            TRAILER3=(20:'----------------',                 
                      42:'----------------',                 
                      64:'----------------',                 
                      86:'----------------',                 
                     108:'----------------',                 
                     130:'----------------',                 
                     152:'----------------',/,               
                       1:'STORE ',3,4,' TOTAL:',             
                      20:TOTAL=(20,6,PD,M5,LENGTH=16),       
                      42:TOTAL=(26,6,PD,M5,LENGTH=16),       
                      64:TOTAL=(32,6,PD,M5,LENGTH=16),       
                     86:TOTAL=(38,6,PD,M5,LENGTH=16),     
                    108:TOTAL=(44,6,PD,M5,LENGTH=16),     
                    130:TOTAL=(50,6,PD,M5,LENGTH=16),     
                    152:TOTAL=(56,6,PD,M5,LENGTH=16))),   
                                                           
           TRAILER1=(17:'-------------------',             
                     39:'-------------------',             
                     61:'-------------------',             
                     83:'-------------------',             
                    105:'-------------------',             
                    127:'-------------------',             
                    149:'-------------------',/,           
                      1:'GRAND TOTAL:',                   
                     16:SUBTOTAL=(20,6,PD,M5,LENGTH=20),   
                     38:SUBTOTAL=(26,6,PD,M5,LENGTH=20),   
                     60:SUBTOTAL=(32,6,PD,M5,LENGTH=20),   

                     82:SUBTOTAL=(38,6,PD,M5,LENGTH=20),       
                    104:SUBTOTAL=(44,6,PD,M5,LENGTH=20),       
                    126:SUBTOTAL=(50,6,PD,M5,LENGTH=20),       
                    148:SUBTOTAL=(56,6,PD,M5,LENGTH=20)),     
                                                               
 OUTREC=(1:1,2,                                               
         3:C'-',                                               
         4:3,4,                                               
        20:20,6,PD,M5,                                         
        42:26,6,PD,M5,                                         
        64:32,6,PD,M5,                                         
        86:38,6,PD,M5,                                         
       108:44,6,PD,M5,                                         
       130:50,6,PD,M5,                                         
       152:56,6,PD,M5,                                         
       174:26C' ')                                             
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Oct 01, 2004 11:16 am    Post subject: Reply with quote

Not sure what you want as the "header" for the grand total, but whatever it is, you can just add it at the beginning of TRAILER1, like this:

Code:

  TRAILER1=('header lines',/,
          'trailer lines')


For example, if you wanted the HEADER2 lines at the top of the page for the grand total, you could change TRAILER1 to:

Code:

 TRAILER1=(2:C'Run on ',DATE=(4MD/),C' at ',&TIME,
          66:'W A L - M A R T  S T O R E S,  I N C.',
          136:'TX264101US',160:&PAGE,2/,
          2:62,14,76:'GROSS SALES REPORT',
          136:'UPDATED ',DATE=(4MD/),/,
                      17:'-------------------',
                      39:'-------------------',
                      61:'-------------------',
                      83:'-------------------',
                     105:'-------------------',
                     127:'-------------------',
                     149:'-------------------',/,
                       1:'GRAND TOTAL:',
                      16:SUBTOTAL=(20,6,PD,M5,LENGTH=20),
                      38:SUBTOTAL=(26,6,PD,M5,LENGTH=20),
                      60:SUBTOTAL=(32,6,PD,M5,LENGTH=20),

                      82:SUBTOTAL=(38,6,PD,M5,LENGTH=20),
                     104:SUBTOTAL=(44,6,PD,M5,LENGTH=20),
                     126:SUBTOTAL=(50,6,PD,M5,LENGTH=20),
                     148:SUBTOTAL=(56,6,PD,M5,LENGTH=20)),


If that doesn't help, then please explain in more detail what you want to do.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sterling Price
Beginner


Joined: 30 Aug 2004
Posts: 19
Topics: 8

PostPosted: Fri Oct 01, 2004 11:22 am    Post subject: Reply with quote

Thank you! Do you happen to know if I need to move the grand total inside the "sections" brackets to do that? For some reason I have it in my head that trailer2 can only exist inside the sections. Would that still print a grand total only at the end of the report, and not at every section break?
Back to top
View user's profile Send private message
Sterling Price
Beginner


Joined: 30 Aug 2004
Posts: 19
Topics: 8

PostPosted: Fri Oct 01, 2004 11:32 am    Post subject: Reply with quote

Ah, now I see. Thanks.

(There is a report ID that must be in a certain position on the report on every page, or that page won't get defined correctly in our report archival software).

Thanks again! Saved my bacon, you did.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Oct 01, 2004 11:44 am    Post subject: Reply with quote

Glad to help.

Quote:
For some reason I have it in my head that trailer2 can only exist inside the sections


To clarify, only TRAILER3 can be specified within SECTIONS. TRAILER3 is the sections trailer that prints at the end of every section. TRAILER2 is the page trailer that prints at the end of every page. TRAILER1 is the report trailer that prints at the end of the report.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group