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


pathconf

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

Read syntax diagramSkip visual syntax diagram
>>-pathconf--pathname--name------------------------------------><

Function

pathconf invokes the pathconf callable service to determine the current values of a configurable limit or option (variable) that is associated with a file or directory. The limit or option is returned in RETVAL.

Parameters

pathname
A pathname for a file or directory.
name
A numeric value that indicates which limit is returned. You can specify a numeric value (see REXX predefined variables) or the predefined variable beginning with PC_ 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 pathname does not refer to a terminal file, the service returns -1 in RETVAL and sets ERRNO to EINVAL.
  2. If name refers to NAME_MAX, PATH_MAX, or _POSIX_NO_TRUNC, the following applies:
    • If pathname does not refer to a directory, the service 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 pathname refers to a pipe or a FIFO, the value returned applies to the referred-to object itself. If pathname refers to a directory, the value returned applies to any FIFOs that exist or can be created within the directory. If pathname refers to any other type of file, the pathconf service returns -1 in RETVAL and sets the ERRNO to EINVAL.
  4. If name refers to PC_LINK_MAX, the following applies:
    • If pathname refers to a directory, the value returned applies to the directory.

Example

To determine the maximum number of bytes allowed in a pathname in the root directory:
"pathconf /" pc_name_max

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014