Date: Thu, 1 May 2008 11:43:16 -0400
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject: Re: call execute crashing
Content-Type: text/plain; charset="iso-8859-15"
> Hi, the following code is NOT working and crashing my sas session:
> data indu_04;
> set indu_02 ;
> call execute ("rename FOREST = indu1;");
> Forest is the old variable name.
> If I just issue: rename forest = indu1 it works fine.
CALL EXECUTE emits sas code that is to be placed on the execution stack for
processing when the step has completed.
If the emitted code contains macro, it will be evaluated to a certain
Thus you are telling SAS to issue a RENAME statement in open code after the
DATA Step has completed.
You should be seeing this in the log
###### + rename FOREST = indu1;
ERROR 180-322: Statement is not valid or it is used out of proper order.
The SAS session should not be crashing, in the sense of going buh-bye and
returning to the desktop.
Note: If you EXECUTEd data step source code prior to the RENAME, then it
would not crash.
call execute ('data whatever; set indu_02;');
call execute ('rename....;');
call execute ('run;');
But you do _NOT_ want to use this pattern of coding, do you?
Richard A. DeVenezia