Previous Page | Next Page

Functions and CALL Routines under z/OS

PATHNAME Function: z/OS



Returns the physical name of a SAS library or of an external file or returns a blank.
Category: SAS File I/O
Category: External Files
z/OS specifics: fileref, libref
See: PATHNAME Function in SAS Language Reference: Dictionary

Syntax
Details

Syntax

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

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.

search-level

specifies whether to search for a fileref or a libref.

Note:   If search-level is omitted, PATHNAME searches for a fileref or libref with the specified name.  [cautionend]

F

specifies a search for a fileref.

L

specifies a search for a libref.

Note:   You can use single or double quotation marks around the fileref, libref, and search-level elements of the PATHNAME statement.  [cautionend]


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.

Previous Page | Next Page | Top of Page