Date: Mon, 14 Apr 2003 16:13:34 -0500
Reply-To: aldi@wubios.wustl.edu
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Aldi Kraja <aldi@WUBIOS.WUSTL.EDU>
Organization: WU
Subject: Why SAS is assuming a procedure is taking place?
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi,
I am using some macro %if (condition) to separate some actions
responding to the true case.
The macro statement %if is within a macro.
Q: Why SAS is assuming that a procedure is taking place? Am I not
permitted to output to a file within a macro program?
TIA,
Aldi
SAS program (partial):
%else %if &choice=2 %then %do;
filename cho2 "&gshell.";
data _null_;
file cho2;
put "#! /bin/tcsh";
put "# ";
..........................
run;
SAS log (partial):
========
MLOGIC(GSASINTERFACE): %IF condition &choice=2 is TRUE
SYMBOLGEN: Macro variable GSHELL resolves to gshell1
NOTE: Line generated by the invoked macro "GSASINTERFACE".
2407 filename cho2 "&gshell.";
________
22
76
NOTE: Enter RUN; to continue or QUIT; to end the procedure.
ERROR 22-322: Syntax error, expecting one of the following: ;, ALTER,
GENNUM, MEMTYPE, MT, MTYPE, PROTECT, PW, READ, WRITE.
ERROR 76-322: Syntax error, statement will be ignored.
NOTE: Statements not processed because of errors noted above.