Date: Tue, 9 Aug 2011 17:52:33 -0700
Reply-To: dave crimkey <firstname.lastname@example.org>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: dave crimkey <d_crimkey@YAHOO.COM>
Subject: Create macro variable from one value or all values in a field
Content-Type: text/plain; charset=iso-8859-1
I'm summarizing some data by 5 or 6 fields. The user would like the ability to choose, at the beginning of the program, either one value of, for example, a customer name field or all values of the customer name field. So my summary looks like this:
Proc summary nway missing data=testdata;
class salesid invoice_number customer_name year month;
output out=summarized_data (drop=_:) sum=;
Customer name could have any number of possible values (it is a text field) and the user would like to be able to specify A value (in a macro variable) or all values. So I'm doing a let statement:
%let cust_name = ?????
But I'm not sure if or how to accomplish this.
Any help would be appreciated.