Date: Thu, 26 May 2011 12:03:38 +0000
Reply-To: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Subject: Re: exploring datasets, macro programming
In-Reply-To: <000001cc1b1d$fa605300$ef20f900$@com>
Content-Type: text/plain; charset="us-ascii"
see also:
1.
List Processing Basics Creating and Using Lists of Macro Variables
Tiny Url: http://tinyurl.com/5p3j2z for this page
http://www.sascommunity.org/wiki/List_Processing_Basics_Creating_and_Using_Lists_of_Macro_Variables
http://tinyurl.com/6mmqpj for paper
http://www2.sas.com/proceedings/forum2007/113-2007.pdf
2.
How To Use Proc SQL select into for List Processing
http://tinyurl.com/36vu4rj for this page:
http://www.sascommunity.org/wiki/How_To_Use_Proc_SQL_select_into_for_List_Processing
3.
http://www.sascommunity.org/wiki/Making_Lists
Ron Fehd wiki maven
> -----Original Message-----
> From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-
> l@listserv.uga.edu] On Behalf Of bbser 2009
> Sent: Wednesday, May 25, 2011 4:55 PM
> To: SAS-L@listserv.uga.edu
> Subject: exploring datasets, macro programming
>
> Greetings!
>
> I wrote a code to explore several datasets by one macro call.
> If I had 10 or more datasets to explore, coding this way would be kind
> of
> cumbersome.
> I was wondering, if there were alternative ways (not just limited to
> macro
> ways) to do this?
>
> Thanks a lot for your inputs!
>
> Max
>
> ======== code
>
> %macro explore_datasets;
> %let d1=class;
> %let d2=buy;
> %let d3=column;
> %do i=1 %to 3;
> proc sql inobs=1;
> select*
> from sashelp.&&d&i;
> quit;
> %end;
> %mend explore_datasets;
>
> %explore_datasets;