SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
W-3
Consideration—WINDOW
specifies the position of the column in the select list). column cannot be a detail
alias.
You can use this clause only at the select-in-progress prompt (S>).
If you specify a column that is not in the detail print list, the report writer ignores the
WINDOW command. If the column appears in the detail print list more than once,
its first occurrence is the one that prints at the left edge of the output device.
Consideration—WINDOW
If WINDOW is set to a column identifier (as opposed to a TAB position) when a
SELECT command terminates, the report writer resets WINDOW to TAB 1.
Examples—WINDOW
This example defines a report format for the rows specified in the SELECT
command at the beginning of the example. The WINDOW option of the SET
LAYOUT command specifies that only the rightmost portion of the report
(beginning at print position 40) should be displayed when the LIST command
executes.
>> SELECT EMPNUM, LAST_NAME, SALARY, SALARY * .05
+> FROM PERSNL.EMPLOYEE;
S> NAME COL 4 BONUS;
S> DETAIL "*", EMPNUM, LAST_NAME, SALARY, SALARY * 1.1 NAME
+> NEW_SALARY, BONUS;
S> SET LAYOUT WINDOW TAB 40;
S> LIST;
These SET LAYOUT commands use the WINDOW option to specify different
vertical segments of the report defined in the previous example. (You could use
any one in place of the previous SET LAYOUT command.) As in that example,
these must be preceded by an appropriate SELECT command and followed by a
LIST command to actually print a report.
S> SET LAYOUT WINDOW SALARY; Displays SALARY, NEW_SALARY, and
BONUS
S> SET LAYOUT WINDOW COL 2; Displays LAST_NAME, SALARY,
NEW_SALARY, and BONUS
S> SET LAYOUT WINDOW TAB 44; Displays BONUS (print position 44)