ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/crtdupobj.htm

537 lines
27 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">
<title>Create Duplicate Object (CRTDUPOBJ)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CRTDUPOBJ.Top_Of_Page"></a>
<h2>Create Duplicate Object (CRTDUPOBJ)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Yes
</td>
<td valign="top" align="right">
<a href="#CRTDUPOBJ.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CRTDUPOBJ.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CRTDUPOBJ.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CRTDUPOBJ"></a>
<p>The Create Duplicate Object (CRTDUPOBJ) command copies a single object or a group of objects. It does not create an exact duplicate of files. The newly-created object must be renamed if it is stored in the same library as the original object. If it is stored in a library other than the one that contains the original object, it can retain the name of the original object. You can copy a group of related objects by specifying a generic object name and the library in which the newly-created objects are stored. You can also specify whether data in physical files or save files is copied.
</p>
<p>
<b>Note: </b>The value of the <b>Create authority (CRTAUT)</b> parameter specified on the Create Library (CRTLIB) command for the to-library is not used for the duplicate object. The public and private authorities for the duplicate object will be the same as the original object. The owner of the duplicate object is either the user profile of the user who issues the command or the group profile if the user profile of the user who issues the command is a member user profile that has specified that the group should be the owner.
</p>
<p>When duplicating a file using the CRTDUPOBJ command, the format of the existing file specified for the <b>From object (OBJ)</b> parameter is shared with the newly-created file specified for the <b>New object (NEWOBJ)</b> parameter. When the maximum number (approximately 32K) of file objects that share the same format has been reached, the newly-created file will create a new format instead of sharing the FROM file's format.
</p>
<p>
<b>Note: </b>All of the files that share the same format will be considered related and will be grouped together in the same save list when a save operation is performed.
</p>
<p>When a logical file is copied into another library, two cases determine the basing for the file:
</p>
<ol>
<li>If both the logical file and its based-on physical file are originally in the same library, a duplicate of the physical file must be created in the new library before a duplicate of the logical file is created. After these two duplicates are created, the new logical file is based on the new physical file.
</li>
<li>If the logical file and its based-on physical file are originally in different libraries, it is not necessary to duplicate the physical file before duplicating the logical file. In this case, the duplicated logical file is based on the same physical file as was the original logical file. Unlike the first case, even if the physical file is copied into the new library before the logical file is copied, the duplicated logical file is based on the original physical file, not on the duplicated physical file.
</li>
</ol>
<p>When the CRTDUPOBJ command creates a data base physical file, you can use the <b>Duplicate constraints (CST)</b> parameter to specify whether or not any constraints associated with the existing file are to be associated with the newly-created file. Similarly, you can use the <b>Duplicate triggers (TRG)</b> parameter to specify whether or not any triggers associated with the existing file are to be associated with the newly-created file. Note that there are special considerations of which to be aware relating to the duplication of triggers. For example, the duplication will differ depending on whether or not the trigger program associated with the existing file was in the same library as the existing file.
</p>
<p>
<b>Note: </b>For additional information, see the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>When the object type of the object to be duplicated is an object type which can be journaled, the existence and content of a data area named QDFTJRN in the to-library will determine whether or not journaling is started for the newly-created object.
</p>
<p>
<b>Note: </b>For additional information regarding journaling, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p><b>Restrictions:</b>
</p>
<ol>
<li>You must have use (*USE) and object management (*OBJMGT) authorities for the existing object.
</li>
<li>You must have use (*USE) and add (*ADD) authorities for the library for the new object.
</li>
<li>You must have authorization list management (*AUTLMGT) authority if the object is an authorization list.
</li>
<li>You must have object operational (*OBJOPR) authority for the Create Save File (CRTSAVF) command to create a duplicate save file. The contents of the save file are duplicated when *YES is specified for the <b>Duplicate data (DATA)</b> parameter.
</li>
<li>When an object is to be duplicated, it is created in the same auxiliary storage pool (ASP) as the to-library.
</li>
<li>If *YES is specified for the <b>Duplicate data (DATA)</b> parameter when the CRTDUPOBJ command is used to create a copy of a file, the new duplicate file object is seized (similar to an *EXCL lock with no timeout) for the duration of the data copy making access impossible. An attempt to use a function that refers to the new duplicate file object while the data copy is in progress results in a lock up for that work station until the data copy is completed. The following are examples of functions that should not be used on the new duplicate file object until the data copy is completed:
<ul>
<li>WRKACTJOB (Option 11-Locks; Option 8-WRKOBJLCK)
</li>
<li>DSPDBR
</li>
<li>DSPFD
</li>
<li>DSPFFD
</li>
<li>DSPJOB (Option 12-Locks; F10-Job record locks; Option 14-Open files)
</li>
<li>DSPLIB (The library containing the new duplicate file)
</li>
<li>DSPOBJD
</li>
<li>WRKOBJLCK
</li>
<li>DSPRCDLCK
</li>
<li>Any other function which refers to the new duplicate file
</li>
</ul>
</li>
<li>When duplicating a database file or a save file and storage for the from-library is allocated from a primary or secondary auxiliary storage pool (ASP), storage for the to-library must either be allocated from an ASP in the same ASP group as the storage for the from-library or be allocated from the system ASP (ASP 1) or a basic user ASP (ASPs 2-32). Duplicating a database file or a save file from one ASP group to another ASP group is not supported.
</li>
<li>When creating a duplicate object of type *GSS, *FNTRSC, *FORMDF, *OVL, *CSI, *PAGDFN, or *PAGSEG, the name of the new object cannot exceed 8 characters in length.
</li>
<li>The user space (*USRSPC) and user index (*USRIDX) user domain objects can be copied only into libraries that are permitted in the system value QALWUSRDMN (allow user domain objects in library). However, if the user object was created as a system domain object, it is not restricted.
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CRTDUPOBJ.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.OBJ"><b>OBJ</b></a></td>
<td valign="top">From object</td>
<td valign="top"><i>Generic name, name</i>, *ALL</td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.FROMLIB"><b>FROMLIB</b></a></td>
<td valign="top">From library</td>
<td valign="top"><i>Name</i>, *LIBL, *CURLIB</td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.OBJTYPE"><b>OBJTYPE</b></a></td>
<td valign="top">Object type</td>
<td valign="top">Single values: *ALL<br>Other values (up to 57 repetitions): *ALRTBL, *AUTL, *BNDDIR, *CHTFMT, *CLD, *CLS, *CMD, *CRQD, *CSI, *CSPMAP, *CSPTBL, *DTAARA, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *JOBD, *JOBQ, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODULE, *MSGF, *MSGQ, *M36CFG, *NODGRP, *NODL, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *SBSD, *SCHIDX, *SRVPGM, *SSND, *TBL, *USRIDX, *USRSPC, *VLDL, *WSCST</td>
<td valign="top">Required, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.TOLIB"><b>TOLIB</b></a></td>
<td valign="top">To library</td>
<td valign="top"><i>Name</i>, <b><u>*FROMLIB</u></b>, *SAME, *CURLIB</td>
<td valign="top">Optional, Positional 4</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.NEWOBJ"><b>NEWOBJ</b></a></td>
<td valign="top">New object</td>
<td valign="top"><i>Name</i>, <b><u>*OBJ</u></b>, *SAME</td>
<td valign="top">Optional, Positional 5</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.ASPDEV"><b>ASPDEV</b></a></td>
<td valign="top">From ASP device</td>
<td valign="top"><i>Name</i>, <b><u>*</u></b>, *CURASPGRP, *SYSBAS</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.TOASPDEV"><b>TOASPDEV</b></a></td>
<td valign="top">To ASP device</td>
<td valign="top"><i>Name</i>, <b><u>*ASPDEV</u></b>, *, *CURASPGRP, *SYSBAS</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.DATA"><b>DATA</b></a></td>
<td valign="top">Duplicate data</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.CST"><b>CST</b></a></td>
<td valign="top">Duplicate constraints</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTDUPOBJ.TRG"><b>TRG</b></a></td>
<td valign="top">Duplicate triggers</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CRTDUPOBJ.OBJ"></a>
<h3>From object (OBJ)</h3>
<p>Specifies one or more objects to be duplicated.
</p>
<p>This is a required parameter.
</p>
<dl>
<dt><b>*ALL</b></dt>
<dd>All the objects in the specified library for which you have authority and of the object type specified for the <b>Object type (OBJTYPE)</b> parameter are duplicated.
</dd>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify a group of objects in the specified library to be duplicated. A generic object name is specified as a character string that contains one or more characters followed by an asterisk (*); for example, ABC*. A generic name specifies all objects that begin with the same prefix as the generic object name for which you have the proper authority.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the specific object to be duplicated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.FROMLIB"></a>
<h3>From library (FROMLIB)</h3>
<p>Specifies the library that contains the objects to be duplicated.
</p>
<p>This is a required parameter.
</p>
<dl>
<dt><b>*LIBL</b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
<p>
<b>Note: </b>*LIBL can be specified for a specific object and a single, specific object type.
</p>
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is searched to find the objects to be duplicated. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library that is searched to find the objects to be duplicated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.OBJTYPE"></a>
<h3>Object type (OBJTYPE)</h3>
<p>Specifies the type of the object to be duplicated. This parameter can be specified as a single value or as a list of one or more object types.
</p>
<p>To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt). For a description of the object types, see "Object types" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*ALL</b></dt>
<dd>All object types that have the specified name in the specified library for which you have authority are duplicated. If *ALL is also specified for the <b>From object (OBJ)</b> parameter, all the objects in the specified library for which you have authority and that are of the types that can be duplicated are duplicated.
</dd>
</dl>
<p><b>Other values</b>
</p>
<dl>
<dt><b><i>object-type</i></b></dt>
<dd>Specify one or more values for the types of object that are to be duplicated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.TOLIB"></a>
<h3>To library (TOLIB)</h3>
<p>Specifies the library in which the duplicate object is to be created.
</p>
<p>
<b>Note: </b>If the library is in an auxiliary storage pool (ASP), the object to be duplicated must be a valid object type that can reside in an ASP. If this object type is not a valid type that can reside in an ASP, an error message is sent.
</p>
<dl>
<dt><b><u>*FROMLIB</u></b></dt>
<dd>The library containing the new object will have the same name as the library containing the original object. Note that this is not necessarily the same library as the library containing the original object. If the <b>From ASP device (ASPDEV)</b> parameter and the <b>To ASP device (TOASPDEV)</b> parameter describe the same auxiliary storage pool (ASP) device, it is the same library. If it is the same library, a name different from the name of the original object must be assigned to the new object with the <b>New object (NEWOBJ)</b> parameter. If the ASPDEV parameter and the TOASPDEV parameter describe different ASP devices, it is a different library (with the same library name) on the different ASP device.
</dd>
<dt><b>*SAME</b></dt>
<dd>See *FROMLIB above. *SAME and *FROMLIB have the same meaning.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread will contain the new object. If no library is specified as the current library for the thread, the QGPL library is used. If *CURLIB is specified for this parameter, either the <b>To ASP device (TOASPDEV)</b> parameter must be *, or the TOASPDEV parameter must be *ASPDEV and the <b>From ASP device (ASPDEV)</b> parameter must be *.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to contain the new object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.NEWOBJ"></a>
<h3>New object (NEWOBJ)</h3>
<p>Specifies name of the new object. A name must be specified here if *SAME or *FROMLIB is specified for the <b>To library (TOLIB)</b> parameter and the same auxiliary storage pool device is specified for both the <b>From ASP device (ASPDEV)</b> parameter and the <b>To ASP device (TOASPDEV)</b> parameter. The names of members in a database file to be duplicated remain the same in the new file.
</p>
<dl>
<dt><b><u>*OBJ</u></b></dt>
<dd>The new object has the same name as the original object. If this is specified, the new object and original object must reside in different libraries.
</dd>
<dt><b>*SAME</b></dt>
<dd>See *OBJ above. *SAME and *OBJ have the same meaning.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the new object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.ASPDEV"></a>
<h3>From ASP device (ASPDEV)</h3>
<p>Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library containing the object to be duplicated (the <b>From library (FROMLIB)</b> parameter). If the library is in an ASP that is not part of the thread's library name space, this parameter must be specified to ensure the correct object is duplicated. If this parameter is used when *LIBL or *CURLIB is specified for the FROMLIB parameter, * is the only valid value.
</p>
<dl>
<dt><b><u>*</u></b></dt>
<dd>The ASPs that are currently part of the thread's library name space will be searched to find the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.
</dd>
</dl>
<dl>
<dt><b>*CURASPGRP</b></dt>
<dd>If the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group will be searched to find the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched. If no ASP group is associated with the thread an error will be issued.
</dd>
</dl>
<dl>
<dt><b>*SYSBAS</b></dt>
<dd>The system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to find the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the primary or secondary ASP device to be searched to find the library. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.
<p>
<b>Note: </b>To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.TOASPDEV"></a>
<h3>To ASP device (TOASPDEV)</h3>
<p>Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library to contain the new object (the <b>To library (TOLIB)</b> parameter). If the library is in an ASP that is not part of the thread's library name space, this parameter must be specified to ensure the object is duplicated into the correct library. If this parameter is used when *CURLIB is specified for the TOLIB parameter, either TOASPDEV(*) must be specified or TOASPDEV(*ASPDEV) must be specified and the <b>From ASP device (ASPDEV)</b> parameter must be *.
</p>
<dl>
<dt><b><u>*ASPDEV</u></b></dt>
<dd>The ASP device specified for the ASPDEV parameter will be searched to find the library.
</dd>
<dt><b>*</b></dt>
<dd>The ASPs that are currently part of the thread's library name space will be searched to find the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.
</dd>
</dl>
<dl>
<dt><b>*CURASPGRP</b></dt>
<dd>If the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group will be searched to find the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched. If no ASP group is associated with the thread an error will be issued.
</dd>
</dl>
<dl>
<dt><b>*SYSBAS</b></dt>
<dd>The system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to find the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>The name of the primary or secondary ASP device to be searched to find the library. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.
<p>
<b>Note: </b>To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.DATA"></a>
<h3>Duplicate data (DATA)</h3>
<p>Specifies whether the data records in database physical files or save files are copied to the new object. Members of database physical files are copied whether or not the data contained in them is copied.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The data records in the members of database physical files or save files are not copied to the new object.
</dd>
<dt><b>*YES</b></dt>
<dd>The data records in the members of database physical files or save files are copied to the new object.
<p><b>NOTES:</b>
</p>
<ol>
<li>A file cannot be duplicated while it is in use for update by another job.
</li>
<li>The relative record numbers in the new file are the same as those in the original file.
</li>
</ol>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.CST"></a>
<h3>Duplicate constraints (CST)</h3>
<p>Specifies whether any constraints associated with existing database physical files are copied to the newly-created files. The specified value is not used for objects which are not database physical files.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The constraints associated with an existing database physical file are copied to the newly-created file.
</dd>
<dt><b>*NO</b></dt>
<dd>The constraints associated with an existing database physical file are not copied to the newly-created file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTDUPOBJ.TRG"></a>
<h3>Duplicate triggers (TRG)</h3>
<p>Specifies whether any triggers associated with existing database physical files are copied to the newly-created files. The specified value is not used for objects which are not database physical files.
</p>
<p>
<b>Note: </b>There are special considerations of which to be aware relating to the duplication of triggers. For example, the duplication will differ depending on whether or not the trigger program associated with the existing file was in the same library as the existing file. For additional information, see the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The triggers associated with an existing database physical file are copied to the newly-created file.
</dd>
<dt><b>*NO</b></dt>
<dd>The triggers associated with an existing database physical file are not copied to the newly-created file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTDUPOBJ.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Duplicating a File Including the Data Records, Constraints, and Triggers</b>
</p>
<p>
<pre>
CRTDUPOBJ OBJ(FILEA) FROMLIB(LIB1) OBJTYPE(*FILE)
TOLIB(LIB2) DATA(*YES)
</pre>
</p>
<p>The file named FILEA in library LIB1 is duplicated and stored in library LIB2. Authorities granted for FILEA are granted to the new FILEA in LIB2. The data records, constraints, and triggers associated with FILEA in library LIB1 are copied to FILEA in LIB2.
</p>
<p><b>Example 2: Duplicating a File Without the Data Records, Constraints, and Triggers</b>
</p>
<p>
<pre>
CRTDUPOBJ OBJ(FILEB) FROMLIB(LIB3) OBJTYPE(*FILE)
NEWOBJ(FILEDUP) DATA(*NO) CST(*NO) TRG(*NO)
</pre>
</p>
<p>The file named FILEB in library LIB3 is duplicated in library LIB3 as FILEDUP. Authorities granted for FILEB are granted to the new FILEDUP in LIB3. The data records, constraints, and triggers associated with FILEB in library LIB3 are not copied to FILEDUP in LIB3.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTDUPOBJ.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPFB8ED</b></dt>
<dd>Device description &amp;1 not correct for operation.
</dd>
<dt><b>CPF2105</b></dt>
<dd>Object &amp;1 in &amp;2 type *&amp;3 not found.
</dd>
<dt><b>CPF2109</b></dt>
<dd>NEWOBJ must be *SAME when OBJ parameter is *ALL or generic name.
</dd>
<dt><b>CPF2110</b></dt>
<dd>Library &amp;1 not found.
</dd>
<dt><b>CPF2113</b></dt>
<dd>Cannot allocate library &amp;1.
</dd>
<dt><b>CPF2116</b></dt>
<dd>DATA(*YES) specified and *ALL or *FILE not in OBJTYPE list.
</dd>
<dt><b>CPF2122</b></dt>
<dd>Storage limit exceeded for user profile &amp;1.
</dd>
<dt><b>CPF2123</b></dt>
<dd>No objects of specified name or type exist in library &amp;2.
</dd>
<dt><b>CPF2130</b></dt>
<dd>&amp;1 objects duplicated. &amp;2 objects not duplicated.
</dd>
<dt><b>CPF2151</b></dt>
<dd>Operation failed for &amp;2 in &amp;1 type *&amp;3.
</dd>
<dt><b>CPF2152</b></dt>
<dd>Objects of type *&amp;1 cannot be created into QTEMP.
</dd>
<dt><b>CPF2155</b></dt>
<dd>*LIBL cannot be specified for FROMLIB.
</dd>
<dt><b>CPF216C</b></dt>
<dd>TOASPDEV value not allowed with TOLIB(*CURLIB).
</dd>
<dt><b>CPF216D</b></dt>
<dd>TOLIB, NEWOBJ, or TOASPDEV parameter not correct.
</dd>
<dt><b>CPF2160</b></dt>
<dd>Object type *&amp;1 not eligible for requested function.
</dd>
<dt><b>CPF2162</b></dt>
<dd>Duplication of all objects in library &amp;1 not allowed.
</dd>
<dt><b>CPF2173</b></dt>
<dd>Value for ASPDEV not valid with special value for library.
</dd>
<dt><b>CPF2176</b></dt>
<dd>Library &amp;1 damaged.
</dd>
<dt><b>CPF218C</b></dt>
<dd>&amp;1 not a primary or secondary ASP.
</dd>
<dt><b>CPF2182</b></dt>
<dd>Not authorized to library &amp;1.
</dd>
<dt><b>CPF2185</b></dt>
<dd>TOLIB, TOASPDEV, or NEWOBJ parameter not correct.
</dd>
<dt><b>CPF2186</b></dt>
<dd>Object &amp;1 cannot be created into library &amp;2.
</dd>
<dt><b>CPF9806</b></dt>
<dd>Cannot perform function for object &amp;2 in library &amp;3.
</dd>
<dt><b>CPF9814</b></dt>
<dd>Device &amp;1 not found.
</dd>
<dt><b>CPF9825</b></dt>
<dd>Not authorized to device &amp;1.
</dd>
<dt><b>CPF9827</b></dt>
<dd>Object &amp;1 cannot be created or moved into &amp;2.
</dd>
<dt><b>CPF9833</b></dt>
<dd>*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTDUPOBJ.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>