Command reference / ifs
CHGATR
Change Attribute
Updates one attribute for an IFS object, for objects selected by a name pattern, or for objects in a directory subtree.
Allowed environments: *ALL.
Positional parameters: 3.
Parameters
OBJ
Object
Sets 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.
ATR
Attribute
Sets the attribute to be changed.
Allowed values:
*READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *CCSID, *ALWCKPWRT, *USECOUNT, *DISKSTGOPT, *MAINSTGOPT, *CRTOBJSCAN, *SCAN, *ALWSAV, *RSTDRNMUNL, *SETUID, *SETGID, *CRTOBJAUD, *INHCKPWRT, *TEXT, *RUNEXIT, *CRTRUNEXIT
*READONLY- Whether the object can be written to or deleted, have its extended attributes changed or deleted, or have its size changed. Allowed values for the New value (VALUE) parameter are: *YES The object cannot be changed or deleted.
*YES- The object cannot be changed or deleted.
*NO- The object can be changed or deleted.
*HIDDEN- Whether the object can be displayed using an ordinary directory list. Allowed values for the VALUE parameter are: *YES The object is hidden and cannot be displayed using an ordinary directory listing.
*YES (2)- The object is hidden and cannot be displayed using an ordinary directory listing.
*NO (2)- The object is not hidden and can be displayed using an ordinary directory listing.
*PCSYSTEM- Whether the object is a PC system file and is excluded from normal directory searches. Allowed values for the VALUE parameter are: *YES The object is a PC system file. *NO The object is not a PC system file.
*YES (3)- The object is a PC system file.
*NO (3)- The object is not a PC system file.
*PCARCHIVE- Whether the object has changed since the last time the file was saved or reset by a PC client. Allowed values for the VALUE parameter are: *YES The object has changed. *NO The object has not changed.
*YES (4)- The object has changed.
*NO (4)- The object has not changed.
*SYSARCHIVE- 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.
*YES (5)- The object has changed and does need to be saved.
*NO (5)- The object has not changed and does not need to be saved.
*CCSID- The coded character set identifier (CCSID) of the data and extended attributes of the object. Note: Changing the CCSID does not convert the data or the extended attributes.
1-65533- The CCSID of the data and extended attributes of the object.
*ALWCKPWRT- If the object is a stream file, indicates whether the stream file can be shared with readers and writers during save-while-active checkpoint processing.
*YES (6)- If the object is a stream file, it can be shared with readers and writers during save-while-active checkpoint processing.
*NO (6)- If the object is a stream file, it can be shared with readers only during save-while-active checkpoint processing.
*INHCKPWRT- Controls whether new objects created within a directory should inherit the save-while-active checkpoint processing options of its parent.
*YES (7)- New directory objects created within this directory will have the *INHCKPWRT attribute value set to *YES. New objects created within this directory will have the *ALWCKPWRT attribute value set to *YES.
*NO (7)- New directory objects created within this directory will have the *INHCKPWRT attribute value set to *NO. New objects created within this directory will have the *ALWCKPWRT attribute value set to *NO.
*USECOUNT- 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.
*RESET- 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.
*DISKSTGOPT- 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.
*NORMAL- The auxiliary storage will be allocated normally.
*MINIMIZE- 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.
*DYNAMIC- The system will dynamically determine the optimal auxiliary storage allocation for the object, balancing space used versus disk I/O operations.
*MAINSTGOPT- 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.
*NORMAL (2)- 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.
*MINIMIZE (2)- 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.
*DYNAMIC (2)- The system will dynamically determine the optimal main storage allocation for the object depending on other system activity and main storage contention.
*CRTOBJSCAN- Controls 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.
*YES (8)- 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.
*NO (8)- After an object is created in the directory, the object will not be scanned by the scan-related exit programs.
*CHGONLY- 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.
*SCAN- Controls whether the object will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
*YES (9)- 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.
*NO (9)- The object will not be scanned by the scan-related exit programs.
*CHGONLY (2)- 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.
*ALWSAV- Controls whether the object can be saved or not. Note: It is highly recommended that this attribute not be changed for any system created objects.
*YES (10)- 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.
*NO (10)- This object will not be saved when using the SAV command or the QsrSave() API.
*RSTDRNMUNL- Restricted renames and unlinks for objects within a directory.
*YES (11)- Additional restrictions for rename and unlink operations.
*NO (11)- No additional restrictions for rename and unlink operations.
*SETUID- Set effective user ID (UID) at execution time. This value is ignored if the specified object is a directory. Allowed values for the VALUE parameter are: *YES The object owner is the effective UID at execution time.
*YES (12)- The object owner is the effective UID at execution time.
*NO (12)- The UID is not set at execution time.
*SETGID- Set effective group ID (GID) at execution time. Allowed values for the VALUE parameter are: *YES If the object is a file, the GID is set at execution time.
*YES (13)- 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.
*NO (13)- If the object is a file, the GID is not set at execution time.
*CRTOBJAUD- Sets the auditing value of objects created in this directory. 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.
*SYSVAL- The object auditing value for the objects created in the directory is determined by the Create object auditing (QCRTOBJAUD) system value.
*NONE- Using or changing this object does not cause an audit entry to be sent to the security journal.
*USRPRF- 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.
*CHANGE- All change accesses to this object by all users are logged.
*ALL- All change or read accesses to this object by all users are logged.
*TEXT- Sets a brief text string associated with the object. VALUE(*NONE) must also be specified. The value of the TEXT parameter will be used for the brief string. The allowed values for the TEXT parameter are: *BLANK No text is specified.
*BLANK- Leave text unspecified. If there is existing text associated with the object, it is removed.
character-value- Up to 50 characters of text may be specified. The specified text replaces any previously specified text.
*RUNEXIT- Controls whether one or more registered exit point programs will be called when the object is opened or closed.
*YES (14)- The exit point programs will be called before the object is opened and after the object is closed.
*NO (14)- No exit point programs will be called when the object is opened or closed.
*CRTRUNEXIT- Sets the *RUNEXIT value of objects created in this directory. This also specifies the *CRTRUNEXIT value of directories created in this directory.
*YES (15)- All objects created in this directory will be created with a *RUNEXIT value of *YES. Also, all directories created in this directory will be created with a *CRTRUNEXIT value of *YES.
*NO (15)- All objects created in this directory will be created with a *RUNEXIT value of *NO. Also, all directories created in this directory will be created with a *CRTRUNEXIT value of *NO.
VALUE
New value
The value used to change the attribute for the specified objects.
*YES- Allowed for the *READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *ALWCKPWRT, *INHCKPWRT, *ALWSAV, *CRTOBJSCAN, *SCAN, *RSTDRNMUNL, *RUNEXIT, *CRTRUNEXIT, *SETUID, and *SETGID attributes.
*NO- Allowed for the *READONLY, *HIDDEN, *PCSYSTEM, *PCARCHIVE, *SYSARCHIVE, *ALWCKPWRT, *INHCKPWRT, *ALWSAV, *CRTOBJSCAN, *SCAN, *RSTDRNMUNL, *RUNEXIT, *CRTRUNEXIT, *SETUID, and *SETGID attributes.
*RESET- 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.
*NORMAL- 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.
*MINIMIZE- 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.
*DYNAMIC- 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.
*CHGONLY- 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.
*SYSVAL- 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.
*NONE- Allowed for the *CRTOBJAUD attribute. Required for the *TEXT attribute. See the corresponding attribute in the ATR parameter for a description of what this value means for each of the attributes.
*USRPRF- 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.
*CHANGE- 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.
*ALL- 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.
1-65533- Allowed for the *CCSID attribute. Specify the coded character set identifier (CCSID) of the data and extended attributes of the object.
SUBTREE
Directory subtree
Choose whether to change the specified attribute of the objects within the subtree if the object specified by the Object (OBJ) parameter is a directory.
Allowed values:
*NONE, *ALL
*NONE- 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.
*ALL- 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.
SYMLNK
Symbolic link
If the last component in the path name is a symbolic link, specifies whether to change the attribute of the symbolic link or of the object pointed to by the symbolic link.
Allowed values:
*NO, *YES
*NO- Keep the current attribute of the symbolic link object. The attribute of the object pointed to by the symbolic link is changed.
*YES- 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.
TEXT
Text
Sets a text string to be associated with the object.
*BLANK- Leave text unspecified. If there is existing text associated with the object, it is removed. If something other than ATR(*TEXT) is specified, then this value must also be specified.
character-value- Up to 50 characters of text may be specified. The specified text replaces any previously specified text.
Examples
CHGATR OBJ('/MYINFO') ATR(*HIDDEN) VALUE(*YES) SUBTREE(*ALL)
The object MYINFO will have its *HIDDEN attribute changed so it is a hidden object.
Generated from os/cl/catalog/CHGATR.json and os/cl/help/CHGATR.json.