|Date: ||Fri, 16 Dec 2005 19:55:24 -0800|
|Reply-To: ||David L Cassell <davidlcassell@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||David L Cassell <davidlcassell@MSN.COM>|
|Subject: ||Re: Call Execute|
|Content-Type: ||text/plain; format=flowed|
> I have a question on how to distinguish between SAS statement and macro
>language element. Specifically I want to know when CALL EXECUTE is
>executed at the next DATA step boundary and when it is executely
>immediately as described in help window:
>"resolves its argument and executes the resolved value at the next step
>boundary (if the value is a SAS statement) or immediately (if the value is
>a macro language element)."
First, I have to admit that SAS docs read as if they were written for people
already know the material. That does take some work.
But the meaning is actually straightforward. Work out what the thing inside
the CALL EXECUTE() parentheses is, by doing any macro variable parsing or
text substitution needed, along with filling in anything from the data set.
look at it.
Is it a regular SAS statement or a series of them, like a proc step or a new
step? If so, then slap it on a queue, and execute all those things once you
passed the step boundary (like that RUN statement at the end of your DATA
Is it a macro call, or some macro code? Then it gets executed immediately,
without waiting for the next step boundary.
Which may be just what you DON'T want to happen. Lots of times we want
the series of macro calls to execute right *after* the step, so you can put
macro call inside single quotes to get that effect. There's a section on
sorts of timing issues in Art Carpenter's macro book, and I highly recommend
that you take a look there for more detail and some examples.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Donít just search. Find. Check out the new MSN Search!