Read a Group File into Memory (QzhbOpenGroupList) API

In the IBM® HTTP Server for i, use the QzhbOpenGroupList() API to read in an existing group file, and return a handle to an in-memory version of the file.

Required Parameter Group:
1 path Input Binary(4)
2 path_len Input Binary(4)
3 writelock Input Binary(4)
4 grplist Output Binary(4)
5 errcode I/O Char(*)
Threadsafe: Yes

See Free Group File from Memory (QzhbCloseGroupList) API for information about freeing memory and optionally writing the group list information out.

Authorities and locks

  • *X authority to each directory in the path of the specified group file
  • *R authority to the group file for a writelock value of 0
  • *RW authority to the group file for a writelock value of 1

Required parameter group

path
INPUT:BINARY(4)

The path to the group file to be created in the integrated file system. You can specify an absolute or relative path to the working directory.

path_len
INPUT:BINARY(4)

The length of the path string.

writelock
INPUT:BINARY(4)

If the value is 1, the group file is opened for write access with a lock and kept open. No other user is allowed to update the group file while the lock is in place. The group file is closed and the lock released by invoking the QZHbCloseGroupList() API. If the value is 0, then the following are true:

  • The group file is opened for read access
  • A lock is not placed on the group file
  • The group file does not remain open
Note: You must specify a writelock of 1 in order to later specify a write argument of 1 on the QzhbCloseGroupList() API. If you do not hold the group file open for write, the QzhbCloseGroupList() API will not write the contents of the file.
grplist
OUTPUT:BINARY(4)

The handle of the group list. Subsequent API calls use this handle.

errcode
I/O:CHAR(*)

The structure in which to return error information.

Error messages

CPF3CF1 E
Error code parameter not valid.
CPF3C1D E
Input variable length in parameter &1 not valid.
HTPA001 E
Input parameter &1 not valid.
HTPA201 E
Group file &1 not found or is unreadable.
HTPA202 E
Unable to update group file &1.