Copying file attributes using HFS

Learn how to copy file attributes using the hierarchical file system (HFS).

When you copy files using the hierarchical file system between QOPT and QDLS file systems, the target file is assigned either default file attributes or the file attributes of the source file. This depends on the value you specify for the copy attributes (CPYATR) global value on the Change Optical Attributes (CHGOPTA) command.

When the CPYATR global value is specified as *NO on the CHGOPTA command, default file attributes are created for files that are copied between the QOPT and QDLS file systems.

When the CPYATR global value is specified as *YES on the CHGOPTA command, file attributes from the source file are copied to the target file for copies between the QOPT and QDLS file system.

Copying attributes from QDLS to QOPT

In copies or moves from QDLS to QOPT, the following default attributes are assigned to the target file:
  • Standard file attributes:
    • Creation date and time is set to the current date and time.
    • Modification date and time is set to the current date and time.
    • Access date and time is set to the current date and time.
    • The QFILATTR standard attribute is set to 00000; the file is not read-only, the file is not hidden, the file is not a system file, the file is not a directory, and the file has not changed since it was last archived or created.
  • No DIA document attributes are copied.
  • No user-defined extended attributes are copied.

The file name (QNAME) and file size (QFILSIZE) are maintained.

Copying attributes from QOPT to QDLS

In copies or moves from QOPT to QDLS, the following default attributes are created:

The file name (QNAME) and file size (QFILSIZE) are maintained.