LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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>
Organization: http://groups.google.com
Subject:      Q: SAS Macro question
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

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 idea.

Any idea for a solution or info why it can't be done at all would be highly appreciated.

Patrick

Example: %macro AddSteps; proc print data=work.test; run; %mend;

%macro SetOptions; /* some options */ label='My DS' /* how to call macro so that it executes after current step boundary? */ call execute('%AddSteps'); /* ' */ %mend;

data work.test(%SetOptions) ; a=1; output; run;


Back to: Top of message | Previous page | Main SAS-L page