144 lines
8.0 KiB
HTML
144 lines
8.0 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="CHOICE (Selection Field Choice) keyword for display files" />
|
|
<meta name="abstract" content="Use this field-level keyword to define a choice for a selection field." />
|
|
<meta name="description" content="Use this field-level keyword to define a choice for a selection field." />
|
|
<meta name="DC.subject" content="CHOICE (Selection Field Choice) keyword, Selection Field Choice (CHOICE) keyword, selection field choice, defining" />
|
|
<meta name="keywords" content="CHOICE (Selection Field Choice) keyword, Selection Field Choice (CHOICE) keyword, selection field choice, defining" />
|
|
<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="rzakcmstchoice" />
|
|
<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>CHOICE (Selection Field Choice) keyword for display files</title>
|
|
</head>
|
|
<body id="rzakcmstchoice"><a name="rzakcmstchoice"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">CHOICE (Selection Field Choice) keyword for display files</h1>
|
|
<div><p>Use this field-level keyword to define a choice for a selection
|
|
field.</p>
|
|
<div class="section"><p>The format of the keyword is:</p>
|
|
<pre>CHOICE(choice-number choice-text [*SPACEB])</pre>
|
|
<p>The
|
|
choice-number parameter defines an identification number for this choice.
|
|
This parameter is required. The choice number returns to the application to
|
|
indicate which choice in the selection field was selected. On non-graphical
|
|
displays, the choice number is also displayed to the left of the choice text.
|
|
Valid values for the choice-number are positive integers greater than 0 and
|
|
less than or equal to 99. Duplicate choice-number values within a selection
|
|
field are not allowed.</p>
|
|
<p>The choice-text parameter defines the text that
|
|
appears in the selection field for the choice. This parameter is required.
|
|
The parameter can be specified in one of two forms:</p>
|
|
<ul><li>As a character string: 'Choice text '</li>
|
|
<li>As a program-to-system field: &field-name</li>
|
|
</ul>
|
|
<p>The field specified must exist in the same record as the selection
|
|
field and must be defined as a character field with usage P.</p>
|
|
<p>The
|
|
choice text for all choices within a selection field must fit on the display
|
|
for the smallest display size specified in the file. Therefore, the maximum
|
|
length for the choice text depends on the following items:</p>
|
|
<ul><li>The position of the selection field</li>
|
|
<li>The length of the longest choice number that is displayed to the left
|
|
of the choice</li>
|
|
<li>The length of the choice text itself</li>
|
|
<li>The number of columns in the selection field</li>
|
|
<li>The width of the gutter between columns</li>
|
|
</ul>
|
|
<p>If the smallest display size is 24 x 80, the above must be less than
|
|
or equal to 80. If the smallest display size specified is 27 x 132, this sum
|
|
must be less than or equal to 132.</p>
|
|
<p>Within the choice text, you can specify
|
|
a mnemonic for the choice by using a greater than character (>) to indicate
|
|
the mnemonic character. The character to the right of the > is the mnemonic.
|
|
The mnemonic is used only on a character-based graphical display attached
|
|
to a controller that supports an enhanced interface for nonprogrammable workstations,
|
|
where the choices are rendered using radio buttons. The mnemonic is ignored
|
|
on displays where the field is rendered using numeric selection, since the
|
|
system does not support both numeric and mnemonic selection on a selection
|
|
field. Examples of specifying mnemonics:</p>
|
|
<dl><dt><strong>Choice text</strong></dt>
|
|
<dd><strong>Appears as</strong></dd>
|
|
<dt class="dlterm">'>File'</dt>
|
|
<dd><u>F</u>ile</dd>
|
|
<dt class="dlterm">'F>inish'</dt>
|
|
<dd>F<u>i</u>nish</dd>
|
|
<dt class="dlterm">'Save >As...'</dt>
|
|
<dd>Save <u>A</u>s...</dd>
|
|
<dt class="dlterm">'X >= 1'</dt>
|
|
<dd>X <u>=</u> 1</dd>
|
|
</dl>
|
|
<p>In order to specify > as a character in the text, you
|
|
must specify it twice, just as you must specify the apostrophe character twice
|
|
in order to get a single apostrophe character in the text. For example:</p>
|
|
<dl><dt><strong>Choice text</strong></dt>
|
|
<dd><strong>Appears as</strong></dd>
|
|
<dt class="dlterm">'X >>= 1'</dt>
|
|
<dd>X >= 1</dd>
|
|
<dt class="dlterm">'X >>>= 1'</dt>
|
|
<dd>X ><u>=</u> 1</dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> It is not possible to specify the > as the mnemonic.</div>
|
|
<p>The
|
|
mnemonic character indicated must be a single-byte character and must not
|
|
be a blank. Only one mnemonic is allowed in the choice text, and the same
|
|
mnemonic character cannot be specified for more than one choice.</p>
|
|
<p>The
|
|
*SPACEB parameter is optional and indicates that a blank space (or line) should
|
|
be inserted before this choice. This parameter is used to specify logical
|
|
grouping of choices that are numbered consecutively.</p>
|
|
<p>For vertical selection
|
|
fields (selection fields arranged in a single column), if the choice numbers
|
|
are not consecutive, a blank space is automatically inserted between non-consecutive
|
|
choices. This does not happen for horizontal selection fields (selection fields
|
|
arranged in multiple columns).</p>
|
|
<p>When the CHOICE keyword is specified
|
|
on a field, either the SNGCHCFLD or the MLTCHCFLD keyword must also be specified.</p>
|
|
<p>Several
|
|
CHOICE keywords can be specified for one selection field. The maximum number
|
|
of CHOICE keywords that can be specified depends on the position of the selection
|
|
field and the display size. All choices must fit on the smallest display size
|
|
specified for the file.</p>
|
|
<p>Option indicators are valid for this keyword.
|
|
When a CHOICE keyword is turned off, the list of choices is compressed.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
|
|
the CHOICE keyword:</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
A R RECORD
|
|
A F1 2Y 0B 1 2SNGCHCFLD
|
|
A 01 CHOICE(1 '>Undo ')
|
|
A CHOICE(2 &MARKTXT);
|
|
A CHOICE(3 '>Copy ')
|
|
A MARKTXT 12A P
|
|
A</pre>
|
|
<p>In this example, three choices are defined for the single-choice
|
|
selection field F1. The text for choice 2 is contained in field MARKTXT, and
|
|
the mnemonic for choice 2 must be contained in the text supplied by the application
|
|
at run time. If indicator 01 is off when the record is written, only choices
|
|
2 and 3 are 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> |