Using SAS Tables |
After an SCL program has finished using a SAS table, the program should close the table with the CLOSE function at the appropriate point in your program. If a SAS table is still open when an application ends, SAS software closes it automatically and displays a warning message. In general, the position of the CLOSE function should correspond to the position of the OPEN function, as follows:
If the OPEN function is in the initialization section, then put the CLOSE function in the termination section.
If the OPEN function is in MAIN, then put the CLOSE function in MAIN.
Note: If you're designing an application system in which more than one program uses a particular SAS table, and if the identifier for this table can be passed to subsequent programs, then close the SAS table in the termination section of the program that uses the table last.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.