Page 1 of 1

Adding header in the report

PostPosted: Fri Dec 26, 2014 10:49 am
by vigneshts1
Hi,

I want to add two headers in the report. I'm able to add a header1 before the detailed report produced. Meanwhile i want to second header in between the detailed report.
I got some SECTIONS=(1,27,SKIP=P) or SECTIONS=(1,27,SKIP=nL) option to generate the header in between the report.

Expected Report:
==============
                                                 PROGRESS REPORT
                                                    ALL/1 REPORT
--------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
--------------------------------------------------------------------------------
TOM               97             90
JANCY            98             80
NANCY           89             90
BOB               90             80
--------------------------------------------------------------------------------
TOTAL         374            340
--------------------------------------------------------------------------------
                                                   ALL/1 REPORT
-------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
-------------------------------------------------------------------------------
TOM               90             60
JANCY            91             90
NANCY           89             80
BOB               80             70
-------------------------------------------------------------------------------
TOTAL         350            300           
-------------------------------------------------------------------------------
 



I'm able to generate the report like this,


 
                                                                                      PROGRESS REPORT
                                                                                        ALL/1 REPORT
TOM               97             90
JANCY            98             80
NANCY           89             90
BOB               90             80
TOTAL         374            340
TOM               90             60
JANCY            91             90
NANCY           89             80
BOB               80             70
TOTAL         350            300           




Kindly help me to append second header in the report.

Thanks,
vs.

Re: Adding header in the report

PostPosted: Fri Dec 26, 2014 2:12 pm
by neo4u
vigneshts1 wrote:Hi,

I want to add two headers in the report. I'm able to add a header1 before the detailed report produced. Meanwhile i want to second header in between the detailed report.
I got some SECTIONS=(1,27,SKIP=P) or SECTIONS=(1,27,SKIP=nL) option to generate the header in between the report.

Expected Report:
==============
                                                 PROGRESS REPORT
                                                    ALL/1 REPORT
--------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
--------------------------------------------------------------------------------
TOM               97             90
JANCY            98             80
NANCY           89             90
BOB               90             80
--------------------------------------------------------------------------------
TOTAL         374            340
--------------------------------------------------------------------------------
                                                   ALL/1 REPORT
-------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
-------------------------------------------------------------------------------
TOM               90             60
JANCY            91             90
NANCY           89             80
BOB               80             70
-------------------------------------------------------------------------------
TOTAL         350            300           
-------------------------------------------------------------------------------
 



I'm able to generate the report like this,


 
                                                                                      PROGRESS REPORT
                                                                                        ALL/1 REPORT
TOM               97             90
JANCY            98             80
NANCY           89             90
BOB               90             80
TOTAL         374            340
TOM               90             60
JANCY            91             90
NANCY           89             80
BOB               80             70
TOTAL         350            300           




Kindly help me to append second header in the report.

Thanks,
vs.



Could you please post your sortcard. Meanwhile, try using HEADER2 along with ur current HEADER1 code!. HEADER1 appears only once, whereas HEADER2 appears for all the pages.

Re: Adding header in the report

PostPosted: Fri Dec 26, 2014 9:14 pm
by vigneshts1
Hi,

Thanks for your information. Please find the below code,
//STEP01 EXEC  PGM=SORT
//SORTIN DD    DSN=ABCD.XYZ.INPUT,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSOUT DD    SYSOUT=*
//RPT1   DD    DSN=ZZZ.XYZ.OUTPUT,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(0,1),RLSE),
//             DCB=(RECFM=FB,LRECL=152,BLKSIZE=0)
//SYSIN  DD    *
SORT FIELDS=COPY
OUTFIL FNAMES=RPT1,LINES=04,REMOVECC,SECTIONS=(1,30,SKIP=P),
    HEADER1=(30:'PROGRESS REPORT',63:DATE=(MD4-),2/,
             30:'ALL/1 REPORT'),
    HEADER2=(1:'NAME' 11:'ENGLISH', 20:'MATHS',2/,),
    HEADER3=(30:'PROGRESS REPORT',63:DATE=(MD4-),2/,
             30:'ALL/1 REPORT'),
    HEADER4=(1:'NAME' 11:'ENGLISH', 20:'MATHS',2/,),
OUTREC=(1:1,10,12,2,UFF,ADD,18,2,UFF,LENGTH=3,
                22,2,UFF,ADD,26,2,UFF,LENGTH=3)
/*


I tried with HEADER2 also,but the report is not populated as i expected. Header2 is getting populated here and there.But i want to populate header2 next to "ALL/1 REPORT" . After first total again i want to populate Header3 value ("PROGRESS REPORT") and Header4 value('NAME,ENGLISH,MATHS).

Kindly help me on this.

Thanks,
vs.

Re: Adding header in the report

PostPosted: Sat Dec 27, 2014 3:39 am
by vigneshts1
Hi,

Sorry for the wrong code place in the earlier mail.

I have made the changes in my code and could be able to generate the report like this.But i don't know how to populate "ALL/1 REPORT" second time and Hyphen(-) before the total population.I have a small correction,after title ("PROGRESS REPORT"), i want to give one blank line then want to populate "ALL/1 REPORT". I tried HEADER3 but it's not supporting and getting some error.

//STEP01 EXEC  PGM=SORT
//SORTIN DD    DSN=ABCD.XYZ.INPUT,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSOUT DD    SYSOUT=*
//RPT1   DD    DSN=ZZZ.XYZ.OUTPUT,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(0,1),RLSE),
//             DCB=(RECFM=FB,LRECL=152,BLKSIZE=0)
//SYSIN  DD    *
SORT FIELDS=COPY
OUTFIL FNAMES=RPT1,LINES=09,REMOVECC,
    HEADER1=(30:'PROGRESS REPORT',/,30:'ALL/1 REPORT',/),
   HEADER2=(1:'--------------------------------------------------',/,
                   1:'NAME' 11:'ENGLISH', 20:'MATHS',/,
                   1:---------------------------------------------------'),
OUTREC=(1:1,10,12,2,UFF,ADD,18,2,UFF,LENGTH=3,
                22,2,UFF,ADD,26,2,UFF,LENGTH=3)
/*



                                                PROGRESS REPORT
                                                    ALL/1 REPORT

--------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
--------------------------------------------------------------------------------
TOM               97             90
JANCY            98             80
NANCY           89             90
BOB               90             80
TOTAL         374            340
-------------------------------------------------------------------------------
NAME           ENGLISH     MATHS     
-------------------------------------------------------------------------------
TOM               90             60
JANCY            91             90
NANCY           89             80
BOB               80             70
TOTAL         350            300



Kindly someone help me on this.

Thanks,
vs.

Re: Adding header in the report

PostPosted: Mon Dec 29, 2014 11:54 am
by neo4u
Hi Vignesh,

It's not clear from you post what you actually need. Could you please post sample input and output! and, regarding the headers, try moving 'ALL/1 REPORT' to HEADER2, and include spaces in place of 'ALL/1 REPORT' in HEADER1.

Thanks,
Neo