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 (January 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: cc: Tim Wade <wade_tj@YAHOO.COM>
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"; > quit; > run; > > 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 > occurence > > I am aware of the statistical problems with stepwise > procedures, and I'm really not doing this for inference, only > exploration.

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; select name into :varlist separated by ' ' from Dictionary.Columns *** 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:' ;quit;

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! -- RJF2 ... nor the List to be processed


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