SAS Component Language Dictionary |
Closes a SAS table
-
sysrc
-
contains the return code for the operation:
0 |
successful |
0 |
not successful |
Type:
Numeric
-
table-id
-
is the identifier that was assigned when
the table was opened. A table-id value of -999
closes all tables that were
opened with OPEN. If table-id is invalid, the
program halts.
Type: Numeric
Close all SAS tables as soon as they are no longer needed
by an application. You do not need to open and close a SAS table in each program
of an application. If an application contains several programs that use the
same table, the first program can open the table and can use the parameter
passing mechanism with the DISPLAY routine or method calls to make the table
identifier value available to other programs.
Use OPEN to open a SAS table. If the table opens successfully,
as indicated by a positive value for the PAYID variable, then use CLOSE to
close the PAYROLL table.
payid=open('payroll','u');
...SCL statements...
if (payid>0) then payid=close(payid);
OPEN
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.