Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getvalue.sas File Reference

Retrieves a value from a dataset. Returned value is fetched from the 'fetchobs=' record (row 1 by default), after applying the optional filter. Returns a vartype-specific missing value if no row is returned. More...

Go to the source code of this file.

Detailed Description

Be sure to quote() your where clause. Example usage:

%put %mf_getvalue(sashelp.class,name,filter=%quote(age=15));
%put %mf_getvalue(sashelp.class,name);

SAS Macros

Related Macros

Parameters
[in]libdsdataset to query
[in]variablethe variable which contains the value to return.
[in]filter=(1) contents of where clause
[in]fetchobs=(1) observation to fetch. NB: Filter applies first.
[in]warn=(0) Set to 1 to raise a w@rning log message on attempt to read past end of the input dataset.
Version
9.2
Author
Allan Bowe

Definition in file mf_getvalue.sas.