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("autoexit.sas")) %then %do; %inc
pgm(autoexit) %end; %mend autoexit; %autoexit
----- Original Message -----
From: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sent: Wednesday, October 30, 2002 10:33 AM
Subject: tip v9 autoexit
> v8 has this System Option:
> 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
> 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 autoexit.sas.
> 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 RJF2@cdc.gov
> --> 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.