Copy Stream File (QHFCPYSF) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Copy Stream File (QHFCPYSF) API copies an existing stream file into another stream file and optionally renames the copy. The existing file being copied is called the source file. The copy, or the file that the source is copied into, is called the target file.

All file attributes except the revision date and time are copied from the source file to the target file. The file revision date and time are set to the current date and time. The file creation date and time stay as they are--that is, the source file's creation date and time.

For restrictions on using the QHFCPYSF API with distributed data management (DDM), see the information about hierarchical file system support in the Distributed database programming topic collection.


Authorities and Locks

None.


Required Parameter Group

Source file path name
INPUT; CHAR(*)

The path name of the source file (the file being copied). The last element of the path name is the source file name.

The source file must be accessible. No other job can have the source file open with a deny read or deny read/write lock.

Source file path name length
INPUT; BINARY(4)

The length of the source file path name, in bytes.

Copy information
INPUT; CHAR(6)

The type of copy operation being performed. The 6 characters of this parameter are:


Target file path name
INPUT; CHAR(*)

The path name of the target file (the copy or the file that the source is copied into). The last element of the path name is the target file name.

If the target file has a different name from the source file, it can be in the same path as the source.

The target file must be accessible in write mode. It cannot be a read-only file, and another job cannot have it open with a deny write or deny read/write lock.

Target file path name length
INPUT; BINARY(4)

The length of the target file path name, in bytes.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages



API introduced: V2R1

[ Back to top | Hierarchical File System APIs | APIs by category ]