Start of change

Programming interfaces (HPOFS)

You can create or read files on HPOFS media by using either the Hierarchical File System (HFS) application programming interface (API) or the integrated file system application programming interface (API).

The following are items specific to the i5/OS™ implementation of the HPOFS media format that application developers need to know.

National Language Support
The integrated file system interfaces assume that the coded character set identifier (CCSID) represents the path in effect for the job. The system then converts the path from the job CCSID to an internally used CCSID. The HFS interface makes no assumption about the CCSID of the path; therefore, the system performs no character set conversion on the path. This could produce undesirable side effects if an application used the two API sets interchangeably or if the application changed from using one API set to the other.
A program should not create files through HFS and then try to read them by using the integrated file system APIs. Depending on the characters that are used in the path name, this could result in a File not found error. This type of problem can be avoided if the application uses only invariant characters (for example A-Z 0-9 + = % & ( ) , _ . : ;) for path names. Invariant characters are graphic characters that map to the same code point in all character sets.
Held optical files
When the system writes an optical file that it cannot close normally, the system may create a held optical file. The held file exists on i5/OS internal disk storage and contains the data written to the file. You can then save or release the held file through an API or command interface. The system creates held files only when files fail to archive on HPOFS media.
Synchronous writes
You can open files on HPOFS through HFS by specifying that all write operations be synchronous. When specified, write operations will be synchronous to i5/OS internal disk storage, not to the optical media. In the event of a power failure the data is recoverable from a held optical file.
Similarly for the HFS Force Buffered Data API and the integrated file system fsync() API, data will be forced to i5/OS internal disk storage, not to optical. Again, in the event of a power failure, the data is recoverable from a held optical file.
File sharing
Multiple jobs or threads can share files. The system fully recognizes files that share modes as specified on the open request. For example, assume that a job opens a file that specifies it to share only with readers. This means that you can perform other opens only as long as the access requested remains read only.
Extended file attributes
The system supports extended file attributes for files on HPOFS media. Extended attributes can be written to files using the HFS Change Directory Entry Attributes API as well as through some integrated file system interfaces.
End of change