Date: Sun, 27 Feb 2005 22:49:38 -0800
Reply-To: BruceBrad@INAME.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bruce Bradbury <BruceBrad@INAME.COM>
Organization: http://groups.google.com
Subject: Accessing dataset meta-data from with a datastep
Content-Type: text/plain; charset="iso-8859-1"
Is it possible to access meta-data information about a data set from
within a data step?
I know it is possible to use proc sql to put variable names and the
like into macro variables. However, this requires code outside the
current data step which can get messy.
What I would like is a macro function %vname(n) which would return the
name of the first variable in the current program data vector. (Plus
similar functions for other variable attributes).
I suspect this might not be possible since the data vector doesn't get
built until after the macro compilation phase. However, a good second
best would be %vname(n,ds) which returned the nth variable name from
data set ds. Is this possible?
|