CLOSE Instruction |
CLOSE RATS I/O unit
CLOSE closes an open RATS I/O Unit. Because RATS automatically closes any open files at the end of a session, you will rarely need to close a file yourself. CLOSE is necessary only if you want to read data from a file to which you have written earlier, or you want to read data into another program (like a spreadsheet) before you exit RATS. You must CLOSE the file before re-OPENing it for input.
Parameters
|
RATS I/O unit |
The I/O unit to rewind |
Example
open copy myfile.xls
copy(format=xls,org=columns,dates) 1984:1 2017:12 r1 r2 r3 r4
close copy
*
cal(q) 1984:1
open data myfile.xls
data(format=xls,org=columns) 1984:1 2017:4
This creates an XLS format file called myfile.xls, writing four series (R1, R2, R3 and R4) to it. That's then closed, and reopened as a data file, where the data are read in as quarterly rather than the original monthly.
Copyright © 2025 Thomas A. Doan