Displays aggregate information (DISPLAY Operator) Example


Scenario -Adds a header to the list file and displays rows statistics information.

INPUT - MATEPK.INPUT.PSFILE

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
001  PAWAN         MAINFRAME           JPM       AP        IN
002  SRINIVAS      TESTING             ORACLE    TG        IN
003  SRIDHAR       SAS                 CG        OR        US
004  VENKATESH     ABAP                CSC       CA        US
005  RAVI          HADOOP              CTS       FL        US
006  PRASAD        HR                  INFOSYS   MI        US
007  RAJA          TESTING             IBM       CA        US

JCL -

----+----1----+----2----+----3----+----4----+----5----+
//MATEPKDI JOB (123),'MATEPK',CLASS=A,MSGCLASS=A,
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//STEP01   EXEC PGM=ICETOOL 
//INDD     DD DSN=MATEPK.INPUT.PSFILE,DISP=SHR
//LISTDD   DD DSN=MATEPK.OUTPUT.PSFILED,
//            DISP=(NEW,CATLG,DELETE),VOLUME=SER=DEVHD4,
//            SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA,
//            DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//TOOLIN   DD *
   DISPLAY FROM(INDD) LIST(LISTDD) -
     TITLE('EMPLOYEE REPORT') -
     PAGE DATE TIME -
    HEADER('ENO') HEADER('NAME') HEADER('TECHNOLOGY') HEADER('COMPANY')-
     ON(1,3,CH)   ON(6,14,CH)    ON(20,19,CH)         ON(40,10,CH) -
     BLANK -
     COUNT('NUMBER OF RECORDS: ') EDCOUNT(U04)
/*
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=* 

OUTPUT - MATEPK.OUTPUT.PSFILED

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
EMPLOYEE REPORT        - 1 -        08/07/24        03:14:08

ENO   NAME             TECHNOLOGY            COMPANY
---   --------------   -------------------   ----------
001   PAWAN            MAINFRAME             JPM 
002   SRINIVAS         TESTING               ORACLE
003   SRIDHAR          SAS                   CG 
004   VENKATESH        ABAP                  CSC 
005   RAVI             HADOOP                CTS
006   PRASAD           HR                    INFOSYS
007   RAJA             TESTING               IBM

NUMBER OF RECORDS:     7

TOOLMSG (SDSF SPOOL) - Verify TOOLMSG for the return code of the submitted job.

DISPLAY TOOLMSG

Explaining Example -

  • INDD - Specifies the ddname for input file.
  • OUTDD - Specifies the ddname for output file.
  • TOOLIN DD * - Specifies the ICETOOL statements for DFSORT.
  • TOOLMSG - Specifies where to write the ICETOOL processing messages.
  • DFSMSG - Specifies where to write the DFSORT processing messages.
  • DISPLAY FROM(INDD) LIST(LISTDD) - Prints the report into LISTDD using INDD records.
  • TITLE('EMPLOYEE REPORT') - Places the title left justified.
  • PAGE DATE TIME - Prints page number, printed date and time on the same line where title printed.
  • HEADER('ENO') HEADER('NAME') HEADER('TECHNOLOGY') HEADER('COMPANY') - Prints the headers based on the ON parameter length and with three lines gap in between headers.
  • ON(1,3,CH) ON(6,14,CH) ON(20,19,CH) ON(40,10,CH) - Conditions for headers.
  • BLANK - Prints blank line.
  • COUNT('NUMBER OF RECORDS: ') EDCOUNT(U04) - Prints the count at the end.