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 (October 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 30 Oct 2002 10:58:54 -0600
Reply-To:     Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Subject:      Re: tip v9 autoexit
Content-Type: text/plain; charset="iso-8859-1"

Hello again Maven -

What about something like (untested):

%macro autoexit; %if %sysfunc(fileexist("")) %then %do; %inc pgm(autoexit) %end; %mend autoexit; %autoexit


----- Original Message ----- From: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV> Newsgroups: To: <SAS-L@LISTSERV.UGA.EDU> Sent: Wednesday, October 30, 2002 10:33 AM Subject: tip v9 autoexit

> v8 has this System Option: > > INITSTMT= > Specifies a SAS statement > to be executed after any statements in the autoexec file > and before any statements from the SYSIN= file > > in v9 I find > > TERMSTMT= > Specifies the SAS statements to be executed at SAS session termination. > > invocation for initstmt: > > sas -initstmt '%put you have used the initstmt; data x; x=1;run;' > > having no example for termstmt, I'll copy and change the initstmt: > sas -termstmt '%put you have used the termstmt; data x; x=2;run;' > > note sQuotes around statement to be executed > > in autoexec, again cut&paste&change from initstmt: > > options termstmt = '%PUT some autoexit statement(s);' > ;%*options closure; > > This assumes that you have an > > I'll get back to you with a working version of > > data _null_; > if fileexist(autoexit) then call execute(%inc pgm(autoexit)); > > Ron Fehd the macro maven CDC Atlanta GA USA > > --> cheerful provider of UNTESTED SAS code from ByGuessAndByGollyITwrx! <-- > > OpSys: Win_Pro Ver: 9.000000000 > > RTFM: I'm an engineer, I don't get paid to know, > I get paid to know where to look it up. > RTFM: Read The Finite Manual.

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