Chapter Contents

Previous

Next
REWIND

REWIND



Positions the table pointer at the beginning of a SAS table

Category: SAS Table


Syntax
Details
Example
See Also

Syntax

sysrc=REWIND(table-id);

sysrc
contains the return code for the operation:
0 successful
[ne]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


Details

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.


Example

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);

See Also

FETCH

FETCHOBS

FREWIND

NOTE

POINT


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.