113 lines
6.7 KiB
HTML
113 lines
6.7 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="TRNTBL (Translation Table) keyword—logical files only" />
|
|
<meta name="abstract" content="Use this field-level keyword to specify the name of a translation table to be used when passing this field between the physical file on the PFILE or JFILE keyword and your program." />
|
|
<meta name="description" content="Use this field-level keyword to specify the name of a translation table to be used when passing this field between the physical file on the PFILE or JFILE keyword and your program." />
|
|
<meta name="DC.subject" content="TRNTBL (Translation Table) keyword, Translation Table (TRNTBL) keyword" />
|
|
<meta name="keywords" content="TRNTBL (Translation Table) keyword, Translation Table (TRNTBL) keyword" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakbmstlfkeyw.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="tdtrntb" />
|
|
<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>Physical and Logical Files, TRNTBL</title>
|
|
</head>
|
|
<body id="tdtrntb"><a name="tdtrntb"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">TRNTBL (Translation Table) keyword—logical files only</h1>
|
|
<div><p>Use this field-level keyword to specify the name of a translation
|
|
table to be used when passing this field between the physical file on the
|
|
PFILE or JFILE keyword and your program.</p>
|
|
<div class="section"><p>The field must be a character field and its length cannot be redefined
|
|
in the logical file. If the TRNTBL keyword is specified with the CONCAT keyword,
|
|
the fields specified on the CONCAT keyword must all be character fields.</p>
|
|
<div class="p">The
|
|
format of the keyword is: <pre>TRNTBL([library-name/]translation-table-name)</pre>
|
|
</div>
|
|
<p>The
|
|
translation-table-name is a required parameter value; the library-name is
|
|
optional. If you do not specify the library-name, the operating system
|
|
uses the library list (*LIBL) that is in effect at file creation time.</p>
|
|
<p>The
|
|
translation-table-name cannot name an ICU table.</p>
|
|
<p>This keyword is valid
|
|
only for character fields that are input-only (I specified in position 38)
|
|
or neither (N specified in position 38) fields.</p>
|
|
<p>You cannot specify the
|
|
TRNTBL keyword on a hexadecimal field (H in position 35). Do not specify the
|
|
TRNTBL keyword on a date, time, or timestamp field (L, T, or Z in position
|
|
35).</p>
|
|
<p>You can specify as many as 99 different translation tables for
|
|
different fields in the same logical file.</p>
|
|
<p>Translation occurs when the
|
|
field is read from the physical file. Therefore, all functions specified in
|
|
the logical file (such as key field sequencing, select/omit processing, and
|
|
joining of records) depend on the translated version of the data.</p>
|
|
<p>The
|
|
TRNTBL keyword changes the data in the records returned from the logical file.
|
|
The ALTSEQ keyword changes only the order of the records returned from the
|
|
logical file.</p>
|
|
<div class="p">The TRNTBL keyword is similar to the
|
|
CHRID keyword but differs from the latter as follows: <ul><li>The TRNTBL keyword names the translation table to be used; the CHRID keyword
|
|
does not.</li>
|
|
<li>The TRNTBL keyword changes data on input to the program when your program
|
|
is reading a logical file. The CHRID keyword changes the data for display
|
|
or printing on a specific device. Use the TRNTBL keyword when your program
|
|
will use the changed data (for example, in an IF-THEN-ELSE statement or a
|
|
COBOL SORT statement). If your program is handling data that comes only from
|
|
a logical file, you do not need to specify the CHRID keyword in display or
|
|
printer files used by the program.</li>
|
|
</ul>
|
|
</div>
|
|
<p>The TRNTBL keyword is not valid when you specify FILETYPE(*SRC)
|
|
on the Create Logical File (CRTLF) command.</p>
|
|
<div class="note"><span class="notetitle">Notes:</span> <ol><li>When you use the TRNTBL keyword, the length of the field in the logical
|
|
file must be the same as the length of the corresponding field in the physical
|
|
file.</li>
|
|
<li>At file creation time, you must have use authority to the translation
|
|
table. The translation table is created using the Create Table (CRTTBL) command.</li>
|
|
<li>The translation table specified in the TRNTBL keyword is referred to only
|
|
when the logical file is created. Therefore, a change to a translation table
|
|
does not affect the logical file until the logical file is re-created.</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
|
|
the TRNTBL keyword.</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
00010A R RECORD1 PFILE(PF1)
|
|
00020A CHAR1 I TRNTBL(LIB1/TBL1)
|
|
00030A CHAR2 A I TRNTBL(LIB2/TBL2)
|
|
00040A NUM1
|
|
00050A NUM2
|
|
A</pre>
|
|
<p>Field CHAR1 is translated using table TBL1 in library
|
|
LIB1. Field CHAR2 is translated using table TBL2 in library LIB2. Field CHAR2
|
|
was redefined in the logical file as a character field (A in position 35)
|
|
to allow the TRNTBL keyword to be specified. Fields NUM1 and NUM2 are numeric
|
|
fields in the physical file PF1 and cannot have the TRNTBL keyword specified
|
|
for them.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakbmstlfkeyw.htm" title="This topic lists valid keyword entries for describing physical and logical files. They are typed in positions 45 through 80 (functions).">Keyword entries for physical and logical files (positions 45 through 80)</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |