ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzake_5.4.0.1/rzakemsticfreci.htm

222 lines
12 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="RECID (Record Identification) keyword for ICF files" />
<meta name="abstract" content="Use this record-level keyword to allow your program to identify a record-by-record format when it issues a read-from-invited-devices operation using the name of the file." />
<meta name="description" content="Use this record-level keyword to allow your program to identify a record-by-record format when it issues a read-from-invited-devices operation using the name of the file." />
<meta name="DC.subject" content="RECID (Record Identification) keyword, Record Identification (RECID) keyword" />
<meta name="keywords" content="RECID (Record Identification) keyword, Record Identification (RECID) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakemstckeyw.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="icfreci" />
<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>ICF Files, RECID</title>
</head>
<body id="icfreci"><a name="icfreci"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">RECID (Record Identification) keyword for ICF files</h1>
<div><p>Use this record-level keyword to allow your program to identify
a record-by-record format when it issues a read-from-invited-devices operation
using the name of the file.</p>
<div class="section"><p>When you use an input operation, the <span class="keyword">i5/OS™</span> operating system compares
data in the record received with the selection value specified in the parameter
values. The selection value is that data beginning at the specified starting
position, and it must equal the specified compare value. Your program can
then determine the record format of the data just read.</p>
<div class="p">The format of
the keyword is: <pre>RECID(starting-position compare-value)</pre>
</div>
<div class="p">The
starting-position parameter specifies a position relative to the start of
the data in the buffer (disregarding indicators) to test for the record's
ID. If the INDARA keyword is used, the start of data and buffer positions
are the same. For a description of the buffer, see <a href="#icfreci__ex3">Example 3</a> below.
The position parameter can be either <pre>nnnnn</pre>
or <pre>*POSnnnnn</pre>
where
nnnnn is a number that is one to five digits long. For example, the following
are equivalent pairs: <pre>1 and *POS1
34 and *POS34
12025 and *POS12025</pre>
</div>
<p>The compare-value parameter can be one
of the following parameters:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr valign="bottom"><th valign="bottom" id="d0e52">Value</th>
<th valign="bottom" id="d0e54">Meaning</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e52 ">*ZERO</td>
<td valign="top" headers="d0e54 ">The value to be tested for is zero (hex F0). Equivalent
to 0.</td>
</tr>
<tr><td valign="top" headers="d0e52 ">*BLANK</td>
<td valign="top" headers="d0e54 ">The value to be tested for is blank (hex 40). Equivalent
to blank.</td>
</tr>
<tr><td valign="top" headers="d0e52 ">'character-string'</td>
<td valign="top" headers="d0e54 ">The value to be tested for is the specified character
string. The length of the string is limited to the length from the RECID position
parameter specified to the end of the shortest nonzero record format in the
file (not including that record format's indicators or program fields).</td>
</tr>
</tbody>
</table>
</div>
<p>A record format specifying the RECID keyword must contain at least
one data field (usage of B).</p>
<p>You can specify the RECID keyword more
than once in a record format. If you do so, data in the record is compared
with each RECID keyword in the order specified until a match is found. The
first record format whose selection value is satisfied by the data is the
record format selected. If no match is found or no user data is received,
the RECID default record format is used. The RECID default record format will
be the first record format in the file that does not have the RECID keyword
specified for it. However, if every record format in the file has the RECID
keyword specified for it, the default record format will be the first record
format in the file.</p>
<p>A message is issued to your program when data is
received and no match is found and the RECID default record format has the
RECID keyword specified for it.</p>
<p>When comparing the data received with
the RECID keyword, if the position to be compared is beyond the last byte
of data received, the data will be assumed to be blanks (hex 40).</p>
<p>This
keyword is ignored at program run time unless the FMTSLT(*RECID) parameter
is specified on the ADDICFDEVE, CHGICFDEVE, or OVRICFDEVE command.</p>
<p>You
cannot specify RECID on the same record format as the VARBUFMGT keyword.</p>
<p>Option
indicators are not valid for this keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example 1</h4> <p>Record format DFTFMT
is the RECID default record format.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R DFTFMT
00020A ID 3A
00030A FLD1 20A
00040A FLD2 5B 0
A
00050A R RCD1 RECID(1 'ABC')
00060A ID 3A
00070A FLD1 10S 0
00080A FLD2 5B 0
A
00090A R RCD2 RECID(1 'DEF')
00100A ID 3A
00110A FLD1 10S 0
00120A FLD2 5A
00130A FLD3 2B 0
A</pre>
</div>
<div class="example"><h4 class="sectiontitle">Example 2</h4> <p>Record format RCD1
is the RECID default record format. If no match is found, an escape message
is issued to your program because the RECID default record format has the
RECID keyword specified for it. If no data is received, record format RCD1
is used.</p>
<p>An application program reads header and detail records from
an ICF file. The program issues input operations to the file name (not to
individual record names) and receives the records (headers and details) in
the order the sending application sends them. In this example, the sending
and receiving applications provide an explicit code (an H for header records
and a D for detail records) to identify which type of record is being sent
and received. The RECID keyword identifies where in the input buffer (disregarding
indicators) the H or D appears and specifies the value (starting in the position
specified) that identifies the type of record.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R RCD1 RECID(1 'H')
00020A ID 1A
00030A FLD1 10A
00040A FLD2 10A
00050A FLD3 6S 2
A
00060A R RCD2 RECID(1 'D')
00070A ID 1A
00080A FLD1 8S 2
00090A FLD2 10A
00100A FLD3 5B 0
A
00110A R RCD3 RECID(1 'L')
00120A ID 1A
00130A FLD1 50A
A</pre>
</div>
<div class="example" id="icfreci__ex3"><a name="icfreci__ex3"><!-- --></a><h4 class="sectiontitle">Example 3</h4> <p>In this
example, three record formats are defined in the ICF file. The application
program issues input operations using the file name, for instance, RPTFILE.</p>
<p>Assume that the records received on nine successive input
operations are one header, then three details, then one header, then four
details. The sending application must identify the headers by placing an H
in field CODE and must identify the details by placing a D in field CODE.
For each input operation, the <span class="keyword">i5/OS</span> operating
system compares the value in position 1 in the buffer with the value specified
on the RECID keyword. (Position 1 is the location of field CODE in the buffer.)
If the value in a record is H, the <span class="keyword">i5/OS</span> operating
system selects record format name HEADER; if the value in a record is D, the <span class="keyword">i5/OS</span> operating system selects record
format name DETAIL.</p>
<p>Record format CATCH (the RECID default record format)
is the record format name selected if a record is received that does not contain
either H or D in the first position of the data portion of the buffer.</p>
<p>Here
is the buffer for record format HEADER:</p>
<p>Response indicator 10 (1 byte)<br />
CODE (1 byte)<br />
TITLE (30 bytes)<br />
ACTNBR (6 bytes)</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R HEADER RECID(1 'H')
00020A RCVTRNRND(10 'Host stopped sending')
00030A CODE 1
00040A TITLE 30
00050A ACTNBR 6 0
00060A R DETAIL RECID(1 'D')
00070A CODE 1
00080A ITMNBR 8 0
00090A DESCRP 20
00100A R CATCH
00110A FIELD 37
A</pre>
</div>
<div class="example"><h4 class="sectiontitle">Example 4</h4> <p>Three record formats
need to be distinguished from one another; the first character in the value
parameter is the same. Specifying the most specific (longest) value parameter
first in the DDS enables the <span class="keyword">i5/OS</span> operating
system to distinguish the first record format from the others. The reason
is that if the first 10 positions of the buffer contain ABCDEFGHIJ and RCD3
is specified first, RCD3 will be identified even though RCD1 is required.
RCD1 and RCD2 cannot be identified because the <span class="keyword">i5/OS</span> operating
system does not test after one successful match.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R RCD1 RECID(1 'ABC')
A FLD1 10
A R RCD2 RECID(1 'AB')
A FLD1 10
A R RCD3 RECID(1 'A')
A FLD1 10
A R CATCH
A FIELD 10
A</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakemstckeyw.htm" title="These topics contain the keyword entries that you can specify when you define ICF files.">DDS keyword entries for ICF files (positions 45 through 80)</a></div>
</div>
</div>
</body>
</html>