Date: Sun, 9 Dec 2007 20:22:17 -0800
Reply-To: Patrick <patrick.matter@GMX.CH>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Patrick <patrick.matter@GMX.CH>
Subject: Q: SAS Macro question
Content-Type: text/plain; charset=ISO-8859-1
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
proc print data=work.test;
/* some options */
/* how to call macro so that it executes after current step
call execute('%AddSteps'); /* ' */
data work.test(%SetOptions) ;