File server
Identify IBM® i exit points for file serving.
The file server has one exit point defined:
QIBM_QPWFS_FILE_SERV Format PWFS0100
The QIBM_QPWFS_FILE_SERV exit point is defined to run an exit program for the following types of file server requests:
- Change file attributes
- Create stream file or create directory
- Delete file or delete directory
- List file attributes
- Move
- Open stream file
- Rename
- Allocate conversation
Notes:
- For the file server, the exit program name is resolved when the QSERVER subsystem is activated. If you change the program name, you must end and restart the subsystem for the change to take effect.
- For file server requests that provide the file name to the exit program, the user must have a minimum of *RX authority to each directory in the path name preceding the object. If the user does not have the required authority, the request will fail.
- If the file server exit program swaps to another user and does not swap back to the original user, the file server session continues to operate with the user that originally connected to the session. This is because the host file server and IBM i NetServer get credential information for the user who did the initial connection to the session and uses this credential information when doing client requests. With the host file server and IBM i NetServer using the credential information, any swapping of the user profile in the file server exit program is not used by the file server for file system operations.
Exit point QIBM_QPWFS_FILE_SERV format PWFS0100
| Offset | Type | Field | Description | |
|---|---|---|---|---|
| Dec | Hex | |||
| 0 | 0 | CHAR(10) | User profile name | The name of the user profile that is calling the server |
| 10 | A | CHAR(10) | Server identifier | For the file server, the value is *FILESRV. |
| 20 | 14 | BINARY(4) | Requested function | The function being performed:
|
| 24 | 18 | CHAR(8) | Format name | The user exit format name being used. For QIBM_QPWFS_FILE_SERV, the format name is PWFS0100. |
| 32 | 20 | CHAR(4) | File access | If the requested function has a value of X'0005' (open),
this field contains the following structure:
|
| 36 | 24 | BINARY(4) | File name length | The length of the file name (the next field). The length can be a maximum of 16MB. If the requested function has a value of X'0007' (Allocate conversation request), the file name length is 0. |
| 40 | 28 | CHAR(*) | File name | The name of the file. The length of this field is specified
by the File Name Length (the previous field). The file name is returned
in CCSID 1200. If a requested function has a value of one of the
following, the file name is provided and the file name length is set:
|
Notes:
|
||||