REWIND Instruction |
REWIND RATS I/O unit
Rewinds an open RATS I/O Unit, so it can be processed from the beginning again. REWIND is necessary only if you have to run through a single ASCII or binary data file more than one time in a single program. This is a rare situation. Most formats, such as spreadsheets, are always read as a whole each time.
If you write to a file using (for instance) COPY and want to read it back within the same program, you need to CLOSE the file then re-open it rather than rewinding.
Parameters
RATS I/O unit |
The I/O unit to rewind |
Example
data(format=free,org=columns,missing=-88.888) * 1991:2 $
year month notmiss regnobs stderr taxrate $
r0m r1m r2m r3m r4m r5m r6m r7m r8m r9m r10m r11m r12m $
r13m r14m r15m r16m r17m r18m r21m r24m r30m r36m r48m r60m r72m r84m r96m $
r108m r120m r132m r144m r156m r168m r180m r192m r204m r216m r228m r240m r252m $
r264m r276m r288m r300m r312m r324m r336m r348m r360m r372m r384m r396m r408m r420m r480m
*
rewind data
data(format=free,org=columns,missing=-88.888) 1991:3 531 $
year month notmiss regnobs stderr taxrate $
r0m r1m r2m r3m r4m r5m r6m r7m r8m r9m r10m r11m r12m $
r13m r14m r15m r16m r17m r18m r21m r24m r30m r36m r48m r60m r72m r84m r96m $
r108m r120m r132m r144m r156m r168m r180m r192m r204m r216m r228m r240m r252m $
r264m r276m r288m r300m r312m r324m r336m r348m r360m r372m r384m r396m r408m r420m r480m
This was for duplicating a paper which had an error in data handling. There weren't 531 data points on the data file and the program used (which was not RATS) rewound the data file to fill the request.
Copyright © 2025 Thomas A. Doan