In this topic, we described about the below sections -
Prints the values or characters of specified numeric or character fields in separate list data set. The fields are printed in columns in the same order in which they are specified.
DISPLAY can produce simple, tailored or sectioned reports. DISPLAY can also produce maximums, minimums, totals, averages and counts.
Required Operands: -
Specifies the input data set ddname. DD statement must supply for the ddname specified.
Specifies the list data set ddname. DD statement must supply for the ddname specified.
Specifies the field to be used for this operation. From 1 to 50 ON fields can be specified.
– (p,m,f) gives the position, length and format of a numeric or character field. A field must not extend beyond position 32752 or the end of the record.
– (p,m,f,formatting) gives the position, length and format of a numeric or character field.Specifies how the data is to be formatted for printing for this field. A field must not extend beyond position 32752 or the end of the record.
– VLEN is equivalent to ON(1,2,BI) for variable-length records, represents the record length for each record.
Optional Operands: -
TITLE, PAGE, DATE, DATENS, YDDD, YDDDNS, TIME and TIMENS –
Specifies the elements to appear in the title lines at the top of each page. Only specified elements appear in the order given.
Each title string can consist of up to three individual strings. A string can be 1 to 50 characters.
Specifies title strings are left-justified with respect to each other.
Specifies the title lines are only printed on the first page.
Suppresses carriage control characters.
Specifies one, two or three lines heading to be printed for the corresponding ON field. A heading string can be 1 to 50 characters. NONE can be used to suppress the heading for the corresponding ON field.
Suppresses the heading line.
Specifies the number of lines per page. n can be 10 to 999.
BLANK and PLUS -
Causes the column widths to be dynamically adjusted as needed. Suppresses leading zeros for numeric fields. BLANK causes a blank, rather than a + to be used for the positive sign.
TOTAL, MAXIMUM, MINIMUM, AVERAGE and COUNT –
Specifies the overall statistics to appear after the data columns for the report. Only the specified statistics appear in the order given. Each string can be 1 to 50 characters.
Specifies how the overall count is to be formatted for printing. The formatting items can be used are: mask, E'pattern', L'string', F'string', T'string', LZ and Udd.
Specifies a limit for the number of invalid decimal values. If n invalid decimal values are for an explanation of invalid decimal values.
Specifies the record format for a VSAM input data set (F or V).
Specifies the line length and LRECL for the list data set. n can be 121 to 8192. If the WIDTH specified is less than the calculated line length, ICETOOL terminates the operation. If WIDTH is not specified, the calculated line length is used as the line length and LRECL for the list data set.
If WIDTH(n) is not specified, allows the calculated line length to be up to 8192 bytes.
Specifies the break field to be used to divide the report into sections. Each set of sequential input records with the same break field value is treated as a section in the report. Each section starts on a new page with its own section title and section statistics.
Specifies a string to appear in the section title. The break field and string appear in the section title in the order provided. The string length can be 1 to 50 characters.
BTOTAL, BMAXIMUM, BMINIMUM, BAVERAGE and BCOUNT –
Specifies the section statistics to appear after the columns of data for each section. Only the specified statistics appear for each section in the order given. Each string can be 1 to 50 characters.
Specifies how the section count is to be formatted for printing.
Specifies the number of blanks used to indent the report. Overriding the default of 0. n can be from 0 to 50.
Specifies the number of blanks used between the columns of data. Overriding the default of 3. n can be from 0 to 50.
Specifies the number of blanks used between title elements. Overriding the default of 8. n can be from 0 to 50.
Places the statistics strings to the left of the first column of data.
Causes -0 to be treated as unsigned, that is, as +0.
Uses SDB for the list data set. Overrides installation value SDBMSG=NO.
Does not use SDB for the list data set. overrides installation value SDBMSG=YES.
Below example to print the employee number(ENO), employee name(ENAME), employee state (STATE) and employee country(COUNTRY).
//MTHUSRR JOB (123),'MTHUSR',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1), // NOTIFY=&SYSUID //* //STEP01 EXEC PGM=ICETOOL //INDD DD DSN=MTHUSR.INPUT.DATASET,DISP=SHR //OUTDD DD DSN=MTHUSR.OUTPUT.DATASET1, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA, // DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800) //TOOLIN DD * DISPLAY FROM(INDD) LIST(OUTDD) ON(1,19,CH) ON(50,20,CH) /* //TOOLMSG DD DSN=MTHUSR.OUTPUT.TOOLMSG1,DISP=SHR //DFSMSG DD SYSOUT=* //
TOOLMSG OUTPUT -
MTHUSR.OUTPUT.DATASET1 OUTPUT -
Explaining Solution: -
- INDD - Specifies the ddname for input dataset.
- OUTDD - Specifies the ddname for output dataset.
- TOOLIN DD * - Specifies the ICETOOL statements for DFSORT.
- TOOLMSG - Specifies ICETOOL message data set.
- DFSMSG - Specifies DFSORT message data set.
- DISPLAY FROM(INDD) LIST(OUTDD) ON(1,19,CH) ON(50,20,CH) - Prints the data from INDD in OUTDD based on ON condition specified.
It prints the first 20 characters and 20 characters from 50th position in the output dataset.