ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafosrcpgm.htm

62 lines
4.3 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="concept" />
<meta name="DC.Title" content="Use source files in a program" />
<meta name="abstract" content="You can process a source file in your program. You can use the external definition of the source file and do any input/output operations for that file, just as you would for any other database file." />
<meta name="description" content="You can process a source file in your program. You can use the external definition of the source file and do any input/output operations for that file, just as you would for any other database file." />
<meta name="DC.subject" content="source file, using, in a program, program, using source files in" />
<meta name="keywords" content="source file, using, in a program, program, using source files in" />
<meta name="DC.Relation" scheme="URI" content="rbafosrcwrk.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafodffds.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafosrcpgm" />
<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>Use source files in a program</title>
</head>
<body id="rbafosrcpgm"><a name="rbafosrcpgm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use source files in a program</h1>
<div><p>You can process a source file in your program. You can use the
external definition of the source file and do any input/output operations
for that file, just as you would for any other database file.</p>
<div class="p">Source files are externally described database files. As such, when you
name a source file in your program and compile it, the source file description
is automatically included in your program printout. For example, assume you
wanted to read and update records for a member called FILEA in the source
file QDDSSRC. When you write the program to process this file, the system
will include the <em>SRCSEQ</em>, <em>SRCDAT</em>, and <em>SRCDTA</em> fields from
the source file. <div class="note"><span class="notetitle">Note:</span> You can display the fields defined in
a file by using the Display File Field Description command (DSPFFD). </div>
</div>
<div class="p">The program processing the FILEA member of the QDDSSRC file can: <ul><li>Open the file member (just like any other database file member).</li>
<li>Read and update records from the source file (probably changing the <em>SRCDTA</em> field
where the actual source data is stored).</li>
<li>Close the source file member (just like any other database file member).</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafosrcwrk.htm" title="These topics describe how to enter and maintain data using various methods.">Work with source files</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbafodffds.htm" title="Use the Display File Field Description (DSPFFD) command to display field information for both database and device files. The information can be displayed, printed, or written to a database output file (OUTFILE).">Display the descriptions of the fields in a file</a></div>
</div>
</div>
</body>
</html>