Date: Thu, 16 Dec 2004 11:08:33 +1100
Reply-To: Scott <usenet739_yahoo_com_au@CRONKITE.CC.UGA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Scott <usenet739_yahoo_com_au@CRONKITE.CC.UGA.EDU>
Subject: Re: Need some help with a simple SAS program (using macros).....
I gave a presentation on using macro at our recent SAS User's Group meeting.
Perhaps this would be useful in getting you quick started?
You can download the relevant files as follows:
Some quick comments on your below scenario:
* Learn how SAS compiles its code (data step, procedures, open code)
* Learn how macro interacts with the compile and run time steps
* Learn when and, just as important, when NOT to use macro
* Learn variable lists and data step arrays
The below scenario is an example of when you should not use macro. Just use
data set options as follows:
do y=1 to 50;
length x1-x50 8;
set one (firstobs=20 obs=35 keep=y x10-x20);
Hope this helps,
"HoMoon115" <email@example.com> wrote in message
> I'm teaching myself how to use SAS and I've come across a situation
> where I'm not quite sure what the correct syntax would be. Anyone have
> any suggestions?
> I have a dataset with 4 variables, one of which is called "obs". There
> are 50 observations. I'm trying to learn how to use macros. How can I
> utilize the macros function to keep specific ranges of observations.
> For example say I want to keep all the variables associated with
> observations 20-35.
> Any help would be much appreciated.