Date: Mon, 22 Sep 1997 10:39:00 -0400
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
Subject: Re: Macro and SQL(?) Question
Content-type: text/plain; charset=US-ASCII
Dave Mabey at RDA8POSTOFFICE1 @ RDCCMAIL
09/22/97 10:39 AM
New Text Item: Macro and SQL(?) Question
proc sql noprint;
into :v - :v99999_
Note: This code will sort the values so that &v1=a, &v2=b, &v3=c, etc.
If that is not acceptable, you will need to force the desired order with
an Order By statement. The system will build only as many macro variables
as there are distinct values; *not* 99999 of them.
______________________________ Reply Separator
Subject: Macro and SQL(?) Question
Author: canfdd@MTL.SAS.COM@INTERNET at RDNOTES
Date: 9/22/97 12:54 PM
(Embedded image moved to file: PIC001.PCX)
I would like to create a macro variable for each distinct values of a
classification variable (I think this can be done with proc sql and would
like to know how).
I have a classification variable X (could be numeric or character) with an
unknown number of k classes.
I want to create k macro variables V1, V2, ..., Vk taking the distinct
values of the variable X.
==> V1=a V2=c V3=b (3 macro variables)
Thank you for your help !!