The OPTMODEL Procedure |
The CLOSEFILE statement closes files that were opened by the FILE statement. Each file is specified by a logical name, a physical filename in quotation marks, or an expression enclosed in parentheses that evaluates to a physical filename. See the section "FILE Statement" for more information about file specifications.
The following example shows how the CLOSEFILE statement is used with a logical filename:
filename greet 'hello.txt'; proc optmodel; file greet; put 'Hi!'; closefile greet;
Generally you must close a file with a CLOSEFILE statement before external programs can access the file. However, any open files are automatically closed when PROC OPTMODEL terminates.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.