Previous Topic: DELETE StatementNext Topic: Basic Syntax


DISPLAY Statement

Purpose

Use the DISPLAY statement to present the information produced from your query one row at a time as a list of columns. The DISPLAY statement allows you to:

Operation

Each report page has a standard heading that includes the row number being viewed and the page within the row. When you specify a large number of columns to be displayed, CA Dataquery provides additional pages for each row. Column headings appear on the left side of the page with the data on the right side.

Before CA Dataquery sends the DISPLAY output to the terminal, it edits the data for errors relating to the DISPLAY format.

Caution Output from queries containing a DISPLAY statement cannot be printed on a system printer unless the query is executed in batch.

If CA Dataquery encounters an error in a column being edited, a special error code surrounded by asterisks is reported in place of the column. (See the CA Dataquery Message Reference Guide for a complete explanation of PRINT and DISPLAY error codes if you receive one of these messages.)

After executing a query containing a DISPLAY statement, you can page through the rows found.

Syntax Diagram

►►─ DISPLAY ─┬────────┬─┬─────────────────────────────┬───────────────────────►
             └─ FROM ─┘ └─ table-name ─┬────────────┬─┘
                                       └─ (status) ─┘

 ►─┬─ key-name ────┬─┬─────────────────────────────────┬──────────────────────►
   └─ column-name ─┘ └─ 'heading1 ─┬─────────────┬─ ' ─┘
                                   └─ /heading2 ─┘

 ►─┬──────────────────────────┬───────────────────────────────────────────────►◄
   └─ PICture 'edit-pattern' ─┘

Repeat parameters once for each key or column.

Caution To simplify discussion, important elements of the DISPLAY statement appear in the following separate sections.

Basic statement

Section Basic Syntax

For alternate output headings

Section Alternate Output Headings

For edit patterns

Section PICTURE Clause