Exit Program for Close Directory (QHFCLODR) API


  Required Parameter Group:

1 Operation (CLODR) Input Char(5)
2 File system job handle Input Char(16)
3 Open directory handle Input Char(16)

  Optional Parameter Group:

4 Close type Input Char(1)

Before applications can use the Close Directory (QHFCLODR) API with your file system, you must:

  1. Write an exit program that performs the close directory operation on behalf of the API. For a detailed description of the API and its calling parameters, see Close Directory (QHFCLODR) API.

  2. Give the exit program's name when you register the file system with the Register File System (QHFRGFS) API.

After that, when an application calls the QHFCLODR API, the API calls your exit program and passes it the parameters specified by the application. Your exit program performs the work and returns any data to the API. The API passes the data back to the calling application.


Authorities and Locks

None.


Required Parameter Group

The API passes this information to your exit program:

Operation (CLODR)
INPUT; CHAR(5)

The abbreviation for the operation being performed (CLODR).

File system job handle
INPUT; CHAR(16)

The work area or job identifier for use by the file system.

The following parameter is the same as the parameter for the API.

Open directory handle
INPUT; CHAR(16)

Optional Parameter Group

If your file system was registered with a Version 2 Release 3 Modification Level 0, this parameter is passed to your exit program for the Close Directory API.

Close type
INPUT; CHAR(1)

The type of close operation to be performed. Valid values are:

0 If the exit program cannot close the directory, HFS does not mark the directory as closed.
1 Unconditional close. HFS marks the directory as closed regardless of what valid exception is returned by the exit program. HFS may call your exit program for an unconditional close at the end of the job and during the reclaim resource processing. If your file system is called to unconditionally close a directory, the directory should not be marked as open by the file system when control is returned to HFS.

HFS uses the close type value 0 when the QHFCLODR API is called to close the directory. The unconditional close type value 1 is used when:


API Functions

In addition to the standard functions described in Standard HFS API Functions, the QHFCLODR API performs these functions for your file system:


Exit Program Requirements

You must create an exit program that performs the standard functions described in Standard HFS Exit Program Requirements and one additional function. The exit program should close the directory, releasing the lock that the user obtained when the directory was opened, and invalidate the directory handle so that it cannot be used again.


Error Messages for Exit Program Use

This section lists the messages that the exit program can return to the API.

Message ID Error Message Text
CPF1F06 E Directory in use.
CPF1F08 E Damaged directory.
CPF1F62 E Requested function failed.
CPF1F66 E Storage needed exceeds maximum limit for user profile &1.
CPF1F71 E Exception specific to file system occurred.
CPF1F73 E Not authorized to use command.
CPF1F74 E Not authorized to object.
CPF1F77 E Severe parameter error occurred on call to file system.


Exit Program Introduced: V2R1
Top | Hierarchical File System APIs | APIs by category