Chapter Contents |
Previous |
Next |
FINFO |
Category: | External File |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
item-value=FINFO(file-id,info-item); |
Type: Character
Type: Numeric
Type: Character
Details |
FINFO returns the value of a system-dependent information item for an external file. The information that is available for files depends on the operating system.
FOPTNUM determines how many system-dependent information items are available. FOPTNAME determines the names of the available items.
Example |
Assign the fileref MYFILE to an external file. Then open the file and determine whether LRECL is one of the available information items. If the value of the variable CHARVAL is nonblank, then a value for LRECL (logical record length, an attribute used on some host systems), is displayed to the user.
rc=filename('myfile',fname); fid=fopen('myfile'); charval=finfo(fid,'lrecl'); if (charval=' ') then _msg_= 'The LRECL attribute is not available.'; else _msg_='The LRECL for the file is||charval||'.'; rc=fclose(fid); rc=filename('myfile','');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.