PATHNAME Function: z/OS

Returns the physical name of a SAS library or of an external file or returns a blank.
Categories: SAS File I/O

External Files

z/OS specifics: fileref, libref
See: PATHNAME Function in SAS Functions and CALL Routines: Reference

Syntax

PATHNAME((fileref | libref) <,search-level> )

Required Arguments

fileref
specifies the fileref assigned to an external file. In a DATA step, fileref can be a character expression, a string enclosed in quotation marks, or a DATA step variable whose value contains the fileref. In a macro, fileref can be any expression that resolves to a macro variable.
libref
specifies the libref assigned to a SAS library. In a DATA step, libref can be a character expression, a string enclosed in quotation marks, or a DATA step variable whose value contains the libref. In a macro, libref can be any expression.

Optional Argument

search-level
specifies whether to search for a fileref or a libref. If search-level is omitted, PATHNAME searches for a fileref or libref with the specified name. You can use single or double quotation marks around the fileref, libref, and search-level elements of the PATHNAME statement.
F
specifies a search for a fileref.
L
specifies a search for a libref.

Details

PATHNAME returns the physical name of an external file or a SAS library, or returns a blank if fileref or libref is invalid. When PATHNAME is applied to a concatenation, it returns a list of data set names enclosed in parentheses.
Under z/OS, you can also use any valid ddname that was previously allocated using a TSO ALLOCATE command or a JCL DD statement.