| Date: | Fri, 26 Jul 1996 09:31:05 -0500 |
| Reply-To: | abdu elnagheeb <Abdelmoneim.H.Elnagheeb@AEXP.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | abdu elnagheeb <Abdelmoneim.H.Elnagheeb@AEXP.COM> |
| Subject: | Branching to a Subprogram |
|---|
Hello SAS-Lers: I have been trying to branch to a subprogram (which includes
some PROC's) given that a certain macro variable takes a certain value. I
have tried something like this:
Data _null_;
if upcase(@reply)=Y then GO TO Second;
.
.
.
Second:
PROC MEANs ........;
.
.
run;
**************************************;
This fails because GO TO and LABEL must (both) be in the same data step.
Then I tried This:
Data _null_;
if upcase(@reply)=Y then %Second;
.
.
.
%Macro Second;
PROC MEANs ........;
.
.
run;
%mend Second;
**************************************;
This also fails. I hope to receive some comments, especially with respect
to second program. What can I do to accomplish what I want (to branch to a
subprogram if a condition is true (with or without returning to the
branching condition.) ? Thanks for your help.
abdu
|