ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddm_5.4.0.1/rbae5hfs.htm

182 lines
11 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="Hierarchical file system API support for DDM" />
<meta name="abstract" content="The hierarchical file system (HFS) APIs and the functions that they support are part of the i5/OS operating system." />
<meta name="description" content="The hierarchical file system (HFS) APIs and the functions that they support are part of the i5/OS operating system." />
<meta name="DC.subject" content="hierarchical file system (HFS)" />
<meta name="keywords" content="hierarchical file system (HFS)" />
<meta name="DC.Relation" scheme="URI" content="rbae5utlang.htm" />
<meta name="DC.Relation" scheme="URI" content="../apis/hfs1.htm" />
<meta name="DC.Relation" scheme="URI" content="../apiref/api.htm" />
<meta name="DC.Relation" scheme="URI" content="rbae5lodstrf.htm" />
<meta name="DC.Relation" scheme="URI" content="rbae5uldstrf.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="rbae5hfs" />
<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>Hierarchical file system API support for DDM</title>
</head>
<body id="rbae5hfs"><a name="rbae5hfs"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Hierarchical file system API support for DDM</h1>
<div><p>The hierarchical file system (HFS) APIs and the functions that
they support are part of the <span class="keyword">i5/OS™</span> operating
system. </p>
<div class="section"><p>The APIs provide applications with a single, consistent interface
to all the hierarchical file systems available on your <span class="keyword">iSeries™ server</span>.
They automatically support the document library services (DLS) file system
and can support user-written file systems also.</p>
</div>
<div class="section"><p>DDM can be registered under HFS as one of the user-written file
systems. DDM, however, only supports the copy stream file (<span class="apiname">QHFCPYSF</span>)
HFS API. To register DDM under HFS, you must run the following
command on your <span class="keyword">iSeries</span> source
system, <samp class="codeph">CALL QTSREGFS</samp>. If no errors occur, DDM is successfully
registered with HFS. </p>
</div>
<div class="section"><p>Calling DDM using the HFS <span class="apiname">QHFCPYSF</span> API causes
one of two DDM-architected commands to be generated, the <span class="cmdname">LODSTRF
(load stream file)</span> or <span class="cmdname">ULDSTRF (unload stream file)</span> command.
Both of these DDM commands are part of the stream file DDM model (STRFIL).
If the DDM target server you are working with does not support the STRFIL
DDM model, then errors will occur when trying to use this support. DDM uses
documents and folders (DLS) on the server to copy stream file data either
to (ULDSTRF case) or from (LODSTRF case).</p>
</div>
<div class="section"><p>To use the DDM HFS copy stream file support, note the following
items:</p>
<ul><li>Both the source and destination file path names must begin with the string
'/QDDM/' to indicate to HFS that DDM is the file system that will handle the
copy stream file function.</li>
<li>The copy information HFS parameter is ignored by DDM, but you still must
pass a valid HFS value.</li>
<li>Either the source or destination file path name parameter must be the
name of a DDM file, but not both. The DDM file used must point to a target
server that supports the STRFIL DDM file model and the remote file name value
must end with the string ' FMS' if the DDM file points to another <span class="keyword">iSeries server</span>.</li>
<li>The other source or destination file path name parameter that is not a
DDM file, must be the name of an existing DLS object (document in a folder)
and the name must be followed by the string ' FMS'.</li>
<li>The maximum source or target path name length supported by DDM is 63 characters.
The 63 characters do not include the '/QDDM/' or the ' FMS' possible appendages.</li>
<li>In the LODSTRF case (source file path name is a local DLS object and target
file path name is a DDM file), the local DLS document is read starting at
offset zero through the end of the file. Whether the destination file (pointed
to by the DDM file) exists or not is dependent on the target server's stream
file support.</li>
<li>In the ULDSTRF case (source file path name is a DDM file and destination
file path name is a local DLS object), the local or target DLS document must
exist on the <span class="keyword">iSeries</span> and will
have its contents cleared and then written to starting at offset zero.</li>
</ul>
</div>
<div class="section"><p>Here is a copy stream file example that will generate a <span class="cmdname">LODSTRF</span> DDM
command to a remote server:</p>
<pre>CRTDDMF FILE(DDMLIB/DDMFILE) +
RMTFILE(*NONSTD 'TARGET/SYSTEM/
SYNTAX/PATHNAME FMS') RMTLOCNAME(RMTSYSNM)</pre>
</div>
<div class="section"><p>In this example, the local DLS object is 'PATH1/PATH2/FOLDER1/DOC1'.</p>
</div>
<div class="section"><p>You would call QHFCPYSF with the following parameter list:</p>
<pre>1 Source file path name = '/QDDM/PATH1/PATH2/FOLDER1/DOC1 FMS'
2 Source file path name length = 34
3 Copy information = valid HFS value that is ignored by DDM
4 Target file path name = '/QDDM/DDMLIB/DDMFILE'
5 Target file path name length = 20</pre>
</div>
<div class="section"><p>Just reverse the source and destination file path names and lengths
to generate an <span class="cmdname">ULDSTRF</span> DDM command.</p>
</div>
<div class="section"><p>The example program in the following example calls DDM HFS API:</p>
<div class="note"><span class="notetitle">Note:</span> By
using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a></div>
</div>
<div class="example"> <div class="fignone" id="rbae5hfs__rbae5plihfs"><a name="rbae5hfs__rbae5plihfs"><!-- --></a><span class="figcap">Figure 1. Program example</span><pre>/********************************************************************/
/********************************************************************/
/* FUNCTION: This program copies a stream file using the QHFCPYSF */
/* HFS API. */
/* */
/* LANGUAGE: PL/I */
/* */
/* APIs USED: QHFCPYSF */
/* */
/********************************************************************/
/********************************************************************/
TRANSFER: PROCEDURE(SRCFIL,TRGFIL) OPTIONS(MAIN);
/* parameter declarations */
DCL SRCFIL CHARACTER (73);
DCL TRGFIL CHARACTER (73);
/* API entry declarations */
/* */
/* The last parameter, the error code, is declared as FIXED BIN(31) */
/* for the API. This always has a value of zero, specifying that */
/* exceptions should be returned. */
DCL QHFCPYSF ENTRY(CHAR(73),FIXED BIN(31),CHAR(6),CHAR(73),
FIXED BIN(31),FIXED BIN(31))
OPTIONS(ASSEMBLER);
/********************************************************************/
/* Parameters for QHFCPYSF */
/********************************************************************/
DCL srclen FIXED BIN(31);
DCL trglen FIXED BIN(31);
DCL cpyinfo CHAR(6);
DCL error_code FIXED BIN(31);
/********************************************************************/
/* Mainline routine */
/********************************************************************/
srclen = INDEX(SRCFIL,' ') - 1;
trglen = INDEX(TRGFIL,' ') - 1;
cpyinfo = '1 ';
error_code = 0;
/* Copy the stream file */
Call QHFCPYSF(SRCFIL,srclen,cpyinfo,TRGFIL,trglen,
error_code);
END TRANSFER;</pre>
</div>
</div>
<div class="section"><p>Sample command source that can be used with the preceding program:
</p>
<pre>CMD
PARM KWD(SRCFIL) TYPE(*CHAR) LEN(73) +
PROMPT('SOURCE FILE NAME')
PARM KWD(TRGFIL) TYPE(*CHAR) LEN(73) +
PROMPT('TARGET FILE NAME')</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbae5utlang.htm" title="This topic describes the language, utility, and application program support that is provided on the iSeries server for DDM.">Use language, utility, and application support for DDM</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rbae5lodstrf.htm" title="This command sends a whole stream file from the source server to the target server. This command is sent by a source iSeries server when using the copy stream file HPS API.">LODSTRF (Load Stream File) Level 2.0</a></div>
<div><a href="rbae5uldstrf.htm" title="This command sends a document from the target to the source. This command is sent by a source iSeries server when using the Copy Stream File (QHFCPYSF) HFS API.">ULDSTRF (Unload Stream File) Level 2.0</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../apis/hfs1.htm">Hierarchical File System APIs</a></div>
<div><a href="../apiref/api.htm">Application Programming Interfaces</a></div>
</div>
</div>
</body>
</html>