ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakc_5.4.0.1/rzakcmstzwindow.htm

276 lines
16 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="WINDOW (Window) keyword for display files" />
<meta name="abstract" content="Use this record-level keyword to specify that the record format you are defining will be displayed using a window." />
<meta name="description" content="Use this record-level keyword to specify that the record format you are defining will be displayed using a window." />
<meta name="DC.subject" content="WINDOW (Window) keyword, window, creating" />
<meta name="keywords" content="WINDOW (Window) keyword, window, creating" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstzusrrstd.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstoverla.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakcmstzwindow" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>WINDOW (Window) keyword for display files</title>
</head>
<body id="rzakcmstzwindow"><a name="rzakcmstzwindow"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">WINDOW (Window) keyword for display files</h1>
<div><p>Use this record-level keyword to specify that the record format
you are defining will be displayed using a window.</p>
<div class="section"><p>A window is information that overlays part of the display. A window
is typically smaller than the actual workstation display, and can be positioned
anywhere on the display.</p>
<div class="p">The WINDOW keyword has two
formats that can be used. These formats do the following tasks: <ul><li>Define a window by specifying the location and size of a window; this
is known as a window definition record.</li>
<li>Refer to a record format name where the window location and size have
been defined; this is known as a window-reference record.</li>
</ul>
</div>
<div class="p">The format for the keyword is specified as follows:
<pre>WINDOW(start-line | &amp;start-line-field start-position
| &amp;start-position-field window-lines window-positions
[*MSGLIN | *NOMSGLIN])
[*RSTCSR | *NORSTCSR])
<strong>or</strong>
WINDOW(*DFT window-lines window-position
[*MSGLIN | *NOMSGLIN]
[*RSTCSR | *NORSTCSR])</pre>
</div>
<p>Specify this format of the WINDOW
keyword to define a window. The record format you are defining is displayed
in this window. Up to 12 windows can be shown on the display at one time.
You can define more than 12 windows in DDS, but only 12 can be displayed at
the same time. However, if USRRSTDSP is specified, the number of windows is
unlimited. All fields defined in this record must fit within the window.</p>
<div class="p">The parameters specify the following items: <ul><li>The number or the name of a field containing the number of the line that
is to contain the upper-left corner of the window border. If a field name
is specified, the field must exist in the record format and the field must
be defined as a signed numeric (data type S) and program-to-system (usage
P) field with length no greater than 3.</li>
<li>The number or the name of a field containing the number of the position
that is to contain the upper-left corner of the window border. If a field
name is specified, the field must exist in the record format and the field
must be defined as a signed numeric (data type S) and program-to-system (usage
P) field with length no greater than 3.</li>
<li>The number of window-lines within the window. The window-lines can be
no more than the available lines for the display size minus 2. This is because
the upper and lower window borders each occupy one line. <p>The last window-line
in a window is used as the message line and cannot contain any fields. For
example, if a WINDOW keyword is coded that specifies 10 window-lines for the
window, only nine of those lines can contain fields; the 10th line is the
message line.</p>
</li>
<li>The number of window-positions within the window. The window-positions
can be no more than the available positions for the display size minus 4.
This is because both right and left borders need an attribute byte inside
the window. An attribute byte exists between the border character and the
available window positions. For DBCS-capable windows, the system might need
an additional 2 bytes on each side of the window for a shift-out character
and shift-in character for any underlying DBCS fields.</li>
<li>The MSGLIN parameter specifies if a window contains a message line. If
this parameter is not specified, the default is *MSGLIN. *NOMSGLIN moves the
message out of the window and places it at the bottom of the display or where
the MSGLOC keyword defines the location. The last usable line in the window
is reserved for error messages; no records are displayed there. If the error
message is longer than the line, it is truncated to fit.</li>
<li>The *RSTCSR parameter specifies if the user should be allowed limited
function when the cursor is outside of the window. When *NORSTCSR is specified
and the cursor is outside of the window, the user will be allowed to press
a function key and have it function as if the cursor were within the window.
When the user specifies *RSTCSR on a controller that supports enhanced interface
for nonprogrammable workstations, the user will be able to move the cursor
out of the window (except with a mouse). For other workstations, when the
user attempts to press a function key while the cursor is outside of the window,
the user will receive a beep and the cursor will be placed inside the window.
Control will not be returned to the application. *RSTCSR is the default.</li>
</ul>
</div>
<p>The special value, *DFT, specified in place of the start-line
and start-position parameters, indicates that the system will determine the
start line and start position of the window. The window is positioned relative
to the cursor location, similar to application help windows with variable
starting locations. More information about the rules the system uses to position
the window can be found in the <a href="../books/sc415715.pdf" target="_blank">Application Display Programming book</a><img src="wbpdf.gif" alt="Link to PDF" />.</p>
<p>The second
format for the WINDOW keyword is <samp class="codeph">WINDOW(record-format-name)</samp>.</p>
<p>Specify
this format of the WINDOW keyword to display the record format you are defining
in a window that is defined on another record format.</p>
<p>The parameter
specifies the record format name that has the window attributes specified.
The record format that uses this parameter is displayed in the window defined
on the referenced record.</p>
<p>The field locations specified within a record
format with the WINDOW keyword are relative to the first usable window location
in the upper-left corner of the window. The first usable window location is
on the first line below the upper border and two positions to the right of
the left border (an ending attribute byte occupies the first byte to the right
of the border).</p>
<p>When a window is displayed, any records currently on
the display are suspended if USRRSTDSP is not specified. The suspended records
can be visible around the sides of the window. Input is allowed only within
the active window. To remove the window from the display, a record can be
written to an underlying window or a non-window record must be overlaid on
the display.</p>
<p>The WINDOW keyword is not allowed on a record format that
has any one of the following keywords specified:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><tbody><tr><td valign="top" width="50%"><p>ALWROL<br />
ASSUME<br />
MNUBAR</p>
</td>
<td valign="top" width="50%"><p>PULLDOWN<br />
SFL<br />
USRDFN</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note"><span class="notetitle">Note:</span> The WINDOW keyword is allowed on a record with the SFLCTL keyword.
This allows subfiles to be displayed within a window.</div>
<p>WINDOW cannot
be specified for the record format specified by the PASSRCD keyword.</p>
<p>The
ERRSFL keyword is ignored for records that have the WINDOW keyword specified.</p>
<p>The
MSGLOC keyword is ignored for records that have the WINDOW keyword specified,
unless NOMSGLIN is specified.</p>
<p>If a record format has both a WINDOW and
WDWBORDER keyword specified, specify the start-line, start-position, window-lines,
and window-positions parameters on the WINDOW keyword. The WINDOW keyword
should not specify the record-format-name parameter.</p>
<p>Option indicators
are not valid for this keyword. However, display size condition names can
be used.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 1</h4><p>The following example shows how to specify
the WINDOW keyword to define a window.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R WINDOW1 WINDOW(4 20 9 30 *NORSTCSR)
A FIELD1 8A B 5 10
A FIELD2 10A B 6 10
A R WINDOW2 WINDOW(*DFT 9 30 *NOMSGLIN)
A</pre>
<div class="p">When the WINDOW1 record is displayed, the upper-left
corner of the window border is on line 4 position 20 of the display. The lower-right
corner of the border is located 10 lines lower than the upper border and 33
positions to the right of the left border. <ul><li>Lower border line = upper border line + window-lines + 1</li>
<li>Right border position = left border position + window-positions + 3</li>
</ul>
</div>
<div class="p">The FIELD1 field starts 2 lines lower than the upper border and
11 positions (the ending attribute byte for the border character has been
taken into account) to the right of the left border character (line 6, position
31 on the display). <ul><li>Actual field line = upper border line + line number of field</li>
<li>Actual field position = left border position + position of field + 1</li>
</ul>
</div>
<p>The FIELD2 field starts 6 lines lower than the upper border and
11 positions to the right of the left border (line 10, position 31 on the
display).</p>
<p>If the cursor is moved outside of the window, the function
keys will remain active.</p>
<p>When the WINDOW 2 record is displayed, the
upper-left corner of the window border is at the cursor position during run
time. The message line does not appear inside the window, it appears at the
bottom of the display.</p>
<p>If the cursor is moved outside of the window,
the function keys are inactive. If the user presses a function key, they will
receive a beep and the cursor will be place within the window.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 2</h4><p>The following example shows how to use
the WINDOW keyword to display multiple records in the same window.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R WINDOW1 WINDOW(&amp;LINE &amp;POS 9 30)
A USERID 8A O 2 10
A LINE 2S 0P
A POS 3S 0P
A
A R RECORD1 WINDOW(WINDOW1)
A OVERLAY
A FIELD1 5A B 7 2
A FIELD2 20A B 8 5
A
A R RECORD2 WINDOW(WINDOW1)
A FIELD3 10A B 2 2
A FIELD4 8A B 8 5
A FIELD4 8A B 8 5
A</pre>
<p>When the WINDOW1 record is displayed, the upper-left
corner of the border will be at the line and position numbers specified by
the LINE and POS fields. The lower-right corner of the border is located 10
lines lower than the upper border and 33 positions to the right of the left
border.</p>
<p>The USERID field starts 2 lines lower than the upper border
and 11 positions to the right of the left border character.</p>
<p>If RECORD1
(from the previous example) is displayed, it is placed within WINDOW1. Its
fields are positioned with respect to the upper-left corner of the window.
The fields from record WINDOW1 which were on the display remain because the
OVERLAY keyword was used on RECORD1 and the two records do not overlap.</p>
<p>If
RECORD2 (from the previous example) is displayed, it is also placed within
WINDOW1. Its fields are positioned with respect to the upper-left corner of
the window. Because the OVERLAY keyword was not used, the fields from records
WINDOW1 and RECORD1 are removed from the window.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 3</h4><p>The following example shows how to use
the WINDOW keyword with a subfile.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R SFLDATA SFL
A NAME 20A B 4 5
A RANK 10A B 4 27
A SERIAL 8A B 4 38
A
A R WINDOW1 SFLCTL(SFLDATA)
A WINDOW(8 25 10 50)
A SFLPAG(4)
A SFLSIZ(17)
A SFLDSP
A SFLDSPCTL
A 2 5'Full Name'
A 2 27'Rank'
A 2 38'Serial Nbr'
A</pre>
<p>When the WINDOW1 subfile control record is displayed,
it and the subfile are displayed in a window. The upper-left corner of the
window border is at line 8, position 25 on the display. The lower-right corner
of the border is located on line 19, position 78.</p>
<p>The fields from both
the subfile record and subfile control record are located with respect to
the first usable window position in the upper-left corner of the window. For
example, the NAME field in the SFLDATA record starts on the 4th window line
and the 5th window position, which is the same as the 12th line on the display
and the 31st position on the display.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzakcmstzusrrstd.htm" title="Use this record-level keyword on a window record to specify that the application will manage the display.">USRRSTDSP (User Restore Display) keyword for display files</a></div>
<div><a href="rzakcmstoverla.htm" title="Use this record-level keyword to specify that the record format that you are defining should appear on the display without the entire display being deleted first.">OVERLAY (Overlay) keyword for display files</a></div>
</div>
</div>
</body>
</html>