>>-DISPLAY----------------------------------------------------->< |
DISPLAY is an ISQL display command that can only be used in a routine. When encountered, DISPLAY causes its associated SELECT statement results to be displayed at your display terminal.
Any ISQL display commands placed in the routine after the associated SELECT statement and before the DISPLAY command affect the display at the terminal. You can, in addition, format the display or print the query result by typing ISQL display commands from the keyboard after the query result is displayed, or from the routine after the display is ended and before the END statement that is associated with the SELECT statement whose results are being displayed. To end the display of the query result initiated by the DISPLAY command and to return to the routine, type the ISQL END command from the keyboard.
In the following routine, you select all the rows from the DEPARTMENT table, specify the format commands to be performed on the rows, and display the formatted results on the display terminal. You must type end to end the display.
select * from department format separator ' | ' format ttitle 'departments' display end
To get the same result as the above routine, you can type these lines in a routine:
select * from department display end
to see the DEPARTMENT table. Next, type these commands from the keyboard:
format separator ' | ' format ttitle 'departments'
and you see the DEPARTMENT table with column separators and a title just like the first example.