Date: Thu, 15 Jan 2004 08:52:44 -0500
Reply-To: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject: Re: save dataset contents as string
Content-Type: text/plain; charset="us-ascii"
> From: Tim Wade [mailto:wade_tj@YAHOO.COM]
[Big snippage occureth]
> proc sql;
> select name into :varlist separated by ' ' from
> sashelp.vcolumn where
> libname eq "WORK" and memname eq "TEST1";
> So now I have a new macro variable with the varlist
> ready to go, but it has dummy variable names that need
> to be edited so that they match variable names in the
> original dataset. I'm not sure of which functions to
> use that will allow this type of editing to a macro
> variable. Also since each dummy variable results in
> (numcategories-1) I need to cut out all but one
> I am aware of the statistical problems with stepwise
> procedures, and I'm really not doing this for inference, only
One of the problems with List Processing
-- aka Dynamic Coding --
is that one has to build the list oneself
before running it thru the List Processor
you may wish to examine a data set further back in your steps
which has your variables of interest
a thorough perusal of
PROC Sql describe table Dictionary.Columns;quit;
will help you fluff out your where phrase:
PROC Sql noprint;
separated by ' '
*** sashelp.vcolumn *** bzap! who provided this reference?
where libname eq "WORK"
and memname eq "TEST1"
and some other test of either type=num
or perhaps a common prefix
and substr(Name,1,2,) eq 'Q0'
and Name like 'Q0:'
Ron Fehd the SQL into:macro maven CDC Atlanta GA USA RJF2@cdc.gov
By using your intelligence
you can sometimes make your problems twice as complicated.
-- Ashleigh Brilliant
or 1/twice as complicated, as the case may be
remember perspective: the error is not always where it seems to occur!
... nor the List to be processed