Page 1 of 2

how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 1:41 pm
by cuteshanthim
For each 55 lines, the report header 2 is breaked through LINES = 55. But I want to break the header 3 for each 55 lines.... Can you help to resolve this....

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 2:26 pm
by BillyBoyo
Pleas show the Sort control cards that you are using.

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 2:31 pm
by NicC
I do not even understand the question so suggest you post sample input and output.

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 2:41 pm
by cuteshanthim
The following is the report layout.... i want all the headings for each 55 lines break.

160-22650          DEALER DISTRIBUTION SYSTEM       DATE: 09/08/12  PAGE:      1
JOB-PGM                SUMMARY REPORT                       RUN: 09/08/12  01:49:40   
                         REGION: 160       DISTRICT: 1 
                         MONTH: 03/2012                             
SERIES: ALL                                                                 
                                            NO                             NET     
                                           MATCH      MATCH      MONTHLY   
                                           COUNT      COUNT       SALES     
                                                                           
31110    DEALER1                       0             1              1     
                                                                           
31121    DEALER2                       0             1              1     
                                                                           
                                               ------        ------      ------     
    DISTRICT   161   TOTAL           0              2            2     
                                                                           
** INDICATES COMBINED PRIMARY AND COMPANION STORE(S).
                     
160-22650          DEALER DISTRIBUTION SYSTEM       DATE: 09/08/12  PAGE:      2
JOB-PGM               SUMMARY REPORT                      RUN: 09/08/12  01:49:40   
                        REGION: 160       DISTRICT: 3 
                        MONTH: 03/2012                             
SERIES: ALL                                                                 
                                            NO                             NET     
                                           MATCH      MATCH      MONTHLY   
                                           COUNT      COUNT       SALES     
                                                                           
29059    DEALER3                       0             1              1     
                                                                           
29085    DEALER4                       0             1              1     
                                                                           
                                               ------        ------      ------     
    DISTRICT   163   TOTAL           0              2            2     
 
                                                                           
** INDICATES COMBINED PRIMARY AND COMPANION STORE(S).     


The below is the sort card I am using....
//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=INPUT FILE,DISP=SHR         
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  SORT FIELDS=(2,3,A,5,1,A,12,5,A)),FORMAT=CH                               
INREC IFTHEN=(WHEN=(42,1,CH,EQ,C'C'),OVERLAY(65:C'**')),   
        IFTHEN=(WHEN=(42,1,CH,EQ,C' '),OVERLAY(65:C'  ')),           
        IFTHEN=(WHEN=(1,1,CH,NE,C' '),                               
        OVERLAY(55:43,4,ZD,ADD,47,4,ZD,M10,LENGTH=4))                 
  OUTFIL REMOVECC,                                         
  OUTREC=(/,2:12,5,8:65,2,11:17,25,45:43,4,ZD,56:47,4,ZD,             
         68:55,4,ZD,M10,LENGTH=4,132:X),                             
  SECTIONS=(2,3,5,1,SKIP=P,                                           
  HEADER3=(2:2,3,5:'-22650',                                         
          35:'DEALER DISTRIBUTION SYSTEM',             
          105:'DATE: ',&DATE,121:'PAGE: ',&PAGE,/,                   
          2:'JOB-PGM',                                         
          35:'SUMMARY REPORT',               
          106:'RUN: ',&DATE,121:&TIME,/,                             
          35:'REGION: ',2,3,65:'DISTRICT: ',5,1,/,                   
          35:'MONTH: ',6,2,44:'/',8,4,/,                             
          2:'SERIES: ALL',/,                                         
          46:'NO',69:'NET',/,                                         
          45:'MATCH',56:'MATCH',67:'MONTHLY',/,                       
          45:'COUNT',56:'COUNT',68:'SALES'),                         
  TRAILER3=(132:X,/,                                                   
           44:'------',55:'------',67:'------',2/,                   
           6:'DISTRICT ',17:2,2,19:5,1,31:'TOTAL ',                   
           45:TOTAL=(43,04,ZD,M10,LENGTH=4),                         
           56:TOTAL=(47,04,ZD,M10,LENGTH=4),                         
           68:TOTAL=(55,04,ZD,M10,LENGTH=4),2/,                       
           /,2:'** INDICATES COMBINED PRIMARY AND COMPANION STORE(S).',
           80:X))                                                     
//*

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 2:53 pm
by cuteshanthim
I have given all the headers in HEADER3 section because I want all the headers to be displayed in the report for the changes in Region and District. Now I want all the headers to be displayed in the report, when the line reaches 55. Can you please help me out.

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 3:45 pm
by BillyBoyo
I can't see LINES=. Try with LINES=55 and let us know.

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 4:02 pm
by cuteshanthim
LINES=55 options is applicable for header2 (page header). I want the break for each 55 lines in the report header (HEADER3).....If we give LINES=55 in the OUTFIL, then it will not impact the report since I have not used header2.

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 5:07 pm
by cuteshanthim
Any one give some solution....

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sat Sep 08, 2012 5:49 pm
by enrico-sorichetti
Any one give some solution....

why should we ? :evil:

do not solicit for answers

You must understand that ...
replying on a forum is

on voluntary base
on our own time
free of charge


therefore
there is no commitment on our side
there should be no expectation on Your side

Re: how to break header 3 for each 55 lines using sort

PostPosted: Sun Sep 09, 2012 1:22 am
by dick scherrer
Hello and welcome to the forum,

Any one give some solution....
Asking for more replies after only a few hours is rather inconsiderate.

Keep in mind that you get help for free here. If you were paying for support, you might expect something, but most pay for support sometimes takes a while also.

Also, consider that this is the weekemd and many are not online now.

If you are working on something you want this weekend, suggest you try a different approach where the current limitation does not apply. If not with sort, a program would be trivial, but you would have the answer quickly,