Functions and CALL Routines under OpenVMS |
Verifies that a fileref has been assigned for the current SAS
session.
Category: |
External Files
|
OpenVMS specifics: |
Valid values for fileref
|
See: |
FILEREF Function in
SAS Language Reference: Dictionary
|
-
fileref
-
is a character constant, variable, or expression
that specifies the fileref to be validated. Under OpenVMS, fileref can be an OpenVMS logical
name that was assigned using the DCL DEFINE command.
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.
Under OpenVMS, you can assign SAS filerefs using either
of the following commands:
-
the DCL DEFINE command
-
X
command
You can use the DCL DEFINE command to assign a fileref
before you invoke SAS. For example:
$ define myfile a.txt
$ sas;
data;
file myfile;
put "HELLO";
run;
This creates the file A.TXT.
You can use the X command to assign an OpenVMS logical
name during your SAS session.
Then you can use the FILEREF function to verify that the fileref
was correctly assigned. For examples of using this function, see
SAS Language Reference:
Dictionary.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.