ibm-information-center/dist/eclipse/plugins/i5OS.ic.ifs_5.4.0.1/rzaaxstmpgm.htm

81 lines
5.8 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="Copy data between stream files and database files" />
<meta name="abstract" content="If you are familiar with operating on database files using record-oriented facilities such as data description specifications (DDS), you may find some fundamental differences in the way you operate on stream files." />
<meta name="description" content="If you are familiar with operating on database files using record-oriented facilities such as data description specifications (DDS), you may find some fundamental differences in the way you operate on stream files." />
<meta name="DC.subject" content="stream file, using in programs, API, using in C programs, functions, using in C programs" />
<meta name="keywords" content="stream file, using in programs, API, using in C programs, functions, using in C programs" />
<meta name="DC.Relation" scheme="URI" content="rzaaxpgmifs.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaaxcpusingcl.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaaxcpyapi.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaaxcpusingcadtf.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaaxstmfile.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="rzaaxstmpgm" />
<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>Copy data between stream files and database files</title>
</head>
<body id="rzaaxstmpgm"><a name="rzaaxstmpgm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Copy data between stream files and database files</h1>
<div><p>If you are familiar with operating on database files using record-oriented
facilities such as data description specifications (DDS), you may find some
fundamental differences in the way you operate on stream files.</p>
<div class="section"><p>The differences result from the different structure (or perhaps
lack of structure) of stream files in comparison with database
files. To access data in a stream file, you indicate a byte offset and a length.
To access data in a database file, you typically define the fields to be used
and the number of records to be processed.</p>
</div>
<div class="section"><p>Because you define the format and characteristics of a record-oriented
file ahead of time, the operating system has knowledge of the file and can
help you avoid performing operations that are not appropriate for the file
format and characteristics. With stream files, the operating system has little
or no knowledge of the format of the file. The application must know what
the file looks like and how to operate on it properly. Stream files allow
an extremely flexible programming environment, but at the cost of having little
or no help from the operating system. Stream files are better suited for some
programming situations; record-oriented files are better suited for other
programming situations.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzaaxcpusingcl.htm">Copy data using CL commands</a></strong><br />
There are two sets of CL commands that allow you to copy data between stream files and database file members.</li>
<li class="ulchildlink"><strong><a href="rzaaxcpyapi.htm">Copy data using APIs</a></strong><br />
If you want to copy database file members to a stream file in an
application, you can use the integrated file system <span class="apiname">open()</span>, <span class="apiname">read()</span>,
and <span class="apiname">write()</span> functions to open a member, read data from
it, and write data to it or another file. </li>
<li class="ulchildlink"><strong><a href="rzaaxcpusingcadtf.htm">Copy data using data-transfer functions</a></strong><br />
<span>The date-transfer applications in the <span class="keyword">iSeries™ Access Family</span> licensed program have the
advantage of an easy-to-follow graphical interface, and automatic numeric
and character data conversion.</span></li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaaxpgmifs.htm" title="The addition of the integrated file system to the iSeries server server in V3R1M0 did not affect existing iSeries server applications. The programming languages, utilities, and system support (such as data description specifications) operate in the same way as they did before the addition of the integrated file system.">Programming support</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzaaxstmfile.htm" title="A stream file is a randomly accessible sequence of bytes, with no further structure imposed by the system.">Stream file</a></div>
</div>
</div>
</body>
</html>