Previous Topic: DELETE USERNext Topic: EDIT


DISPLAY

DISPLAY lists report files page-by-page on your terminal screen.

Subsequent DISPLAY commands keep the parameters set in previous DISPLAY commands unless overwritten.

Syntax:

►►─── DISplay ────────────────────────────────────────────────────────────────►

 ►─┬───────────────────────────────────────────────────────────────┬──────────►
   └─ REPort ─┬─────┬─ report-name ─┬────────────────────────────┬─┘
              └─ = ─┘               └─ USEr ─┬─────┬─ user-name ─┘
                                             └─ = ─┘

 ►─┬───────────┬──────────────────────────────────────────────────────────────►
   ├─ SUMmary ─┤
   ├─ DETail ──┤
   └─ ENTire ──┘

 ►─┬────────────────────────┬─────────────────────────────────────────────────►
   └─┬─ CURrent ─┬─ report ─┘
     └─ HELp ────┘

 ►─┬─────────┬────────────────────────────────────────────────────────────────►
   ├─ RIGht ─┤
   └─ LEFt ──┘

 ►─┬────────┬─────────────────────────────────────────────────────────────────►
   ├─ PAGe ─┤
   └─ LINe ─┘

 ►─┬───────────────────────────────┬──────────────────────────────────────────►
   ├─ FIRst ───────────────────────┤
   ├─ LASt ────────────────────────┤
   ├─ NEXt ────────────────────────┤
   ├─ PRIor ───────────────────────┤
   ├─ * ◄ ─────────────────────────┤
   ├─ * ─┬─ + ─┬─ page/line-count ─┤
   │     └─ - ─┘                   │
   └─ page/line-count ─────────────┘

 ►─┬────────────────────────┬─────────────────────────────────────────────────►
   └─ SPRead ─┬─ EVEn ────┬─┘
              ├─ MAXimum ─┤
              ├─ LEFt ────┤
              └─ nn ──────┘

 ►─┬─────────────────────────────────────────────────────────┬────────────────►
   └─┬─ COLumns ─┬─┬─────┬─ ( ─┬─ MAXimum ─────────────┬─ ) ─┘
     └─ COLS ────┘ └─ = ─┘     │ ┌──────── , ────────┐ │
                               └─▼- field-reference ─┴─┘

 ►─┬─────────────────────────────────────────────────────────────────┬────────►◄
   └─ FIXed ─┬─ COLumns ─┬─┬─────┬─ ( ─┬─ NONe ────────────────┬─ ) ─┘
             └─ COLS ────┘ └─ = ─┘     │ ┌──────── , ────────┐ │
                                       └─▼- field-reference ─┴─┘

Parameters:

REPORT= report-name

Specifies the saved report to be displayed.

USER= user-name

The user whose report dictionary contains the named report file.

SUMMARY

Requests output of summary report lines only.

DETAIL

Requests output of detail report lines only.

ENTIRE

Request output of both detail and summary lines.

CURRENT REPORT

Requests output of the last report displayed.

HELP REPORT

Requests output of the help report file built by the last HELP command.

RIGHT/LEFT

Specifies horizontal movement within the report file.

PAGE/LINE

Requests the report begin with a specific page or line:

FIRST

Outputs a page of report file data, beginning at page 1, line 1.

LAST

Outputs the last page of report file data.

NEXT

Outputs a page of report file data, beginning at the page or line number immediately following the current page or line number.

PRIOR

Outputs a page of report file data, beginning at the page or line number immediately preceding the current page or line number.

*

Outputs the current page of report file data, beginning at the first line of that page.

* + -

Outputs a page of report file data, beginning n pages or lines before (-) or after (+) the current page or line number. The asterisk (*) is a required character that explicitly references the current page or line.

page/line-count

Specifies the starting point of the output relative to the current page and line number: Page/line-count outputs a report page, beginning at the specified page or line number.

SPREAD EVEN/MAXIMUM/LEFT/nn

Specifies the space between the columns.

COLUMNS

Specifies the columns included in the output and, optionally, the order and width of those columns. Column specifications remain in effect until altered by a subsequent DISPLAY command.

FIXED COLUMNS

Specifies the columns, and their order, to remain on the screen when paging left and right. The columns specified with this parameter precede the columns specified in the COLUMNS= parameter. They remain fixed on the left side of the terminal screen.

Column specifications remain in effect until altered by a subsequent DISPLAY command, or a FIXED COLUMNS=NONE command.

Considerations:

Report files sometimes contain information that cannot be displayed:

Null character considerations

The null character is by default a period (.). You can override this by invoking the SET NULL command.

Note: For more information about the SET command see, SET, later in this chapter.

Data retrieved in SQL tables can contain null values. To display them, CA OLQ pads the entire length of the display field with the null character.

Examples:

The report file used for these examples has been built by executing the SELECT statement shown below:

select dept-name-0410, emp-last-name-0410, salary-amount-0420
 from department, employee, emposition
 where dept-employee and emp-emposition

DISPLAY

When the DISPLAY keyword is specified with no subsequent parameters, the first page of the report file is output as shown below. Specification of PAGE, LINE, PAGE FIRST, PAGE 1, LINE FIRST, or LINE 1 parameters produces the same results:

display OLQ 104009 04 DISPLAY RIGHT to see more report columns DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy DEPT-NAME-0410 EMP-LAST-NAME-0415 EXECUTIVE ADMINISTRATION HENDON EXECUTIVE ADMINISTRATION PAPAZEUS EXECUTIVE ADMINISTRATION PAPAZEUS EXECUTIVE ADMINISTRATION RUPEE EXECUTIVE ADMINISTRATION RUPEE EXECUTIVE ADMINISTRATION WILDER ACCOUNTING AND PAYROLL BLOOMER ACCOUNTING AND PAYROLL HUTTON ACCOUNTING AND PAYROLL JENSON ACCOUNTING AND PAYROLL KIMBALL ACCOUNTING AND PAYROLL KING ACCOUNTING AND PAYROLL NICEMAN PERSONNEL FITZHUGH PERSONNEL JOHNSON **** BUFFER OVERFLOW; DISPLAY LINES LOST ****

DISPLAY RIGHT

The DISPLAY RIGHT command displays the report right side of the report file, if the report is too wide to fit on the screen:

display right DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy EMP-LAST-NAME-0415 SALARY-AMOUNT-0420 HENDON 240000.00 PAPAZEUS 100000.00 PAPAZEUS 90000.00 RUPEE 80000.00 RUPEE 76000.00 WILDER 90000.00 BLOOMER 15000.00 HUTTON 44000.00 JENSON 82000.00 KIMBALL 45000.00 KING 14500.00 NICEMAN 14000.00 FITZHUGH 13000.00 JOHNSON 13500.00 - 1 -

DISPLAY COLUMNS

You can display whichever columns you want in any order with the COLS= parameter:

display cols=2,3 DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy EMP-LAST-NAME-0415 SALARY-AMOUNT-0420 HENDON 240000.00 PAPAZEUS 100000.00 PAPAZEUS 90000.00 RUPEE 80000.00 RUPEE 76000.00 WILDER 90000.00 BLOOMER 15000.00 HUTTON 44000.00 JENSON 82000.00 KIMBALL 45000.00 KING 14500.00 NICEMAN 14000.00 FITZHUGH 13000.00 JOHNSON 13500.00 - 1 -

SPREAD LEFT

You can use the SPREAD parameter to specify the distances between the columns. In this example the following report was modified with the SPREAD LEFT command:

DEPARTMENT/EMPLOYEE REPORT mm/dd/yy DEPT-ID-0410 EMP-ID-0415 EMP-ZIP-FIRST-FIVE-0415 6666 30 02198 6666 471 03256 6666 1 02312 6666 472 03145 2000 69 01675 2000 100 02176 2000 11 02176 2000 67 01239 2000 106 02176 2000 101 02176 1000 81 03458 1000 8683 10996 1000 51 02546 1000 91 06182 - 1 - SPREAD LEFT squished the columns to the left side of the screen: display spread left

DEPARTMENT/EMPLOYEE REPORT mm/dd/yy DEPT-ID-0410 EMP-ID-0415 EMP-ZIP-FIRST-FIVE-0415 6666 30 02198 6666 471 03256 6666 1 02312 6666 472 03145 2000 69 01675 2000 100 02176 2000 11 02176 2000 67 01239 2000 106 02176 2000 101 02176 1000 81 03458 1000 8683 10996 1000 51 02546 1000 91 06182 - 1 -

DISPLAY FIXED COLUMNS

This example illustrates the use of FIXED COLUMNS to keep a column on the screen while you page right and left to look at other columns:

display fixed columns = emp-last-name-0415 OLQ 104009 04 DISPLAY RIGHT to see more report columns DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy EMP-LAST-NAME-0415 DEPT-NAME-0410 HENDON EXECUTIVE ADMINISTRATION PAPAZEUS EXECUTIVE ADMINISTRATION PAPAZEUS EXECUTIVE ADMINISTRATION RUPEE EXECUTIVE ADMINISTRATION RUPEE EXECUTIVE ADMINISTRATION WILDER EXECUTIVE ADMINISTRATION BLOOMER ACCOUNTING AND PAYROLL HUTTON ACCOUNTING AND PAYROLL JENSON ACCOUNTING AND PAYROLL KIMBALL ACCOUNTING AND PAYROLL KING ACCOUNTING AND PAYROLL NICEMAN ACCOUNTING AND PAYROLL FITZHUGH PERSONNEL JOHNSON PERSONNEL **** BUFFER OVERFLOW; DISPLAY LINES LOST ****

Now if you page right, the EMP-LAST-NAME-0415 column remains on the

DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy EMP-LAST-NAME-0415 SALARY-AMOUNT-0420 HENDON 240000.00 PAPAZEUS 100000.00 PAPAZEUS 90000.00 RUPEE 80000.00 RUPEE 76000.00 WILDER 90000.00 BLOOMER 15000.00 HUTTON 44000.00 JENSON 82000.00 KIMBALL 45000.00 KING 14500.00 NICEMAN 14000.00 FITZHUGH 13000.00 JOHNSON 13500.00 - 1 -

Use DISPLAY SPREAD EVEN to put an equal number of spaces between the columns:

display spread even DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy EMP-LAST-NAME-0415 SALARY-AMOUNT-0420 HENDON 240000.00 PAPAZEUS 100000.00 PAPAZEUS 90000.00 RUPEE 80000.00 RUPEE 76000.00 WILDER 90000.00 BLOOMER 15000.00 HUTTON 44000.00 JENSON 82000.00 KIMBALL 45000.00 KING 14500.00 NICEMAN 14000.00 FITZHUGH 13000.00 JOHNSON 13500.00 - 1 -

Truncating columns

You can fit all report columns on the screen by truncating the values in one or more alphanumeric fields:

display col=1(15),2,3 DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy DEPT-NAME-0410 DEPT-ID-0410 SALARY-AMOUNT-0420 EXECUTIVE ADMIN 6666 240000.00 EXECUTIVE ADMIN 6666 100000.00 EXECUTIVE ADMIN 6666 90000.00 EXECUTIVE ADMIN 6666 80000.00 EXECUTIVE ADMIN 6666 76000.00 EXECUTIVE ADMIN 6666 90000.00 ACCOUNTING AND 2000 15000.00 ACCOUNTING AND 2000 44000.00 ACCOUNTING AND 2000 82000.00 ACCOUNTING AND 2000 45000.00 ACCOUNTING AND 2000 14500.00 ACCOUNTING AND 2000 14000.00 PERSONNEL 1000 13000.00 PERSONNEL 1000 13500.00

For more information:

Global Syntax