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

685 lines
35 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Change Attribute (CHGATR)</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="CHGATR.Top_Of_Page"></a>
<h2>Change Attribute (CHGATR)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Conditional
</td>
<td valign="top" align="right">
<a href="#CHGATR.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CHGATR.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CHGATR.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CHGATR"></a>
<p>The Change Attribute (CHGATR) command allows a single attribute to be changed for a single object or a group of objects. An object name pattern can be used to change a single attribute for a group of related objects.
</p>
<p>The CHGATR command can also be used to change an attribute of a directory tree where the directory, its contents, and the contents of all of its subdirectories have the attribute changed. A subtree change attribute will attempt to change the attribute for as many objects as possible. A diagnostic message will be sent for each object that could not have its attribute changed and when all of the objects have been attempted, an escape message will be sent. If all of the objects had the attribute changed with no errors, then a completion message will be sent.
</p>
<p>For more information about integrated file system commands, see the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p><b>Restrictions:</b>
</p>
<ol>
<li>The user must have execute (*X) authority to the directories in the path name prefixes, except when changing the *CRTOBJAUD attribute.
</li>
<li>When doing subtree processing, the user must have read (*R) and *X authorities to the path name and all subdirectories within that path, except when changing the *CRTOBJAUD attribute.
</li>
<li>The user must have all object (*ALLOBJ) and security administrator (*SECADM) special authorities when changing the *CRTOBJSCAN or *SCAN attributes.
</li>
<li>The user must either own the object or have all object (*ALLOBJ) special authority in order to set the *RSTDRNMUNL, *SETUID, and *SETGID attributes for that object.
</li>
<li>The user must have audit (*AUDIT) special authority in order to set the *CRTOBJAUD attribute for the directory object.
</li>
<li>For all file systems, except QSYS.LIB, independent ASP QSYS.LIB, and QDLS, the user must have object management (*OBJMGT) authority to the object when changing the *ALWCKPWRT, *ALWSAV, *USECOUNT, *DISKSTGOPT or *MAINSTGOPT attributes.
</li>
<li>For all file systems, except QSYS.LIB, independent ASP QSYS.LIB, and QDLS, the user must have write (*W) authority to the object when changing any attribute unless noted otherwise.
</li>
<li>Changing attribute *ALWCKPWRT for a directory object fails and returns error messages CPFA0AD and CPFB414.
</li>
<li>QSYS.LIB and independent ASP QSYS.LIB file systems require the user to have object operational (*OBJOPR) and object management (*OBJMGT) authorities to change the *USECOUNT attribute if the object type is *FILE, to have *X and *OBJMGT authorities to change *USECOUNT if the object is a database file member, and to have *OBJMGT authority to change *USECOUNT if the object is neither a *FILE or database file member.
</li>
<li>QDLS file system requires the user to have *W and *OBJMGT authorities to change the *USECOUNT attribute.
</li>
<li>This command is conditionally threadsafe. The following restriction applies:
<p>This command is not threadsafe if the object on which this function is operating resides in a file system that is not threadsafe. Only the following file systems are threadsafe for this function:
</p>
<ul>
<li>"Root" (/)
</li>
<li>QOpenSys
</li>
<li>User-defined
</li>
<li>QNTC
</li>
<li>QSYS.LIB
</li>
<li>Independent ASP QSYS.LIB
</li>
<li>QOPT
</li>
<li>Network File System
</li>
<li>QFileSvr.400
</li>
</ul>
</li>
</ol>
<p><b>"Root" (/), QOpenSys, and User-Defined File System Differences</b>
</p>
<ul>
<li>The *USECOUNT attribute is supported for objects of type *STMF only. Attempts to set them on other objects will result in the operation failing.
</li>
<li>The *YES value cannot be specified for the *ALWSAV attribute for /dev/null, /dev/zero or objects of type *SOCKET. Attempts to set it on these objects will result in the operation failing.
</li>
<li>The *SETGID attribute of the directory affects what the group ID (GID) is for objects that are created in the directory. If the *SETGID attribute of the parent directory is off, the GID is set to the effective GID of the thread creating the object. If the *SETGID attribute of the parent directory is on, the GID of the new object is set to the GID of the parent directory. For all other file systems, the GID of the new object is set to the GID of the parent directory.
</li>
<li>When setting the *RSTDRNMUNL, *SETUID, or *SETGID attributes on an object that has a primary group, it must match the primary group ID or one of the supplemental group IDs of the caller of this command; otherwise, the *SETGID attribute is set to *NO.
</li>
</ul>
<p><b>QSYS.LIB and Independent ASP QSYS.LIB File System Differences</b>
</p>
<ul>
<li>The following attributes may be set on objects in these file systems:
<ul>
<li>*CRTOBJAUD
</li>
<li>*USECOUNT
<p>When the *USECOUNT attribute of a database file is set, all members in that file will have their days used count reset to 0 also.
</p>
</li>
</ul>
</li>
<li>QSYS.LIB and Independent ASP QSYS.LIB do not support setting the *SETUID or *SETGID attributes. They will be ignored if specified.
</li>
<li>Attempting to set any other attribute will result in the operation failing.
</li>
</ul>
<p><b>Network File System Differences</b>
</p>
<ul>
<li>When the following attributes are specified for objects in the Network File System, the operation will fail if the attribute is not set to the following attribute value.
<ul>
<li>If set, *READONLY must be set to an attribute value of *NO.
</li>
<li>If set, *HIDDEN must be set to an attribute value of *NO.
</li>
<li>If set, *PCSYSTEM must be set to an attribute value of *NO.
</li>
<li>If set, *PCARCHIVE must be set to an attribute value of *NO; however, if the object is of type *STMF, the attribute value must be *YES.
</li>
<li>If set, *SYSARCHIVE must be set to an attribute value of *NO.
</li>
</ul>
<p>The *USECOUNT, *CCSID, *ALWSAV, *ALWCKPWRT, *DISKSTGOPT, *MAINSTGOPT, *CRTOBJAUD attributes cannot be set on objects within the Network File System or they will result in the operation failing.
</p>
</li>
<li>The NFS client supports the *SETUID, *SETGID, and *RSTDRNMUNL attributes by passing them to the server over the network and surfacing them to the caller. Whether a particular network file system supports the setting of these attributes depends on the server. Most servers have the capability of masking off the *SETUID and *SETGID attributes if the NOSUID option is specified on the export. The default, however, is to support these attributes.
</li>
</ul>
<p><b>QNetWare File System Differences</b>
</p>
<ul>
<li>The QNetWare File System does not support setting the *SYSARCHIVE, *USECOUNT, *RSTDRNMUNL or *CRTOBJAUD attributes. If these attributes are specified for a NetWare Directory Services (NDS) object, the operation will fail.
</li>
<li>QNetWare supports the *SETUID and *SETGID attributes by passing them to the server and surfacing them to the caller. Some versions of NetWare may support the attributes and others may not.
</li>
</ul>
<p><b>QOPT File System Differences</b>
</p>
<ul>
<li>If *YES is specified for the *ALWSAV attribute, the operation will fail.
</li>
<li>QOPT does not support setting the *SETUID, *SETGID, *RSTDRNMUNL and *CRTOBJAUD attributes for any optical media format. If any of these attributes are specified, the operation will fail.
</li>
</ul>
<p><b>QDLS File System Differences:</b>
</p>
<ul>
<li>The following attributes may be set on objects in this file system:
<ul>
<li>*CCSID
</li>
<li>*HIDDEN
</li>
<li>*PCARCHIVE
</li>
<li>*READONLY
</li>
<li>*SYSARCHIVE
</li>
<li>*USECOUNT (for documents only)
</li>
</ul>
<p>Attempting to set any other attribute other than the *SETUID or *SETGID attributes will result in the operation failing.
</p>
</li>
<li>QDLS does not support setting the *SETUID or *SETGID attributes. They will be ignored if specified.
</li>
</ul>
<p><b>QFileSvr.400 Differences</b>
</p>
<ul>
<li>QFileSvr.400 supports the *SETUID, *SETGID, and *RSTDRNMUNL attributes by passing them to the server and surfacing them to the caller.
</li>
<li>QFileSvr.400 does not support setting the *ALWSAV attribute. The operation will fail if this attribute is specified.
</li>
<li>QFileSvr.400 supports setting the *CRTOBJAUD attribute. However, the QSECOFR user profiles on the source and target system must be enabled, and their passwords must match for the operation to succeed.
</li>
</ul>
<p><b>QNTC Differences</b>
</p>
<ul>
<li>QNTC supports the setting of the following attributes by passing them to the server and surfacing them to the caller.
<ul>
<li>*HIDDEN
</li>
<li>*READONLY
</li>
<li>*PCARCHIVE
</li>
<li>*PCSYSTEM
</li>
</ul>
<p>Attempting to set any other attribute other than the *SETUID or *SETGID attributes will result in the operation failing.
</p>
</li>
<li>QNTC does not support setting the *SETUID or *SETGID attributes. They will be ignored if specified.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CHGATR.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="#CHGATR.OBJ"><b>OBJ</b></a></td>
<td valign="top">Object</td>
<td valign="top"><i>Path name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#CHGATR.ATR"><b>ATR</b></a></td>
<td valign="top">Attribute</td>
<td valign="top">*READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *CCSID, *ALWCKPWRT, *USECOUNT, *DISKSTGOPT, *MAINSTGOPT, *CRTOBJSCAN, *SCAN, *ALWSAV, *RSTDRNMUNL, *SETUID, *SETGID, *CRTOBJAUD</td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#CHGATR.VALUE"><b>VALUE</b></a></td>
<td valign="top">New value</td>
<td valign="top">1-65533, *YES, *NO, *RESET, *NORMAL, *MINIMIZE, *DYNAMIC, *CHGONLY, *SYSVAL, *NONE, *USRPRF, *ALL, *CHANGE</td>
<td valign="top">Required, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#CHGATR.SUBTREE"><b>SUBTREE</b></a></td>
<td valign="top">Directory subtree</td>
<td valign="top"><b><u>*NONE</u></b>, *ALL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CHGATR.SYMLNK"><b>SYMLNK</b></a></td>
<td valign="top">Symbolic link</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CHGATR.OBJ"></a>
<h3>Object (OBJ)</h3>
<p>Specifies the path name of the object or a pattern to match the name of the objects to have the attribute changed. The object path name can be either a simple name or a name that is qualified with the name of the directory in which the object is located. A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes.
</p>
<p>For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGATR.ATR"></a>
<h3>Attribute (ATR)</h3>
<p>Specifies the attribute to be changed.
</p>
<dl>
<dt><b>*READONLY</b></dt>
<dd>Whether the object can be written to or deleted, have its extended attributes changed or deleted, or have its size changed.
<p>Allowed values for the <b>New value (VALUE)</b> parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object cannot be changed or deleted.
</dd>
<dt><b>*NO</b></dt>
<dd>The object can be changed or deleted.
</dd>
</dl>
</dd>
<dt><b>*HIDDEN</b></dt>
<dd>Whether the object can be displayed using an ordinary directory list.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object is hidden and cannot be displayed using an ordinary directory listing.
</dd>
<dt><b>*NO</b></dt>
<dd>The object is not hidden and can be displayed using an ordinary directory listing.
</dd>
</dl>
</dd>
<dt><b>*PCSYSTEM</b></dt>
<dd>Whether the object is a PC system file and is excluded from normal directory searches.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object is a PC system file.
</dd>
<dt><b>*NO</b></dt>
<dd>The object is not a PC system file.
</dd>
</dl>
</dd>
<dt><b>*PCARCHIVE</b></dt>
<dd>Whether the object has changed since the last time the file was saved or reset by a PC client.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object has changed.
</dd>
<dt><b>*NO</b></dt>
<dd>The object has not changed.
</dd>
</dl>
</dd>
<dt><b>*SYSARCHIVE</b></dt>
<dd>Whether the object has changed and needs to be saved. It is set on when an object's change time is updated, and set off when the object has been saved.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object has changed and does need to be saved.
</dd>
<dt><b>*NO</b></dt>
<dd>The object has not changed and does not need to be saved.
</dd>
</dl>
</dd>
<dt><b>*CCSID</b></dt>
<dd>The coded character set identifier (CCSID) of the data and extended attributes of the object.
<p>
<b>Note: </b>Changing the CCSID does not convert the data or the extended attributes. Changing the CCSID only changes the value associated with the object. This also applies to the data contained in the extended attributes associated with the object.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>1-65533</b></dt>
<dd>The CCSID of the data and extended attributes of the object.
</dd>
</dl>
</dd>
<dt><b>*ALWCKPWRT</b></dt>
<dd>Whether the stream file (*STMF) can be shared with readers and writers during the save-while-active checkpoint processing. Changing this attribute's current value may cause unexpected results. Please refer to the Backup and Recovery book, SC41-5304 for details on this attribute.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object can be shared with readers and writers.
</dd>
<dt><b>*NO</b></dt>
<dd>The object can be shared with readers only.
</dd>
</dl>
</dd>
<dt><b>*USECOUNT</b></dt>
<dd>The count of the number of days an object has been used. Usage has different meanings according to the file system and according to the individual object types supported within a file system. Usage can indicate opening or closing of a file or can refer to adding links, renaming, restoring, or checking out of an object. When this attribute is changed, the count of the number of days used will be reset to zero and the use count date will be set to the current date.
<p>Allowed value for the VALUE parameter is:
</p>
<dl>
<dt><b>*RESET</b></dt>
<dd>The count of the number of days used will be reset to zero and the use count date will be set to the current date.
</dd>
</dl>
</dd>
<dt><b>*DISKSTGOPT</b></dt>
<dd>This determines how auxiliary storage is allocated by the system for the specified object. The option will take effect immediately and be part of the next auxiliary storage allocation for the object. This option can only be specified for stream files in the "root" (/), QOpenSys and user-defined file systems. This option will be ignored for *TYPE1 byte stream files.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*NORMAL</b></dt>
<dd>The auxiliary storage will be allocated normally. That is, as additional auxiliary storage is required, it will be allocated in logically sized extents to accommodate the current space requirement, and anticipated future requirements, while minimizing the number of disk input/output (I/O) operations. If the *DISKSTGOPT attribute has not been specified for an object, this value is the default.
</dd>
<dt><b>*MINIMIZE</b></dt>
<dd>The auxiliary storage will be allocated to minimize the space used by the object. That is, as additional auxiliary storage is required, it will be allocated in small sized extents to accommodate the current space requirement. Accessing an object composed of many small extents may increase the number of disk I/O operations for that object.
</dd>
<dt><b>*DYNAMIC</b></dt>
<dd>The system will dynamically determine the optimum auxiliary storage allocation for the object, balancing space used versus disk I/O operations. For example, if a file has many small extents, yet is frequently being read and written, then future auxiliary storage allocations will be larger extents to minimize the number of disk I/O operations. Or, if a file is frequently truncated, then future auxiliary storage allocations will be small extents to minimize the space used. Additionally, information will be maintained on the stream file sizes for this system and its activity. This file size information will also be used to help determine the optimum auxiliary storage allocations for this object as it relates to the other objects sizes.
</dd>
</dl>
</dd>
<dt><b>*MAINSTGOPT</b></dt>
<dd>This determines how main storage is allocated and used by the system for the specified object. The option will take effect the next time the specified object is opened. This option can only be specified for stream files in the "root" (/), QOpenSys and user-defined file systems.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*NORMAL</b></dt>
<dd>The main storage will be allocated normally. That is, as much main storage as possible will be allocated and used. This minimizes the number of disk I/O operations since the information is cached in main storage. If the *MAINSTGOPT attribute has not been specified for an object, this value is the default.
</dd>
<dt><b>*MINIMIZE</b></dt>
<dd>The main storage will be allocated to minimize the space used by the object. That is, as little main storage as possible will be allocated and used. This minimizes main storage usage while increasing the number of disk I/O operations since less information is cached in main storage.
</dd>
<dt><b>*DYNAMIC</b></dt>
<dd>The system will dynamically determine the optimum main storage allocation for the object depending on other system activity and main storage contention. That is, when there is little main storage contention, as much storage as possible will be allocated and used to minimize the number of disk I/O operations. And when there is significant main storage contention, less main storage will be allocated and used to minimize the main storage contention. This option only has an effect when the storage pool's paging option is *CALC. When the storage pool's paging option is *FIXED, the behavior is the same as *NORMAL. When the object is accessed thru a file server, this option has no effect. Instead, its behavior is the same as *NORMAL.
</dd>
</dl>
</dd>
<dt><b>*CRTOBJSCAN</b></dt>
<dd>Specifies whether the objects created in a directory will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
<p>The integrated file system scan-related exit points are:
</p>
<ul>
<li>QIBM_QP0L_SCAN_OPEN - Integrated File System Scan on Open Exit Program
</li>
<li>QIBM_QP0L_SCAN_CLOSE - Integrated File System Scan on Close Exit Program
</li>
</ul>
<p>For details on these exit points, see the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>This option can only be specified for directories in the "root" (/), QOpenSys and user-defined file systems. Even though this attribute can be set for *TYPE1 and *TYPE2 directories, only objects which are in *TYPE2 directories will actually be scanned, no matter what value is set for this attribute.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>After an object is created in the directory, the object will be scanned according to the rules described in the scan related exit programs if the object has been modified or if the scanning software has been updated since the last time the object was scanned. If the *CRTOBJSCAN attribute has not been specified for a directory, this value is the default.
</dd>
<dt><b>*NO</b></dt>
<dd>After an object is created in the directory, the object will not be scanned by the scan-related exit programs.
<p>
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
</p>
</dd>
<dt><b>*CHGONLY</b></dt>
<dd>After an object is created in the directory, the object will be scanned according to the rules described in the scan-related exit programs only if the object has been modified since the last time the object was scanned. It will not be scanned if the scanning software has been updated. This attribute only takes effect if the Scan file systems control (QSCANFSCTL) system value has *USEOCOATR specified. Otherwise, it will be treated as if the attribute is *YES.
<p>
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
</p>
</dd>
</dl>
</dd>
<dt><b>*SCAN</b></dt>
<dd>Specifies whether the object will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
<p>The integrated file system scan-related exit points are:
</p>
<ul>
<li>QIBM_QP0L_SCAN_OPEN - Integrated File System Scan on Open Exit Program
</li>
<li>QIBM_QP0L_SCAN_CLOSE - Integrated File System Scan on Close Exit Program
</li>
</ul>
<p>For details on these exit points, see the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>This option can only be specified for stream files in the "root" (/), QOpenSys, and user-defined file systems that are not virtual volumes or network server storage spaces. Even though this attribute can be set for *TYPE1 and *TYPE2 directories, only objects which are in *TYPE2 directories will actually be scanned, no matter what value is set for this attribute.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object will be scanned according to the rules described in the scan related exit programs if the object has been modified or if the scanning software has been updated since the last time the object was scanned. If the *SCAN attribute has not been specified for an object, this value is the default.
</dd>
<dt><b>*NO</b></dt>
<dd>The object will not be scanned by the scan-related exit programs.
<p>
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
</p>
</dd>
<dt><b>*CHGONLY</b></dt>
<dd>The object will be scanned according to the rules described in the scan-related exit programs only if the object has been modified since the last time the object was scanned. It will not be scanned if the scanning software has been updated. This attribute only takes effect if the Scan file systems control (QSCANFSCTL) system value has *USEOCOATR specified. Otherwise, it will be treated as if the attribute is *YES.
<p>
<b>Note: </b>If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
</p>
</dd>
</dl>
</dd>
<dt><b>*ALWSAV</b></dt>
<dd>Specifies whether the object can be saved or not.
<p>
<b>Note: </b>It is highly recommended that this attribute not be changed for any system created objects.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>This object will be saved when using the Save Object (SAV) command or the QsrSave() API. If the *ALWSAV attribute has not been specified for an object, this value is the default.
</dd>
<dt><b>*NO</b></dt>
<dd>This object will not be saved when using the SAV command or the QsrSave() API.
<p>Additionally, if this object is a directory, none of the objects in the directory's subtree will be saved unless they were explicitly specified as an object to be saved. The subtree includes all subdirectories and the objects within those subdirectories.
</p>
<p>
<b>Note: </b>If this attribute is chosen for an object that has private authorities associated with it, or is chosen for the directory of an object that has private authorities associated with it, then the following consideration applies. When the private authorities are saved, the fact that an object has the *ALWSAV attribute as No is not taken into consideration. (Private authorities can be saved using either the Save System (SAVSYS) or Save Security Data (SAVSECDTA) command or the Save Object List (QSRSAVO) API.) Therefore, when a private authority is restored using the Restore Authority (RSTAUT) command, message CPD3776 will be seen for each object that was not saved either because it had the *ALWSAV attribute specified as No, or because the object was not specified on the save and it was in a directory that had the *ALWSAV attribute specified as No.
</p>
</dd>
</dl>
</dd>
<dt><b>*RSTDRNMUNL</b></dt>
<dd>Restricted renames and unlinks for objects within a directory. Objects can be linked into a directory that has this attribute set on, but cannot be renamed or unlinked from it unless one or more of the following are true for the user performing the operation:
<ol>
<li>The user is the owner of the object.
</li>
<li>The user is the owner of the directory.
</li>
<li>The user has all object (*ALLOBJ) special authority.
</li>
</ol>
<p>This restriction only applies to directories. Other types of object can have this attribute set on, however, it will be ignored. In addition, this attribute can only be specified for objects within the Network File System (NFS), QFileSvr.400, "root" (/), QOpenSys, or user-defined file systems. Both the NFS and QFileSvr.400 file systems support this attribute by passing it to the server and surfacing it to the caller. This attribute is also equivalent to the S_ISVTX mode bit for an object.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>Additional restrictions for rename and unlink operations.
</dd>
<dt><b>*NO</b></dt>
<dd>No additional restrictions for rename and unlink operations.
</dd>
</dl>
</dd>
<dt><b>*SETUID</b></dt>
<dd>Set effective user ID (UID) at execution time. This value is ignored if the specified object is a directory.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>The object owner is the effective UID at execution time.
</dd>
<dt><b>*NO</b></dt>
<dd>The UID is not set at execution time.
</dd>
</dl>
</dd>
<dt><b>*SETGID</b></dt>
<dd>Set effective group ID (GID) at execution time.
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>If the object is a file, the GID is set at execution time. If the object is a directory, the GID of objects created in the directory is set to the GID of the parent directory.
</dd>
<dt><b>*NO</b></dt>
<dd>If the object is a file, the GID is not set at execution time. If the object is a directory in the "root" (/), QOpenSys, and user-defined file systems, the GID of objects created in the directory is set to the effective GID of the thread creating the object.
</dd>
</dl>
</dd>
<dt><b>*CRTOBJAUD</b></dt>
<dd>Specifies the auditing value of objects created in this directory.
<p>This attribute can only be specified for directories in the "root" (/), QOpenSys, QSYS.LIB, independent ASP QSYS.LIB, QFileSvr.400 and user-defined file systems.
</p>
<p>Allowed values for the VALUE parameter are:
</p>
<dl>
<dt><b>*SYSVAL</b></dt>
<dd>The object auditing value for the objects created in the directory is determined by the Create object auditing (QCRTOBJAUD) system value.
</dd>
<dt><b>*NONE</b></dt>
<dd>Using or changing this object does not cause an audit entry to be sent to the security journal.
</dd>
<dt><b>*USRPRF</b></dt>
<dd>The user profile of the user accessing this object is used to determine if an audit record is sent for this access. The OBJAUD parameter of the Change User Auditing (CHGUSRAUD) command is used to change the auditing for a specific user.
</dd>
<dt><b>*CHANGE</b></dt>
<dd>All change accesses to this object by all users are logged.
</dd>
<dt><b>*ALL</b></dt>
<dd>All change or read accesses to this object by all users are logged.
</dd>
</dl>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGATR.VALUE"></a>
<h3>New value (VALUE)</h3>
<p>The value used to change the attribute for the specified objects.
</p>
<dl>
<dt><b>*YES</b></dt>
<dd>Allowed for the *READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *ALWCKPWRT, *ALWSAV, *CRTOBJSCAN, *SCAN, *RSTDRNMUNL, *SETUID, and *SETGID attributes. See the corresponding attribute in the <b>Attribute (ATR)</b> parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*NO</b></dt>
<dd>Allowed for the *READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *ALWCKPWRT, *ALWSAV, *CRTOBJSCAN, *SCAN, *RSTDRNMUNL, *SETUID, and *SETGID attributes. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*RESET</b></dt>
<dd>Allowed for the *USECOUNT attribute. The count of the number of days used will be reset to zero and the use count date will be set to the current date.
</dd>
<dt><b>*NORMAL</b></dt>
<dd>Allowed for the *DISKSTGOPT and *MAINSTGOPT attributes. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*MINIMIZE</b></dt>
<dd>Allowed for the *DISKSTGOPT and *MAINSTGOPT attributes. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*DYNAMIC</b></dt>
<dd>Allowed for the *DISKSTGOPT and *MAINSTGOPT attributes. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*CHGONLY</b></dt>
<dd>Allowed for the *CRTOBJSCAN and *SCAN attributes. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*SYSVAL</b></dt>
<dd>Allowed for the *CRTOBJAUD attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*NONE</b></dt>
<dd>Allowed for the *CRTOBJAUD attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*USRPRF</b></dt>
<dd>Allowed for the *CRTOBJAUD attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*CHANGE</b></dt>
<dd>Allowed for the *CRTOBJAUD attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b>*ALL</b></dt>
<dd>Allowed for the *CRTOBJAUD attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
</dd>
<dt><b><i>1-65533</i></b></dt>
<dd>Allowed for the *CCSID attribute. Specify the coded character set identifier (CCSID) of the data and extended attributes of the object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGATR.SUBTREE"></a>
<h3>Directory subtree (SUBTREE)</h3>
<p>Specifies whether or not to change the specified attribute of the objects within the subtree if the object specified by the <b>Object (OBJ)</b> is a directory.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>The objects specified by OBJ have the attribute changed. If the object is a directory, it has the attribute changed, but its contents do not have the attribute changed.
</dd>
<dt><b>*ALL</b></dt>
<dd>The objects specified by OBJ have the attribute changed. If the object is a directory, its contents as well as the contents of all of its subdirectories have the attribute changed.
<p>
<b>Note: </b>Pattern matching from the OBJ parameter only applies to the first level objects. If the first level object is a directory, the pattern matching does not apply to its contents or the contents of its subdirectories.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGATR.SYMLNK"></a>
<h3>Symbolic link (SYMLNK)</h3>
<p>If the last component in the path name is a symbolic link, specifies whether or not to change the attribute of the symbolic link or of the object pointed to by the symbolic link.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The attribute of the symbolic link object is not changed. The attribute of the object pointed to by the symbolic link is changed.
</dd>
<dt><b>*YES</b></dt>
<dd>If the object is a symbolic link, the attribute of the symbolic link is changed. The attribute of the object pointed to by the symbolic link is not changed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGATR.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Change Attribute for a Directory Subtree</b>
</p>
<p>
<pre>
CHGATR OBJ('/MYINFO') ATR(*HIDDEN) VALUE(*YES) SUBTREE(*ALL)
</pre>
</p>
<p>The object MYINFO will have its *HIDDEN attribute changed so it is a hidden object. If MYINFO is a directory, then all of the objects this directory contains as well as all of the objects contained in the subdirectories will have their PC hidden attribute changed because *ALL is specified for the SUBTREE parameter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGATR.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPFA0AD</b></dt>
<dd>Function not supported by file system.
</dd>
<dt><b>CPFB414</b></dt>
<dd>Attributes changed for &amp;1 objects. &amp;2 objects not changed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGATR.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>