FILEREF Function: UNIX

Verifies whether a fileref has been assigned for the current SAS session.
Category: External Files
UNIX specifics: fileref can be assigned with an environment variable
See: FILEREF Function in SAS Functions and CALL Routines: Reference

Syntax

FILEREF(fileref)

Required Argument

fileref
specifies the fileref assigned to be validated. 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.
Under UNIX, fileref can also be a UNIX environment variable. The fileref or the environment variable that you specify must be enclosed in double quotation marks.

Details

A negative return code indicates that the fileref exists, but the physical file associated with the fileref does not exist. A positive value indicates that the fileref is not assigned. A value of zero indicates that the fileref and external file both exist.
For more information, seeFILENAME Function: UNIX.