DISPLAY command

The DISPLAY command displays an object derived from the content in an open window (such as query results), or an object saved in the repository or QMF catalog.

Syntax

To display an object:

>>-- DISPLAY -------------- ObjectName -----------------------------<<
             +- QUERY ----+            ( +- &&Variable = Value ----+
             +- FORM -----+
             +- PROC -----+
             +- TABLE ----+
             +- REPORT ---+
             +- DASHBOARD-+
             +- ANALYTICS-+             
Note:

You can open Analytics objects only from the QMF Catalog when you work with Db2 for z/OS database.

You can display indexes only if you are connected to Cloudant data sources.

To display an object derived from the content in the last open window:

>>-- DISPLAY -------------- ObjectName -----------------------------<<
             +- QUERY ----+
             +- FORM -----+
                     +-.MAIN-------+
                     +-.BREAK1-----+
                     +-.BREAK2-----+
                     +-.BREAK3-----+
                     +-.BREAK4-----+
                     +-.BREAK5-----+
                     +-.BREAK6-----+
                     +-.CALC-------+
                     +-.COLUMNS----+
                     +-.CONDITIONS-+
                     +-.DETAIL-----+
                     +-.FINAL------+
                     +-.OPTIONS----+
                     +-.PAGE-------+
             +- PROC -------+
             +- REPORT -----+

In the DISPLAY command, you can provide either the object name or the full object key of the object being displayed. If the procedure is stored in a QMF catalog, objects stored in the same catalog can be displayed using only their object name. For example, if the Q.STAFF query is stored in the same catalog as the procedure, you would use DISPLAY Q.STAFF to display the Q.STAFF query.

Note: The DISPLAY FORM.Section# command either activates a section of the form structure tree in the Classic Report editor if the form is opened, or it creates a new form if one does not yet exist.

If the procedure is stored in the repository, objects stored along side the procedure in the same repository folder can be displayed using only their object names. For example, if the Q.STAFF query is stored in the same repository folder as the procedure, then you could use DISPLAY Q.STAFF to display the Q.STAFF query.

However, if the object to be displayed is not stored in the procedure, nor in the same repository folder, then you must supply the full object key in the DISPLAY command. For example, DISPLAY "rsbi:/.workspaces/Traditional DBA View/Query1".
Note: An object's key can be viewed by clicking the object in the repository or workspace explorer and reviewing the key property value in the Properties view. If the key contains spaces, make sure it is enclosed by double quotes. To display the current object in visual report format, you must use the SHOW command. If you are displaying a visual dashboard, you must supply the full object key, since visual dashboards can not be stored in QMF catalogs.
Parameter Description
ObjectName The name or the full object key of the object to be displayed.
Note: For Cloudant queries, specify the full object key. For Cloudant indexes, specify either the full object key or the design document name and the index name separated by a period (.)
&&Variable If the object is a query or procedure, assigns a value to a variable in the query or procedure that is run. The variable name can be from 1 to 17 characters long and the value can be from 1 to 55 characters long. You can specify any number of variables and values on the DISPLAY command. If there are variables in the query or procedure that are not given values on the DISPLAY command, and are not global variables, the user will be prompted for the values. When you include variable assignments in a procedure, you must use two ampersands to prevent variable substitution before the procedure is run.

Examples

The following example displays the query that is stored in the QMF Catalog:
DISPLAY USER1.QUERY1

The following example displays the query that is stored in the repository:

DISPLAY "rsbi:/.workspaces/Traditional DBA View/Query1"
DISPLAY QUERY
DISPLAY FORM.MAIN
The following example displays a Cloudant query that is stored in a repository:
DISPLAY rsbi:/.workspaces/Default/Cloudant_query
The following examples display a Cloudant index that is stored in a repository:
DISPLAY "rsbi:/Cloudant Data Sources/Cloudant/exampleViews/
Secondary Indexes/exampleIndex"
DISPLAY INDEX exampleViews.exampleIndex