100 lines
6.2 KiB
HTML
100 lines
6.2 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="task" />
|
||
|
<meta name="DC.Title" content="Programming for the Dup key" />
|
||
|
<meta name="abstract" content="Read this topic to learn the procedure of duplicating entire fields." />
|
||
|
<meta name="description" content="Read this topic to learn the procedure of duplicating entire fields." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakcmstdfdup.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="rzakcmstdfdupprogramming" />
|
||
|
<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>Programming for the Dup key</title>
|
||
|
</head>
|
||
|
<body id="rzakcmstdfdupprogramming"><a name="rzakcmstdfdupprogramming"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Programming for the Dup key</h1>
|
||
|
<div><p>Read this topic to learn the procedure of duplicating entire fields.</p>
|
||
|
<div class="section"><p>When you press
|
||
|
the Dup key, the <span class="keyword">i5/OS™</span> operating system
|
||
|
handles the field as follows:</p>
|
||
|
<ul><li>If the field is a character field, the data displayed in the field is
|
||
|
returned to your program as is. A hex 1C is placed at the cursor position
|
||
|
and in the remaining field positions to the right. (Hex 1C appears as an over-scored
|
||
|
asterisk on the display.) The response indicator, if specified, is set on.</li>
|
||
|
<li>If the field is a numeric field and you specify a response indicator,
|
||
|
a hex F0 is placed at the cursor position and in the remaining field positions.
|
||
|
The response indicator is set on and returned to your program. If a response
|
||
|
indicator is not specified, hex 1Cs are returned to your program.</li>
|
||
|
</ul>
|
||
|
<p>In your program, you can duplicate entire fields (either character
|
||
|
or numeric) with the following procedure:</p>
|
||
|
</div>
|
||
|
<ol><li class="stepexpand"><span>Specify two fields for each input-capable field on
|
||
|
the display in DDS.</span><ol type="a"><li class="substepexpand"><span>Specify one field as an input-capable field. For this field,
|
||
|
specify DUP with a response indicator. </span> <p>You might want to specify
|
||
|
DUP with an option indicator that is off on the first display of the field.
|
||
|
This prevents the workstation user from using the Dup key when the field is
|
||
|
first displayed.</p>
|
||
|
</li>
|
||
|
<li class="substepexpand"><span>Specify the other field as a hidden field (H in position 38).</span></li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>On the first output operation, set off an option indicator for
|
||
|
DUP.</span> <p>This prevents the workstation user from using the Dup key.</p>
|
||
|
</li>
|
||
|
<li class="stepexpand" id="rzakcmstdfdupprogramming__dfduphidden"><a name="rzakcmstdfdupprogramming__dfduphidden"><!-- --></a><span>On the first input operation, move the input-capable
|
||
|
field to the hidden field.</span> <p>This saves the typed value for later
|
||
|
use.</p>
|
||
|
</li>
|
||
|
<li class="stepexpand" id="rzakcmstdfdupprogramming__dfdsubsequent"><a name="rzakcmstdfdupprogramming__dfdsubsequent"><!-- --></a><span>On each subsequent output operation, set the
|
||
|
option indicator on for the DUP keyword. </span> <p> This allows the workstation
|
||
|
user to use the Dup key.</p>
|
||
|
</li>
|
||
|
<li class="stepexpand" id="rzakcmstdfdupprogramming__dfdoperation"><a name="rzakcmstdfdupprogramming__dfdoperation"><!-- --></a><span>On each subsequent input operation, test the
|
||
|
response indicator specified with DUP. If the response indicator is off, the
|
||
|
input data should be moved to the hidden field. If the response indicator
|
||
|
is on, you can use the existing value in the hidden field.</span> <div class="note"><span class="notetitle">Note:</span> When
|
||
|
using the DUP keyword in a subfile, an update operation should be performed
|
||
|
after steps <a href="#rzakcmstdfdupprogramming__dfduphidden">3</a> and <a href="#rzakcmstdfdupprogramming__dfdoperation">5</a> to store the value of
|
||
|
the hidden field into the subfile. This will be returned on the next read
|
||
|
of that subfile record.</div>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Repeat steps <a href="#rzakcmstdfdupprogramming__dfdsubsequent">4</a> and <a href="#rzakcmstdfdupprogramming__dfdoperation">5</a> for subsequent data
|
||
|
entry using the Dup key.</span></li>
|
||
|
</ol>
|
||
|
<div class="section"><p>You can also duplicate character fields one character at a time
|
||
|
by saving them in arrays, then moving the array one character at a time and
|
||
|
checking for the DUP key indication of hex 1C.</p>
|
||
|
<div class="p">You can achieve duplication
|
||
|
of numeric fields one digit at a time by defining the field as character and
|
||
|
eventually moving it to your numeric field after the hex 1Cs have been removed.
|
||
|
You can test whether the Dup key has been pressed: <ul><li>For numeric fields, a response indicator is required.</li>
|
||
|
<li>For character fields, a response indicator is optional.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>The field will contain hex 1C at the cursor position and in the
|
||
|
remaining positions if the Dup key has been pressed.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstdfdup.htm" title="Use this field-level keyword to activate the Dup key on the display station keyboard.">DUP (Duplication) keyword for display files</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|