LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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/


Back to: Top of message | Previous page | Main SAS-L page