Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mf_getvarlist.sas File Reference

Returns dataset variable list direct from header. More...

Go to the source code of this file.

Detailed Description

WAY faster than dictionary tables or sas views, and can also be called in macro logic (is pure macro). Can be used in open code, eg as follows:

%put List of Variables=%mf_getvarlist(sashelp.class);

returns:

List of Variables=Name Sex Age Height Weight

  %put %mf_getvarlist(sashelp.class,dlm=%str(,),quote=double);

returns:

"Name","Sex","Age","Height","Weight"

Parameters
libdsTwo part dataset (or view) reference.
dlm=provide a delimiter (eg comma or space) to separate the vars
quote=use either DOUBLE or SINGLE to quote the results
Version
9.2
Author
Allan Bowe

Definition in file mf_getvarlist.sas.