LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: dc353@hotmail.com
Content-Type: text/plain; charset="iso-8859-15"

dc353@hotmail.com wrote: > Hi, the following code is NOT working and crashing my sas session: > > data indu_04; > set indu_02 ; > > call execute ("rename FOREST = indu1;"); > > run; > > 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 extent.

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; ------ 180

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. data _null_; call execute ('data whatever; set indu_02;'); call execute ('rename....;'); call execute ('run;'); run; But you do _NOT_ want to use this pattern of coding, do you?

-- Richard A. DeVenezia http://www.devenezia.com


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