Date: Wed, 25 Oct 2006 07:52:06 -0700
Reply-To: RolandRB <rolandberry@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: RolandRB <rolandberry@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: assign macro variable to number of columns
In-Reply-To: <1161776240.206344.257960@m73g2000cwd.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
Arjen wrote:
> Hello SAS-L,
>
> I have a sas table with x columns. How would I create a macro variable
> &d that represents the number x? I need to use this &d in another macro
> that has the line "%do i = 1 %to &d".
>
> I would appreciate your help.
>
> Arjen
%let d=%words(%varlist(dsetname));
That's if you use the macros on my Spectre web site.
http://www.datasavantconsulting.com/roland/spectre/
|