Functions and CALL Routines |
Locates an observation that is identified by the NOTE function.
POINT(data-set-id,note-id)
|
-
data-set-id
-
is a numeric variable that specifies the
data set identifier that the OPEN function returns.
-
note-id
-
is a numeric variable that specifies the
identifier assigned to the observation by the NOTE function.
POINT returns 0 if the operation was successful, 0
if it was not successful. POINT prepares the program to read from the SAS
data set. The Data Set Data Vector is not updated until a read is done using
FETCH or FETCHOBS.
This example calls NOTE to obtain an observation ID
for the most recently read observation of the SAS data set MYDATA. It calls
POINT to point to that observation, and calls FETCH to return the observation
marked by the pointer.
%let dsid=%sysfunc(open(mydata,i));
%let rc=%sysfunc(fetch(&dsid));
%let noteid=%sysfunc(note(&dsid));
...more macro statements...
%let rc=%sysfunc(point(&dsid,¬eid));
%let rc=%sysfunc(fetch(&dsid));
...more macro statements...
%let rc=%sysfunc(close(&dsid));
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.