FINFO Function: UNIX

Returns the value of a file information item for an external file.
Category: External Files
UNIX specifics: info-item is available
See: FINFO Function in SAS Functions and CALL Routines: Reference


FINFO(file-id, info-item)

Required Arguments

specifies the identifier that was assigned when the file was opened, generally by the FOPEN function.
specifies the name of the file information item to be retrieved. This value is a character value. Info-item is either a variable containing a valid value or the valid value in quotation marks.
Under UNIX, info-item for disk files can have one of the following values:
  • Filename
  • Owner Name
  • Group Name
  • Access Permission
  • File Size (bytes)
If you concatenate filenames, then an additional info-item is available: File List.
If you are using pipe files, then the only valid value for info-item is PIPE Command.


The FINFO function returns the value of a system-dependent information item for an external file that was previously opened and assigned a file-id by the FOPEN function. FINFO returns a blank if the value given for info-item is invalid.
For an example of how to use the FINFO function, see File Attributes When Using the Pipe Device Type.

See Also

FOPEN Function in SAS Functions and CALL Routines: Reference