SAS Component Language Dictionary |
Category: | External File |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
item-name=FOPTNAME(file-id,item-num); |
contains the name of the information item, or a blank if an error occurred.
contains the identifier that was assigned when the file was opened. If file-id is invalid, the program halts.
Details |
The number, value, and type of available information items depend on the operating system.
Example |
Retrieve the system-dependent file information items and write them to the log:
length name $ 8; rc=filename('myfile',fname); fid=fopen('myfile'); infonum=foptnum(fid); do j=1 to infonum; name=foptname(fid,j); value=finfo(fid,name); put 'File attribute' name 'has a value of' value; end; rc=fclose(fid); rc=filename('myfile','');
The example produces the following output:
File attribute LRECL has a value of 256.
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.