ibm-information-center/dist/eclipse/plugins/i5OS.ic.dds_5.4.0.1/fldrefexamp.htm

103 lines
6.2 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="concept" />
<meta name="DC.Title" content="Example: A field reference file" />
<meta name="abstract" content="This example defines all of the fields used in an application and refers to fields only within the field reference file itself." />
<meta name="description" content="This example defines all of the fields used in an application and refers to fields only within the field reference file itself." />
<meta name="DC.subject" content="examples of DDS, field reference file" />
<meta name="keywords" content="examples of DDS, field reference file" />
<meta name="DC.Relation" scheme="URI" content="rbafpmstexamp.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="fldrefexamp" />
<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>Example: A field reference file</title>
</head>
<body id="fldrefexamp"><a name="fldrefexamp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: A field reference file</h1>
<div><p>This example defines all of the fields used in an application and
refers to fields only within the field reference file itself. </p>
<div class="p">The following keywords are important in the example: <p>COLHDG<br />
EDTCDE(Z)<br />
REFFLD<br />
REFSHIFT<br />
TEXT</p>
</div>
<p>The following field reference file (MLGREFP) describes all fields used
by any program in the application. The other files use the fields in this
file.</p>
<div class="fignone" id="fldrefexamp__o1"><a name="fldrefexamp__o1"><!-- --></a><span class="figcap">Figure 1. DDS for a field reference file</span><pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A** FLDREF MLGREFP MAILING LIST FIELD REFERENCE FILE
00020A <strong>(1)</strong>R MLGREFR TEXT('Mailing List Field Reference')
00030A ACTNUM 5 0 COLHDG('Account' 'Number')
00040A EDTCDE(Z)
00050A ACTTYP 1 0 COLHDG('Acct' 'Type')
00060A TEXT('Acct Type 1=Bus 2=Gvt +
00070A 3=Org 4=Sch 5=Pvt 9=Oth')
00080A NAME 18 COLHDG('Name')
00090A REFSHIFT(X)<strong>(4)</strong>
00100A ADDR R <strong>(2)</strong> <strong>(2)</strong>REFFLD(NAME)
00110A COLHDG('Address')<strong>(3)</strong>
00120A CITY R <strong>(2)</strong> <strong>(2)</strong>REFFLD(NAME)
00130A COLHDG('City') <strong>(3)</strong>
00140A STATE 2 COLHDG('State')
00150A ZIP 5 0 COLHDG('ZIP' 'Code')
00160A EDTCDE(X)
00170A BATNUM 6 0 COLHDG('Batch' 'Number')
00180A EDTCDE(Z)
00190A TRNTYP 1 COLHDG('Trans' 'Type')
A</pre>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00200A TEXT('Trans Type A=Add +
00210A C=Change D=Delete')
00220A XACTNM R REFFLD(ACTNUM)
00230A XACTTTP R REFFLD(ACTTYP)
00240A XNAME R REFFLD(NAME)
00250A XADDR R REFFLD(ADDR)
00260A XCITY R REFFLD(CITY)
00270A XSTATE R REFFLD(STATE)
00280A XZIP R REFFLD(ZIP)
00290A TRNNUM 5 0 COLHDG('Transaction' 'Number')
00300A EDTCDE(Z)
00310A MLGLK1 3 0 COLHDG('Lock' 'Control')
00320A TEXT('Control Number Used for +
00330A record locking')
A</pre>
</div>
<div class="p"><strong>Legend: </strong> <dl><dt class="dlterm">(1)</dt>
<dd>Like all physical files, a field reference file has only one record format.
The R in position 17 specifies that MLGREFR is the record format name.</dd>
<dt class="dlterm">(2)</dt>
<dd>The Rs in position 29 and REFFLD in positions 45 through 80 specify that
the fields ADDR and CITY are to have the same attributes as NAME.</dd>
<dt class="dlterm">(3)</dt>
<dd>Specifying COLHDG for ADDR and CITY
overrides the COLHDG attribute for NAME, which otherwise will be in effect.</dd>
<dt class="dlterm">(4)</dt>
<dd>Specifying REFSHIFT for NAME will cause the keyboard shift specified (X)
to be used when this field (NAME) is referred to in a display file.</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafpmstexamp.htm" title="This topic provides examples of data description specifications (DDS) for each type of file discussed in this topic. If you choose, you can use the examples in this topic with appropriate high-level language programs.">Examples: DDS for each file type</a></div>
</div>
</div>
</body>
</html>