SAS Component Language Dictionary |
Positions the table pointer at the beginning of 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 in any mode except IS, US, or N. If table-id is invalid, the program halts.
Type:
Numeric
After a call to REWIND, a call to FETCH
reads the first row in the table.
If there is an active WHERE clause, REWIND moves the
table pointer to the first row that satisfies the WHERE condition.
Call FETCHOBS to fetch the tenth row in the table MYDATA.
Then call REWIND to return to the first row and fetch the first row:
dsid=open('mydata','i');
rc=fetchobs(dsid,10);
rc=rewind(dsid);
rc=fetch(dsid);
FETCH
FETCHOBS
FREWIND
NOTE
POINT
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.