File server

Identify exit point for file server.

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:

Notes:

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:
  • X'0000' - Change file attributes request
  • X'0001' - Create stream file or directory request
  • X'0002' - Delete file or delete directory request
  • X'0003' - List file attributes request
  • X'0004' - Move request
  • X'0005' - Open stream file request
  • X'0006' - Rename request
  • X'0007' - Allocate conversation request
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:
  • Read access, CHAR(1) X'F1' - Yes X'F0' - No
  • Write access, CHAR(1) X'F1' - Yes X'F0' - No
  • Read/Write access, CHAR(1) X'F1' - Yes X'F0' - No
  • Delete allowed, CHAR(1) X'F1' - Yes X'F0' - No
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:
  • X'0000' - Change file attributes request
  • X'0001' - Create stream file or directory request
  • X'0002' - Delete file or delete directory request
  • X'0003' - List file attributes request
  • X'0004' - Move request
  • X'0005' - Open stream file request
  • X'0006' - Rename request
Notes:
  • This format is defined by member EPWFSEP in files H, QRPGSRC, QRPGLESRC, QLBLSRC and QCBLLESRC in library QSYSINC.
  • The APIs available to convert to and from CCSID 1200 are iconv() and CDRCVRT.