ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/dtadfld.htm

80 lines
5.8 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="FieldDescription classes" />
<meta name="abstract" content="The field description classes allow the Java program to describe the contents of a field or parameter with a data type and a string containing the name of the field. If the program is working with data from record-level access, it can also specify any iSeries data definition specification (DDS) keywords that further describe the field." />
<meta name="description" content="The field description classes allow the Java program to describe the contents of a field or parameter with a data type and a string containing the name of the field. If the program is working with data from record-level access, it can also specify any iSeries data definition specification (DDS) keywords that further describe the field." />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="dtadfld" />
<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>FieldDescription classes</title>
</head>
<body id="dtadfld"><a name="dtadfld"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">FieldDescription classes</h1>
<div><p>The field description classes allow the Java™ program to describe the contents of
a field or parameter with a data type and a string containing the name of
the field. If the program is working with data from record-level access, it
can also specify any iSeries™ data definition specification (DDS) keywords
that further describe the field.</p>
<div class="section"><p><a href="javadoc/com/ibm/as400/access/FieldDescription.html#NAVBAR_TOP">Field description</a> classes</p>
<p>The field description
classes are as follows:</p>
<ul><li><a href="javadoc/com/ibm/as400/access/BinaryFieldDescription.html#NAVBAR_TOP"> BinaryFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/CharacterFieldDescription.html#NAVBAR_TOP"> CharacterFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/DateFieldDescription.html#NAVBAR_TOP"> DateFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/DBCSEitherFieldDescription.html#NAVBAR_TOP"> DBCSEitherFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/DBCSGraphicFieldDescription.html#NAVBAR_TOP"> DBCSGraphicFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/DBCSOnlyFieldDescription.html#NAVBAR_TOP"> DBCSOnlyFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/DBCSOpenFieldDescription.html#NAVBAR_TOP"> DBCSOpenFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/FloatFieldDescription.html#NAVBAR_TOP"> FloatFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/HexFieldDescription.html#NAVBAR_TOP"> HexFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/PackedDecimalFieldDescription.html#NAVBAR_TOP"> PackedDecimalFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/TimeFieldDescription.html#NAVBAR_TOP"> TimeFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/TimestampFieldDescription.html#NAVBAR_TOP"> TimestampFieldDescription</a></li>
<li><a href="javadoc/com/ibm/as400/access/ZonedDecimalFieldDescription.html#NAVBAR_TOP"> ZonedDecimalFieldDescription</a></li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Example: Creating field descriptions</h4><p>The following
example assumes that the entries on a data queue have the same format. Each
entry has a message number (AS400Bin4), a time stamp (8 characters), and message
text (50 characters) that you can describe with field descriptions:</p>
<pre> // Create a field description for the numeric data. Note it uses the
// AS400Bin4 data type. It also names the field so it can be accessed by
// name in the record class.
BinaryFieldDescription bfd = new BinaryFieldDescription(new AS400Bin4(), "msgNumber");
// Create a field description for the character data. Note it uses the
// AS400Text data type. It also names the field so it can be accessed by
// name by the record class.
CharacterFieldDescription cfd1 = new CharacterFieldDescription(new AS400Text(8), "msgTime");
// Create a field description for the character data. Note it uses the
// AS400Text data type. It also names the field so it can be accessed by
// name by the record class.
CharacterFieldDescription cfd2 = new CharacterFieldDescription(new AS400Text(50), "msgText");</pre>
<p>You
can now group the field descriptions in an instance of the RecordFormat class.
To see how to add the field descriptions to a RecordFormat object, see the
example on the following page:</p>
<blockquote><a href="dtadrfmt.htm#dtadrfmt">RecordFormat class</a></blockquote>
</div>
</div>
</body>
</html>