Page 2 of 2

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

PostPosted: Mon Sep 10, 2012 10:54 pm
by skolusu
cuteshanthim wrote: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.


cuteshanthim,

You seem to have been misguided about LINES parm. Pay attention to the last detail under the explanation of "n"

LINES=n

Specifies the number of lines per page to be used for the reports produced for this OUTFIL group. DFSORT uses ANSI carriage control characters to control page ejects and the placement of the lines in your report, according to your specifications.

n
specifies the number of lines per page. The value for n must be between 1 and 255. However, n--or the default for n if LINES is not specified--must be greater than or equal to the number of lines needed for each of the following:

The HEADER1 lines

The TRAILER1 lines

The sum of all lines for HEADER2, TRAILER2, HEADER3s, TRAILER3s, and the data lines and blank lines produced from an input record.


You can find the same information here

http://publibz.boulder.ibm.com/cgi-bin/ ... 1ca60/3.15

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

PostPosted: Wed Sep 19, 2012 4:59 pm
by cuteshanthim
Thanks for your reply.

Header3 is displayed for whenever the sectioned break is happen.
But also, i want the header3 to be displayed for after each 55 lines.

Only we can display header2 for each 55 lines using LINES command.

Can you please help me...

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

PostPosted: Wed Sep 19, 2012 5:15 pm
by cuteshanthim
sorry for the inconvenience.

Header3 is displayed for whenever the sectioned break is happen.
But also, i want the header3 to be displayed for after each 55 lines.

Only we can display header2 for each 55 lines using LINES command.

Can you please help me...

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

PostPosted: Wed Sep 19, 2012 10:38 pm
by skolusu
cuteshanthim wrote:Only we can display header2 for each 55 lines using LINES command.
Can you please help me...


cuteshanthim,

You seem to have written your own sort product which does that. If you have spent time reading the link I gave you , you would have understood that the LINES=N applies to even header3.

Your control cards are a different story. You are actually splitting each record in your input file into 2 records. You are writing all space record for every record and you are adding your header3 and trailer3 on top of that. If you really need help you need to show us the sample input and desired output.

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

PostPosted: Sat Oct 13, 2012 2:52 pm
by cuteshanthim
Report layout given below:
 
         V.H.N. GIRLS HR SEC SCHOOL             page: 1     
              STUDENT MARK LIST                             
              CLASS: SSLC         SECTION: A               
                               MATHS     SCIENCE     TOTAL       
11111 ANUSHA                    70         82 *       152         
11112 HAJI                      71         82 *       153         
11113 SUBHA                     72         83 *       155         
11114 THENMOZHI                 72         82 *       154         
11115 NANDHINI                  74         73         147         
11116 VAISHALI                  72         82 *       154         
                             ------     ------      ------       
    SECTION   A   TOTAL         431        484         915
** INDICATES FIRST CLASS MARK IN BOTH MATHS &SCIENCE.

         V.H.N. GIRLS HR SEC SCHOOL             page:2     
              STUDENT MARK LIST                             
              CLASS: SSLC         SECTION: B                   
                               MATHS     SCIENCE     TOTAL         
11117 NITHYA                     80         65         145       
11118 MADHU                      72         82 *       154       
11119 AISHWARYA                  72         82 *       154       
11120 ADITHYA                    82 *       82         164       
11121 REKHA                      72         52         124       
11122 SOWMYA                     72         82 *       154       
11123 MANJUSHA                   72         62         134       
11124 ANANDHI                    82 *       82         164       
11125 SAYANI                     72         82 *       154       
11126 SAMEEKSHA                  62         82 *       144       
11127 SANDHYA                    72         62         134       
                             ------     ------      ------       
    SECTION   B   TOTAL         810        815         625       
** INDICATES FIRST CLASS MARK IN BOTH MATHS &SCIENCE.
     


Sort JCL:

                                 
//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=SHR,DSN=Input file                 
//SORTOUT  DD SYSOUT=T                                                 
//SYSIN    DD *                                                       
  SORT FIELDS=(2,9,A,11,1,A,12,5,A),FORMAT=CH                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY(65:C'  ',                           
        55:43,3,ZD,ADD,46,3,ZD,M10,LENGTH=3)),                         
        IFTHEN=(WHEN=(43,3,ZD,GT,80),OVERLAY(64:C'* ')),               
        IFTHEN=(WHEN=(46,3,ZD,GT,80),OVERLAY(64:C' *'))               
  OUTFIL REMOVECC,                                                     
  OUTREC=(/,2:12,5,8:17,20,45:43,3,ZD,49:64,1,56:46,3,ZD,60:65,1,     
          68:55,3,ZD,M10,LENGTH=3,132:X),                             
  SECTIONS=(2,9,11,1,SKIP=P,                                           
  HEADER3=(2:2,9,                                       
          35:'V.H.N. GIRLS HR SEC SCHOOL',                             
          105:'DATE: ',&DATE,121:'PAGE: ',&PAGE,/,                   
            35:'STUDENT MARK LIST',                                     
          106:'RUN: ',&DATE,121:&TIME,/,                               
          35:'CLASS: ',2,9,55:'SECTION: ',11,1,/,                     
          46:'MATHS',56:'SCIENCE',68:'TOTAL'),                         
  TRAILER3=(132:X,/,                                                   
           44:'------',55:'------',67:'------',2/,                     
           6:'SECTION  ',17:11,1,31:'TOTAL ',                         
           45:TOTAL=(43,03,ZD,M10,LENGTH=3),                           
           56:TOTAL=(46,03,ZD,M10,LENGTH=3),                           
           68:TOTAL=(55,03,ZD,M10,LENGTH=3),2/,                       
           /,2:'** INDICATES FIRST CLASS MARK IN BOTH MATHS &SCIENCE.',
           132:X))                                                     
//*                                 


in the above report, when the class and section changes (for each class and section), the new page with heading (header3) is displayed.

I have a requirement like this: If the no.of student in particular section exceeds 55, then also i need a break and new page with heading (header3) should be displayed....

Can you please help me out....

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

PostPosted: Sun Oct 14, 2012 2:38 am
by dick scherrer
Hello,

Is this a continuation of the same topic?

If you really need help you need to show us the sample input and desired output.