ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QgldExportLdif.htm

594 lines
18 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Export LDIF File (QgldExportLdif)</title>
<!-- Begin Header Records ========================================== -->
<!-- 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. -->
<!-- Direct1 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- 040903 ROCH D3602 v5r4 changes -->
<!--File Edited April 2001 -->
<!-- This file has undergone html cleanup on 2/21/02 by JET -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Export LDIF File (QgldExportLdif)</h2>
<div class="box" style="width: 65%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Input data</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of input data</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Library Name/Service Program: QSYS/QGLDUAPI<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Export LDIF File (QgldExportLdif) API exports the directory server
contents to a Lightweight Directory Access Protocol Data Interchange Format
(LDIF) file.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>Directory Authority</em></dt>
<dd>The caller must provide the administrator DN and password if the caller
does not have *ALLOBJ and *IOSYSCFG special authorities
and
the caller is not a Directory Services administrator. The caller is a Directory
Services administrator if the Directory Services server has been configured to
grant administrator access to authorized users and the caller is authorized to
the 'Directory Services Administrator' function of the operating system.<br>
<br>
</dd>
<dt><em>Object Authorities</em></dt>
<dd>The caller must have Execute (*X) authority to each directory in the path
name preceding the name of the LDIF file. The caller must have Write (*W)
authority to the LDIF file.</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Input data</strong></dt>
<dd>INPUT; CHAR(*)
<p>Input data required to identify the LDIF file and the administrator name and
password. The content and format of this structure are determined by the format
name. See <a href="#HDRGLDEFMT">Format of Input Data</a> for a description of
these formats.</p>
</dd>
<dt><strong>Length of input data</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the input data structure.</p>
</dd>
<dt><strong>Format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The content and format of the input data. The possible format name
follows:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><a href="#ldif0100"><em>LDIF0100</em></a></td>
<td align="left" valign="top">Export LDIF file.</td>
</tr>
<!-- Begin V5R3 change -->
<tr>
<td align="left" valign="top"><a href="#ldif0200"><em>LDIF0200</em></a></td>
<td align="left" valign="top">Export LDIF file with options.</td>
</tr>
<!-- End V5R3 change -->
</table>
<p>See <a href="#HDRGLDEFMT">Format of Input Data</a> for a description of this
format.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3><a name="HDRGLDEFMT">Format of Input Data</a></h3>
<p>For details about the format of the input data, see the following section.
For details about the fields in each format, see <a href="#HDRGLDEFLD">Field
Descriptions</a>.</p>
<br>
<h3><a name="ldif0100">LDIF0100 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Offset to LDIF file</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of LDIF file</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to administrator DN</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of administrator DN</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to administrator password</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of administrator password</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to subtree DN</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of subtree DN</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">LDIF file</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Administrator DN</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Administrator password</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Subtree DN</td>
</tr>
</table>
<h3><a name="ldif0200">LDIF0200 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Offset to LDIF file</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of LDIF file</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to administrator DN</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of administrator DN</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to administrator password</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of administrator password</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to subtree DN</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of subtree DN</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Additional fields indicator</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4">Additional fields if indicator
is equal to 1 or greater:</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Include cn=localhost</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Include cn=pwdpolicy</td>
</tr>
<tr>
<td align="center" valign="top">44</td>
<td align="center" valign="top">2C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Include nested replication contexts</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4">Additional fields if indicator
is equal to 2 or greater:</td>
</tr>
<tr>
<td align="center" valign="top"><img src="delta.gif" alt="Start of change">48</td>
<td align="center" valign="top">30</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Include operational attributes
<img src="deltaend.gif" alt="End of change"></td>
</tr>
<tr>
<td align="left" valign="top" colspan="4">Variable length string fields:</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">LDIF file</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Administrator DN</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Administrator password</td>
</tr>
<tr>
<td align="center" valign="top" colspan="2"></td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Subtree DN</td>
</tr>
</table>
<!-- End V5R3 change -->
<br>
<br>
<h3><a name="HDRGLDEFLD">Field Descriptions</a></h3>
<!-- Begin V5R3 change -->
<p><strong>Additional fields indicator.</strong> Additional fields supplied for a format. See the format descriptions for possible uses and values of this field.</p>
<!-- End V5R3 change -->
<p><strong>Administrator DN.</strong> The distinguished name of the server
administrator. This field is specified in UCS-2 (CCSID 13488).</p>
<p><strong>Administrator password.</strong> The password for the server
administrator. This field is specified in UCS-2 (CCSID 13488).</p>
<!-- Begin V5R3 change -->
<p><strong>Include cn=localhost.</strong> Indicates whether data located under the distinguished name cn=localhost should be included in the exported data. If format LDIF0100 is used, cn=localhost is not included in the exported data. The following
values may be specified:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">The contents of cn=localhost are not included in the exported data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">The contents of cn=localhost are included in the exported data.</td>
</tr>
</table>
<p>The value <em>1</em> can only be specified when no subtree DN is specified.</p>
<p><strong>Include cn=pwdpolicy.</strong> Indicates whether data located under the distinguished name cn=pwdpolicy should be included in the exported data. If format LDIF0100 is used, cn=pwdpolicy is not included in the exported data. The following
values may be specified:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">The contents of cn=pwdpolicy are not included in the exported data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">The contents of cn=pwdpolicy are included in the exported data.</td>
</tr>
</table>
<p>The value <em>1</em> can only be specified when no subtree DN is specified.</p>
<p><strong>Include nested replication contexts.</strong> Indicates whether nested replication contexts should be included in the exported data. For example, if a directory contains the replication contexts o=acme and cn=external users,o=acme, this option can be used to export data under the distinguished name o=acme while excluding all entries under the distinguished name cn=external users,o=acme. If format LDIF0100 is used, nested replication contexts are included in the exported data. The following
values may be specified:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">Data from nested replication contexts is not included in the exported data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Data from nested replication contexts is included in the exported data.</td>
</tr>
</table>
<p>The value <em>0</em> can only be specified if a subtree DN is specified.</p>
<!-- End V5R3 change -->
<p><img src="delta.gif" alt="Start of change"><strong>Include operational attributes.</strong> Indicates whether the following four operational attributes will be exported: <strong>creatorsName</strong>, <strong>createTimestamp</strong>, <strong>modifiersName</strong>, and <strong>modifyTimestamp</strong>.
If no value is specified, these operational attributes will be included in the exported data.
The following values may be specified:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">The operational attributes are not included in the exported data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">The operational attributes are included in the exported data.</td>
</tr>
</table>
<img src="deltaend.gif" alt="End of change">
<p><strong>LDIF file.</strong> The integrated file system path name of the LDIF
file to be used. This field is specified in UCS-2 (CCSID 13488).</p>
<p><strong>Length of administrator DN.</strong> The length, in Unicode
characters, of the administrator DN field.</p>
<p><strong>Length of administrator password.</strong> The length, in Unicode
characters, of the administrator password field.</p>
<p><strong>Length of LDIF file.</strong> The length, in Unicode characters, of
the LDIF file field.</p>
<p><strong>Length of subtree DN.</strong> The length, in Unicode characters, of
the subtree DN field.</p>
<p><strong>Offset to administrator DN.</strong> The offset, in bytes, from the
start of the input data to the administrator DN field.</p>
<p><strong>Offset to administrator password.</strong> The offset, in bytes,
from the start of the input data to the administrator password field.</p>
<p><strong>Offset to LDIF file.</strong> The offset, in bytes, from the start
of the input data to the LDIF file field.</p>
<p><strong>Offset to subtree DN.</strong> The offset, in bytes, from the start
of the input data to the subtree DN field.</p>
<p><strong>Subtree DN.</strong> The distinguished name (DN) of the root of a
directory subtree to export to the LDIF file. This object, and all descendant
objects will be exported. To export the entire directory tree, specify 0 (zero)
for the offset to subtree DN and length of subtree DN fields. This field is
specified in UCS-2 (CCSID 13488).</p>
<br>
<h3>Error Messages</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">GLD0202 E</td>
<td align="left" valign="top">Administrator DN or password not correct.</td>
</tr>
<tr>
<td align="left" valign="top">GLD0213 E</td>
<td align="left" valign="top">Error opening or creating file.</td>
</tr>
<tr>
<td align="left" valign="top">GLD0215 E</td>
<td align="left" valign="top">Server has not been configured.</td>
</tr>
<tr>
<td align="left" valign="top">GLD0218 E</td>
<td align="left" valign="top">*ALLOBJ and *IOSYSCFG special authorities
required.</td>
</tr>
<tr>
<td align="left" valign="top">GLD022B E</td>
<td align="left" valign="top">Cannot find object &amp;1.</td>
</tr>
</table>
<br>
<hr>
API Introduced: V4R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> |
<a href="unix.htm">UNIX-Type APIs</a> |
<a href="aplist.htm">APIs by category</a> </td>
</tr>
</table>
</center>
</body>
</html>