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

186 lines
11 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="BLANKS (Blanks) keyword for display files" />
<meta name="abstract" content="This field-level keyword, when specified for a numeric, input-capable field, enables your program to distinguish when the field is blank and when the field is zero on the display. In either case, your program recognizes zeros." />
<meta name="description" content="This field-level keyword, when specified for a numeric, input-capable field, enables your program to distinguish when the field is blank and when the field is zero on the display. In either case, your program recognizes zeros." />
<meta name="DC.subject" content="BLANKS (Blanks) keyword" />
<meta name="keywords" content="BLANKS (Blanks) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.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="rzakcmstdfblank" />
<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>BLANKS (Blanks) keyword for display files</title>
</head>
<body id="rzakcmstdfblank"><a name="rzakcmstdfblank"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">BLANKS (Blanks) keyword for display files</h1>
<div><p>This field-level keyword, when specified for a numeric, input-capable
field, enables your program to distinguish when the field is blank and when
the field is zero on the display. In either case, your program recognizes
zeros.</p>
<div class="section"><p>The BLANKS keyword sets on the specified response indicator when
the field is blank on the display. After an input operation, your program
can test this indicator to determine that the field (whose program value is
zero) is actually blank on the display. The field can contain all blanks (hex
40) or all nulls (hex 00). It still appears blank to the display station user.
If the indicator is off, the field is zero on the display.</p>
<p>This keyword
is also valid for character fields, but there is generally no need to specify
it for them. Your program can test character fields directly to determine
what is on the display.</p>
<p>See the <a href="s36env.htm">System/36 environment considerations for display files</a> topic
for special considerations when you specify the BLANKS keyword in files that
are used in the System/36™ environment.</p>
<div class="p">The
format of the keyword is: <pre>BLANKS(response-indicator ['text'])</pre>
</div>
<p>The
response indicator associated with the BLANKS keyword should be unique within
the record. That is, the same response indicator should not be used with other
keywords, such as CHANGE, DUP, or VLDCMDKEY; with any of the keywords for
function keys; or with the BLANKS keyword on other fields in the same record.
This is because the <span class="keyword">i5/OS™</span> operating
system always turns the response indicator off if the field contains non-blank
characters on an input operation. The <span class="keyword">i5/OS</span> operating
system does this to make sure that when the field appears as all blanks, the
response indicator is set on, and that when it does not appear as all blanks,
the response indicator is set off.</p>
<p>The optional text is included on
the list generated at program compilation time to explain the intended use
of the indicator. This text has no function in the file or the program other
than as a comment. The single quotation marks are required. If you specify
more than 50 characters between the single quotation marks, the text is truncated
to 50 characters on the program list.</p>
<p>Option indicators are not valid
for this keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 1: Specify the BLANKS keyword</h4><p>The following
example shows how to specify the BLANKS keyword.</p>
<div class="note"><span class="notetitle">Note:</span> Examples 2, 3, and
4 in this topic, show some cases that restrict the BLANKS keyword.</div>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00030A QTY1 5Y 0B 5 2BLANKS(01 'ON=QTY1 IS ALL BLANKS')
00040A QTY2 5Y 0B 6 2BLANKS(02 'ON=QTY2 IS ALL BLANKS')
00050A QTY3 5Y 0B 7 2BLANKS(03 'ON=QTY3 IS ALL BLANKS')
A</pre>
<p>Three numeric fields (QTY1, QTY2, and
QTY3) are displayed. If the display station user types values into the fields
and presses the Enter key, the following situation occurs:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><thead align="left"><tr><th align="left" valign="bottom" width="33.33333333333333%" id="d0e64">Value as typed into fields</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e66">Value as passed to program</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e68">Condition of response indicator</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e64 ">100</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e66 ">00100</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e68 ">Off</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e64 ">0</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e66 ">00000</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e68 ">Off</td>
</tr>
<tr><td align="left" valign="top" width="33.33333333333333%" headers="d0e64 ">Blanks</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e66 ">00000</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e68 ">On</td>
</tr>
<tr><td colspan="3" align="left" valign="top" headers="d0e64 d0e66 d0e68 "><div class="note"><span class="notetitle">Note:</span> If the
display station user presses a Field Exit key or the Erase Input key, the
field appears blank because it contains nulls.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Restrict the BLANKS keyword</h4><p>In some cases, the BLANKS
keyword does not set the specified response indicator on but rather restricts
its function. Examples 2, 3, and 4 in this topic, illustrate these cases.</p>
<div class="note"><span class="notetitle">Note:</span> Other
cases occur when the field is a character field, but then it is unnecessary
to use the BLANKS keyword.</div>
</div>
<div class="example"><h4 class="sectiontitle">Example 2</h4> <p>In the following example, when an input/output
field contains all blanks (hex 40) or all nulls (hex 00) when displayed, and
certain keywords affecting the display of the field are also specified, the
response indicator is not set on.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A* When OVRATR is specified
00020A R REC1 PUTOVR
00030A FLD1 10 0B 2 2BLANKS(50) OVRATR
00040A 78 DSPATR(HI)
00050A* When PUTRETAIN is specified
00060A R REC2 PUTRETAIN OVERLAY
00070A FLD2 10 0B 2 2BLANKS(50)
00080A R REC3 OVERLAY
00090A FLD3 10 0B 2 2BLANKS(50)
A PUTRETAIN
A</pre>
<p>For all record formats in this example, response indicator
50 is set on as expected the first time the field is read by the program (if
the field appears blank on the display). However, after a subsequent display,
response indicator 50 is set on again <em>only if the display station user
again blanks the field</em>. If the workstation user does not again blank the
field, response indicator 50 is off.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 3</h4><p>Examples 2 and 4 concern cases when the
field is first displayed, then deleted.</p>
<p>In the following example, when
an input-capable field is overlapped by another field, causing the first field
to be deleted, the response indicator is not set on (even though the field
in the input buffer still contains all blanks or all nulls).</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R REC4 OVERLAY
00020A 15 FLDA 10 0B 2 2
00030A FLD4 10 0B 2 5BLANKS(50)
A</pre>
<p>In this example, if option indicator 15 is off when REC4
is first displayed, FLD4 is displayed and FLDA is not. When REC4 is read,
response indicator 50 is set on if FLD4 is blank. If option indicator 15 is
then set on when REC4 is displayed again, FLDA overlaps FLD4 and deletes it.
Response indicator 50 is then off when REC4 is read. (This occurs because
the <span class="keyword">i5/OS</span> operating system
turns it off when displaying the record format and does not turn it back on
for a field that is not on the display, even if the field contains blanks
or nulls from a previous I/O operation.)</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 4</h4><p>In the following example, after initial
display, an input/output field is not displayed again on a subsequent input/output
operation (even though the field in the input buffer still contains all blanks
or all nulls).</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R REC5 ERASEINP OVERLAY
00020A 20 FLD5 10 0B 2 2BLANKS(50)
00030A*
00040A R REC6 ERASEINP OVERLAY MDTOFF
00050A 20 FLD6 10 0B 2 2BLANKS(50) DSPATR(MDT)
A</pre>
<p>In this example, if option indicator 20 is on when REC5
or REC6 is first displayed, FLD5 or FLD6 is displayed. When REC5 or REC6 is
read, response indicator 50 is set on if FLD5 or FLD6 is blank. However, if
option indicator 20 is set off on a second display, FLD5 or FLD6 is not displayed.</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>
</body>
</html>