Date: Wed, 10 Aug 2005 13:13:09 -0600
Reply-To: Michael Murff <mjm33@MSM1.BYU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Murff <mjm33@MSM1.BYU.EDU>
Subject: Re: Automatic program name footnote
In-Reply-To: <E7512ADD0779B74592AF6E0E740347160FFF00@qccd-krh-prod20>
Content-Type: text/plain; charset="us-ascii"
Thanks for the responses; I need to spend some time getting to know PROC
OPTIONS, as Ron suggests. Your collective comments led me to a solution that
works both in batch and interactive modes. Lifted from the "SAS 9.1
Companion for Windows" (p.96):
%let execpath=" ";
%macro setexecpath;
%let execpath=%sysfunc(GetOption(SYSIN)); /* available in batch */
%if %length(&execpath)=0
%then %let execpath=%sysget(SAS_EXECFILEPATH); /* available
in interactive mode */
%mend;
%setexecpath;
%put &execpath;
FYI: there is also an environmental variable called SAS_EXECFILENAME.
Michael Murff
Provo, UT
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Michael
Murff
Sent: Wednesday, August 10, 2005 12:18 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Automatic program name footnote
Hi SAS-L,
I'm exploring ways to create an automatic footnote that would list the name
of the program used (and possibly its path) to generate the output. The
recent topic "reading LOG file of the currently running program
<http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0508a&L=sas-l&D=0&P=45626> "
seems related, but it doesn't address this issue directly. Is there someway
to automate this process?
Ideally, this would be a simple macro placed in a .cfg? file that would
stamp all output with this footnote. The fact that SAS writes the program
name as the header of the enhanced editor (interactive PC SAS) intimates
that SAS is storing that information *somewhere.* Any thoughts from the
systems-minded?
Thanks as always,
Michael Murff
Provo, UT