z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


fpathconf

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-fpathconf--fd--name-----------------------------------------><

Function

fpathconf invokes the fpathconf callable service to let a program determine the current value of a configurable limit or variable associated with a file or directory. The value is returned in RETVAL.

Parameters

fd
The file descriptor (a number) for the file or directory.
name
A numeric value that indicates which configurable limit will be returned. You can specify a numeric value (see REXX predefined variables) or one of the following predefined variables used to derive the appropriate numeric value:
Variable Description
PC_ACL Test if access control lists (ACLs) are supported.
PC_ACL_MAX Maximum number of entries allowed in an ACL.
PC_LINK_MAX Maximum value of a file's link count.
PC_MAX_CANON Maximum number of bytes in a terminal canonical input line.
PC_MAX_INPUT Minimum number of bytes for which space will be available in a terminal input queue; therefore, the maximum number of bytes a portable application may require to be typed as input before reading them.
PC_NAME_MAX Maximum number of bytes in a filename (not a string length; count excludes a terminating null).
PC_PATH_MAX Maximum number of bytes in a pathname (not a string length; count excludes a terminating null).
PC_PIPE_BUF Maximum number of bytes that can be written atomically when writing to a pipe.
PC_POSIX_CHOWN_RESTRICTED Change ownership (chown) function is restricted to a process with appropriate privileges, and to changing the group ID (GID) of a file only to the effective group ID of the process or to one of its supplementary group IDs.
PC_POSIX_NO_TRUNC Pathname components longer than 255 bytes generate an error.
PC_POSIX_VDISABLE Terminal attributes maintained by the system can be disabled using this character value.

Usage notes

  1. If name refers to MAX_CANON, MAX_INPUT, or _POSIX_VDISABLE, the following applies:
    • If fd does not refer to a terminal file, the function returns -1 and sets the ERRNO to EINVAL.
  2. If name refers to NAME_MAX, PATH_MAX, or _POSIX_NO_TRUNC, the following applies:
    • If fd does not refer to a directory, the function still returns the requested information using the parent directory of the specified file.
  3. If name refers to PC_PIPE_BUF, the following applies:
    • If fd refers to a pipe or a FIFO, the value returned applies to the referred-to object itself. If fd refers to a directory, the value returned applies to any FIFOs that exist or that can be created within the directory. If fd refers to any other type of file, the function returns -1 in RETVAL and sets the ERRNO to EINVAL.
  4. If name refers to PC_LINK_MAX, the following applies:
    • If fd refers to a directory, the value returned applies to the directory.

Example

To determine the maximum number of bytes that can be written atomically to the file identified by file descriptor 1:
"fpathconf 1 (pc_pipe_buf)"

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014