Date: Sun, 9 Dec 2007 22:48:55 -0800
Reply-To: Tree Frog <tree.frog2@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tree Frog <tree.frog2@HOTMAIL.COM>
Subject: Re: Q: SAS Macro question
Content-Type: text/plain; charset=ISO-8859-1
I'm afraid it's not at all clear (at least to me) what you're trying
to achieve. Can you give some more context, and a clear statement of
what you have and what you are hoping to get SAS to do? If you had to
write it all WITHOUT macro, what would it look like, roughly?
I'm sure everyone would like to help, once we understand what the
On Dec 10, 2:22 pm, Patrick <patrick.mat...@gmx.ch> wrote:
> Hi all
> Just posting that again in the hope to get an answer.
> Can anyone of you think of a solution for the following under SAS
> 9.1.3 SP4, Unix or Windows?
> What I have:
> - A bunch of programs.
> - I have to add some checks after certain steps (proc's or datasteps)
> within this programs.
> - All steps after which I have to add code are calling the same macro
> in the same way.
> - This macro does nothing else than generating some data set options
> eg: data test(%SetOptions);
> What I try to achieve:
> - Not to make direct changes to the script of all the programs (DI
> jobs, sometimes with user written code, sometimes within loops...)
> - Change the %SetOptions macro in a way that it does the job for me.
> Where I am:
> - call execute() is behaving close to what I need. But as much as I
> understand it, that won't be the solution.
> - doubting that there is a solution at all for what I try to achieve.
> Below is a code example to illustrate what I try to do. The example
> doesn't work - and I understand also why. It's just outlining the
> Any idea for a solution or info why it can't be done at all would be
> highly appreciated.
> %macro AddSteps;
> proc print data=work.test;
> %macro SetOptions;
> /* some options */
> label='My DS'
> /* how to call macro so that it executes after current step
> boundary? */
> call execute('%AddSteps'); /* ' */
> data work.test(%SetOptions) ;