Functions and CALL Routines under OpenVMS |
Returns the value of an information item for an external file.
Category: |
External Files
|
OpenVMS specifics: |
Types of information items
|
See: |
FINFO Function in
SAS Language Reference: Dictionary
|
-
file-id
-
specifies the identifier that was assigned
when the file was opened, generally by the FOPEN function.
-
info-item
-
specifies the name of the file information
item to be retrieved. This is a character value.
Under OpenVMS, info-item
can have the following values:
-
Filename
-
Owner Name
-
Group
Name
-
Access Permission
-
File Size (bytes)
If you concatenate
filenames, then an additional info-item is available: File List.
The FINFO function returns the value of
a system-dependent information item for an external file that was previously
opened and assigned a file-id by the FOPEN function. FINFO returns a blank
if the value given for info-item is invalid.
The following example returns information on a single
file named myfile.dat
:
filename myfile "myfile.dat";
data;
fid=fopen('myfile');
fnum=foptnum(fid);
do i = 1 to fnum;
name=foptname(fid,i);
info=finfo(fid,name);
put name= info= ;
end;
run;
The following example returns information
on a concatenation of files named myfile1.dat
and myfile2.dat
:
filename myfile ("myfile1.dat" "myfile2.dat");
data;
fid=fopen('myfile');
fnum=foptnum(fid);
do i = 1 to fnum;
name=foptname(fid,i);
info=finfo(fid,name);
put name = info= ;
end;
run;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.