Adding header in the report



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Adding header in the report

Postby vigneshts1 » Fri Dec 26, 2014 10:49 am

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.
vigneshts1
 
Posts: 6
Joined: Mon Dec 22, 2014 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Adding header in the report

Postby neo4u » Fri Dec 26, 2014 2:12 pm

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.
neo4u
 
Posts: 8
Joined: Sat Oct 02, 2010 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Adding header in the report

Postby vigneshts1 » Fri Dec 26, 2014 9:14 pm

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.
vigneshts1
 
Posts: 6
Joined: Mon Dec 22, 2014 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Adding header in the report

Postby vigneshts1 » Sat Dec 27, 2014 3:39 am

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.
vigneshts1
 
Posts: 6
Joined: Mon Dec 22, 2014 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Adding header in the report

Postby neo4u » Mon Dec 29, 2014 11:54 am

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
neo4u
 
Posts: 8
Joined: Sat Oct 02, 2010 5:52 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post