SQL/MP Report Writer Guide

Using SQLCI and the Report Writer
HP NonStop SQL/MP Report Writer Guide527213-001
2-8
Setting Up Your Session Environment
In the preceding example, you can specify SET LAYOUT WINDOW TAB 60 to produce
the same result. You can use the TAB form of SET LAYOUT WINDOW at either the
standard prompt or the select-in-progress prompt. You must specify the print position
relative to the full output line, including the margin. The first print position is always the
same as position LEFT_MARGIN 0. For example, if you set LEFT_MARGIN to 5, SET
LAYOUT WINDOW TAB 5 moves the character at the left margin to the left edge of the
window.
At the select-in-progress prompt only, you can define a window by the column name or
column number of the left most select item you want to display. For example, to display
the fourth column of the select list, enter the following:
S> SET LAYOUT WINDOW COL 4;
Figure 2-7 illustrates the relation of the left edge of a window to the output line of a
report. At each numbered step, the headings and first row are displayed.
At (1), the following layout options are in effect:
The left margin is 5; five blank positions of the output line precede the detail line
content.
The right margin is 120; the output line ends at column 120. If the information in
the detail line does not fit on one line, the information continues on the next line at
the left margin.
The device width for the terminal is assumed to be 64.
WRAP is set OFF.
The default window begins at position TAB 1 (the first print position), which is in the
margin.
The first detail line begins with the department number field; the field is 7
characters wide, and the number is right justified.
At (2), the window is specified to begin at TAB 15.
At (3), the window is specified to begin at column EMPNUM.
At (4), the window is specified to begin at column FIRST_NAME.
Figure 2-6. Defining a Window for Report Output
VST0206.vsd
S> SET LAYOUT WINDOW EMPNUM;
S> LIST FIRST 1;
EMPNUM FIRST_NAME LAST_NAME
JOBCODE
23 ROGER
GREEN 1000
S>