Exit Program for Read Directory Entries (QHFRDDR) API


  Required Parameter Group:

1 Operation (RDDR) Input Char(5)
2 File system job handle Input Char(16)
3 Open directory handle Input Char(16)
4 Data buffer Output Char(*)
5 Data buffer length Input Binary(4)
6 Number of directory entries to read Input Binary(4)
7 Number of directory entries read Output Binary(4)
8 Length of data returned Output Binary(4)

Before applications can use the Read Directory Entries (QHFRDDR) API with your file system, you must:

  1. Write an exit program that performs the read directory entries operation on behalf of the API. For a detailed description of the API and its calling parameters, see Read Directory Entries (QHFRDDR) 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 QHFRDDR 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 following shows the input parameters that the API passes to your exit program and the output parameter that the exit program must pass back to the API:

Operation (RDDR)
INPUT; CHAR(5)

The abbreviation for the operation being performed (RDDR).

File system job handle
INPUT; CHAR(16)

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

The following parameters are the same as the parameters for the API.

Open directory handle
INPUT; CHAR(16)

Data buffer
OUTPUT; CHAR(*)

Data buffer length
INPUT; BINARY(4)

Number of directory entries to read
INPUT; BINARY(4)

Number of directory entries read
OUTPUT; BINARY(4)

Length of data returned
OUTPUT; BINARY(4)

API Functions

The QHFRDDR API performs the standard functions described in Standard HFS API Functions and one additional function. The API validates the open directory handle to ensure that the directory is open and the current user profile is the user that opened it.


Exit Program Requirements

You must create an exit program that performs the standard functions described in Standard HFS Exit Program Requirements and these additional functions:

In addition, your file system's documentation should describe the order in which directory entries are returned (for example, alphabetic or last-used date).


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
CPF1F08 E Damaged directory.
CPF1F41 E Severe error occurred while addressing parameter list.
CPF1F47 E Buffer overflow occurred.
CPF1F53 E Value for length of data buffer not valid.
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