Chapter Contents |
Previous |
Next |
PATHNAME |
Category: | SAS File I/O |
Category: | External Files |
Syntax | |
Arguments | |
Details | |
Examples | |
See Also |
Syntax |
PATHNAME(fileref | libref) |
Details |
PATHNAME returns the physical name of an external file or SAS library, or blank if fileref or libref is invalid. The default length of the target variable in the DATA step is 200 characters.
A fileref can be assigned to an external file by using the FILENAME statement or the FILENAME function.
Operating Environment Information: Under some operating environments, filerefs can also be assigned by using system commands. For details, see the SAS documentation for your operating environment.
You can assign a libref to a SAS library using the LIBNAME statement or the LIBNAME function. Some operating environments allow you to assign a libref using system commands.
Examples |
This example uses the FILEREF function to verify that the fileref MYFILE is associated with an external file. Then it uses PATHNAME to retrieve the actual name of the external file:
data _null_; length fname $ 100; rc=fileref("myfile"); if (rc=0) then do; fname=pathname("myfile"); put fname=; end; run;
See Also |
Functions:
| |||||||||
Statements:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.