ibm-information-center/dist/eclipse/plugins/i5OS.ic.apiref_5.4.0.1/ExTaskRetfile.htm

78 lines
5.0 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="reference" />
<meta name="DC.Title" content="Examples: Retrieving a file description to a user space" />
<meta name="abstract" content="These programming examples show an application that uses a user space as a receiver variable by retrieving a file description to a user space. This approach is possible only if you use an HLL that is able to work with pointers." />
<meta name="description" content="These programming examples show an application that uses a user space as a receiver variable by retrieving a file description to a user space. This approach is possible only if you use an HLL that is able to work with pointers." />
<meta name="DC.Relation" scheme="URI" content="ExTaskAPIs.htm" />
<meta name="DC.Relation" scheme="URI" content="exretilec.htm" />
<meta name="DC.Relation" scheme="URI" content="exretilecobol.htm" />
<meta name="DC.Relation" scheme="URI" content="exretilerpg.htm" />
<meta name="DC.Relation" scheme="URI" content="../apis/qdbrtvfd.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="ExTaskRetfile" />
<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>Examples: Retrieving a file description to a user space</title>
</head>
<body id="ExTaskRetfile"><a name="ExTaskRetfile"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: Retrieving a file description to a user space</h1>
<div><p>These programming examples show an application that uses a user
space as a receiver variable by retrieving a file description to a user space.
This approach is possible only if you use an HLL that is able to work with
pointers.</p>
<div class="section"><p> The application accepts the following parameters:</p>
<ul><li>User space name and library</li>
<li>File name and library</li>
<li>Record format</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> Read the <a href="codedisclaimer.htm">Code license and disclaimer information</a> for important
legal information.</div>
<p>The following shows the sequence of steps to retrieve
a file description to a user space:</p>
<ol><li>The application creates a user space to store the data in, changes the
user space to be automatically extendable, and retrieves a pointer to the
user space.</li>
<li>The application calls the Retrieve File Description API to retrieve the
file definition template and uses the user space as the receiver variable.</li>
</ol>
<p>This example uses an automatically extended user space as the receiver
variable on a retrieve API. A user space can return a varying amount of information
depending on the file description being retrieved. The user space is automatically
extended up to 16MB to accommodate the information being retrieved.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="exretilec.htm">Example in ILE C: Retrieving a file description to a user space</a></strong><br />
This example uses ILE C to retrieve a file definition template to a user space.</li>
<li class="ulchildlink"><strong><a href="exretilecobol.htm">Example in ILE COBOL: Retrieving a file description to a user space</a></strong><br />
This program retrieves a file definition template to a user space.</li>
<li class="ulchildlink"><strong><a href="exretilerpg.htm">Example in ILE RPG: Retrieving a file description to a user space</a></strong><br />
This program retrieves a file definition template to a user space.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ExTaskAPIs.htm" title="This topic provides some examples of using APIs to perform different types of tasks.">Performing tasks using APIs</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../apis/qdbrtvfd.htm">Retrieve Database File Description (QDBRTVFD)</a></div>
</div>
</div>
</body>
</html>