Date: Sun, 31 Aug 1997 08:43:22 -0400
Reply-To: Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Anthony Ayiomamitis <ayiomamitis@IBM.NET>
Subject: Re: ?How to put filename into printed output
Content-Type: text/plain; charset=us-ascii
Ludger Hinners wrote:
> Type: Question
> Summary: How to put filename into printed output
> Plattform: Win 95
> SAS version: 6.11
> Hi, SASlers!
> I have also a question concerning filename discussed here this week.
> If I print the program in program editor I would like that the name and teh
> path of the file (par example "d:\mywork\test1.sas") appears on the
> printout, as a header or footnote or in the top line.
> Is there a possibility?
You can output the filename using the SYMPUT function and then use
the macro variable within a title/footnote statement by referencing the
macro variable as an &var within double quotes.
length filename $20;
infile 'c:\autoexec.bat' filename=filename;
input line $char80.;
call symput ('filename', filename);
proc print data=sample;