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

242 lines
15 KiB
HTML
Raw Permalink 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="RTNCSRLOC (Return Cursor Location) keyword for display files" />
<meta name="abstract" content="Use this record-level keyword to return the location of the cursor to an application program." />
<meta name="description" content="Use this record-level keyword to return the location of the cursor to an application program." />
<meta name="DC.subject" content="RTNCSRLOC (Return Cursor Location) keyword, Return Cursor Location (RTNCSRLOC) keyword" />
<meta name="keywords" content="RTNCSRLOC (Return Cursor Location) keyword, Return Cursor Location (RTNCSRLOC) 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="rzakcmstdfrtncs" />
<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>RTNCSRLOC (Return Cursor Location) keyword for display files</title>
</head>
<body id="rzakcmstdfrtncs"><a name="rzakcmstdfrtncs"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">RTNCSRLOC (Return Cursor Location) keyword for display files</h1>
<div><p>Use this record-level keyword to return the location of the cursor
to an application program.</p>
<div class="section"><div class="p">This keyword can be specified in two formats. These formats are:
<ul><li>Return the name of the record and field in which the cursor is currently
positioned. Optionally, a third parameter can be specified that will contain
the relative cursor position within the field.</li>
<li>Return the row and column position of the cursor relative to the display.
Optionally, two additional parameters can be provided that will return either
the row and column position of the cursor relative to the active window (if
one exists) or the location of the cursor at the beginning of the two-event
mouse button definition.</li>
</ul>
</div>
<div class="p">The formats of the keyword is: <pre>RTNCSRLOC([*RECNAME]
&amp;cursor-record &amp;cursor-field
[&amp;cursor-position])
<strong>or</strong>
RTNCSRLOC({*WINDOW | *MOUSE}
&amp;cursor-row &amp;cursor-column
[&amp;cursor-row2
[&amp;cursor-column2]])</pre>
</div>
<div class="p">The parameter for the first format
are: <ul><li>The *RECNAME parameter indicates that RTNCSRLOC should return the name
of the record and field on which the cursor is positioned. Optionally, it
will also return the relative position of the cursor with the field. This
parameter is optional.</li>
<li>The cursor-record parameter specifies the name of a hidden field that,
on input, will contain the name of the record on which the cursor is located.
The field must be defined in the record format as a character (A in position
35) field of length 10, with usage H (hidden). If the cursor is not in a record
area on input, the cursor-record field will contain blanks.</li>
<li>The cursor-field parameter specifies the name of a hidden field that,
on input, will contain the name of the field on which the cursor is located.
The field must be defined in the record format as a character (A in position
35) field of length 10, with usage H (hidden). If the cursor is not located
on a field on input, the cursor-field field will contain blanks.</li>
<li>The optional cursor-position parameter specifies the name of a hidden
field that, on input, will contain the relative position of the cursor within
the field on which it is located. The field must be defined in the record
format as a signed numeric (S in position 35) field of length 4, with 0 decimal
positions and usage H (hidden). If the cursor is in the first position of
the field, the cursor-position field will contain the value 1. If the cursor
is in the <em>i</em>th position, the cursor-position field will contain the
value <em>i</em>. If the cursor is not located on a field, the cursor-position
field will contain the value 0. If the cursor is located in a menu-bar or
selection-field list, then the cursor position parameter returns to the choice
number on which the cursor is located.</li>
</ul>
</div>
<p>All three fields specified on the RTNCSRLOC keyword will contain
values on input if the cursor is outside the area of the record that contains
the RTNCSRLOC keyword. The fields also contain values on input if the cursor
is located in a subfile. The cursor-record field will contain a value if the
cursor is located anywhere inside the subfile. The cursor-field and cursor-position
fields will contain values if the cursor is located on a field within the
subfile.</p>
<div class="p">The parameters for the second format are: <ul><li>The *WINDOW or *MOUSE parameter is used to qualify the cursor-row2 and
cursor-column-2 parameters. *WINDOW causes these parameters to return the
cursor location relative to the first usable location in the active window.
*MOUSE causes these parameters to return the location of the cursor just before
a two-event mouse definition is processed.</li>
<li>The cursor-row parameter specifies the name of a hidden field that, on
input, contains the number of row on which the cursor is located. The field
must be defined in the record format as a data type S, field length of 3,
usage of H, and zero decimal positions. The value returned in this hidden
field will be relative to the entire display where the first row of the display
is row 1.</li>
<li>The cursor-column parameter specifies the name of a hidden field that,
on input, contains the number of the column on which the cursor is located.
The field must be defined in the record format as a data type S, field length
of 3, usage of H, and zero decimal positions. The value returned in this hidden
field will be relative to the entire display where the first column of the
display is column 1.</li>
<li>The optional cursor-row2 parameter specifies the name
of a hidden field. If *WINDOW is specified as the first parameter, the hidden
field will contain the relative row position of the cursor to the first usable
location of the active window. If there is no active window, this value will
be the same as &amp;cursor-row. If the cursor is in the first usable position
of the window, the cursor-row2 field will contain the value 1. If the cursor
is outside of the active window, it is possible for this value to be a negative
number. If *MOUSE is specified as the first parameter, the hidden field contains
the row number of the cursor at the instant just before a two-event mouse
definition is called. If a two-event mouse definition has not been processed,
this field will be set to zero. The field must be defined in the record format
as data type S, field length of 3, usage H, and zero decimal positions.</li>
<li>The optional cursor-column2 parameter specifies the
name of a hidden field. If *WINDOW is specified as the first parameter, the
hidden field will contain the relative column position of the cursor to the
first usable location in the active window. If there is no active window,
this value will be the same as &amp;cursor-column. If the cursor is in the
first usable position of the window, the cursor-column2 field will contain
the value 1. If the cursor is outside of the active window, it is possible
for this value to be a negative number. If *MOUSE is specified as the first
parameter, the hidden field will contain the column number of the cursor when
the first event of a two-event mouse definition has occurred. If a two-event
mouse definition has not been processed, this field will be set to zero. The
field must be defined in the record format as data type S, field length of
3, usage of H, and zero decimal positions.</li>
</ul>
</div>
<p>Both formats of this keyword can be specified with the same record.
If the same hidden field is used multiple times for any of the parameters,
unpredictable results will occur.</p>
<p>Option indicators are not valid for
this keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the RTNCSRLOC keyword.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R REC01 RTNCSRLOC(&amp;RCD &amp;FLD &amp;POS);
A RTNCSRLOC(*MOUSE &amp;ROW &amp;COL);
A FLD 10A H
A RCD 10A H
A POS 4S 0H
A FLD1A 2A I 3 2
A 10 FLD2A 6A O 3 18
A N10 FLD3A 10A O 3 18
A*
A R REC02 OVERLAY
A FLD1A 2A I 5 2
A FLD2A 10A O 5 5
A FLD3A 6A O 5 18
A</pre>
<p>Both REC01 and REC02 are displayed on the screen and
option indicator 10 is off.</p>
<p>The following table
shows the values returned when the cursor is at the specified positions.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th align="left" valign="bottom" width="14.393939393939394%" id="d0e90">Row</th>
<th align="left" valign="bottom" width="14.393939393939394%" id="d0e92">Col</th>
<th align="left" valign="bottom" width="14.14141414141414%" id="d0e94">Cursor record</th>
<th align="left" valign="bottom" width="14.393939393939394%" id="d0e96">Cursor field</th>
<th align="left" valign="bottom" width="14.14141414141414%" id="d0e98">Cursor position</th>
<th align="left" valign="bottom" width="14.393939393939394%" id="d0e100">Cursor row</th>
<th align="left" valign="bottom" width="14.14141414141414%" id="d0e102">Cursor column</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">3</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">2</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC01</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">FLD1A</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">1</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">3</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">2</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">3</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">19</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC01</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">FLD3A<sup>1</sup></td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">2</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">3</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">19</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">3</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">25</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC01</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">FLD3A</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">8</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">3</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">25</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">3</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">40</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC01</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">blanks</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">0</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">3</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">40</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">4</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">40</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">blanks</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">blanks</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">0</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">4</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">40</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">5</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">5</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC02</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">FLD2A</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">1</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">5</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">5</td>
</tr>
<tr><td align="left" valign="top" width="14.393939393939394%" headers="d0e90 ">5</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e92 ">40</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e94 ">REC02</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e96 ">blanks</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e98 ">0</td>
<td align="left" valign="top" width="14.393939393939394%" headers="d0e100 ">5</td>
<td align="left" valign="top" width="14.14141414141414%" headers="d0e102 ">40</td>
</tr>
<tr><td colspan="7" align="left" valign="top" headers="d0e90 d0e92 d0e94 d0e96 d0e98 d0e100 d0e102 "><sup>1</sup> If
Option indicator 10 were on, FLD2A would be returned when the cursor is at
row 3 column 19.</td>
</tr>
</tbody>
</table>
</div>
</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>