Chapter Contents |
Previous |
Next |
FCLOSE |
Category: | External File |
Syntax | |
Example | |
See Also |
Syntax |
sysrc=FCLOSE(file-id); |
0 | successful |
0 | not successful |
Type: Numeric
-999
closes all files opened with FOPEN. If file-id contains an invalid value, the program halts.
Type: Numeric
Example |
Close a file after manipulating it:
/* Assign the fileref THEFILE to the physical */ /* filename that is stored in the variable FNAME */ /* and open it in append mode. */ rc=filename( 'thefile',fname); fileid=fopen('thefile'); if (fileid>0) then do; rc=fread(fileid); rc=fclose(fileid); end; else do; _msg_=sysmsg(); return; end; rc=filename('thefile','');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.