Date: Tue, 13 Oct 1998 05:56:05 GMT
Reply-To: Andreas Grueninger <grueni@STUTTGART.NETSURF.DE>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Andreas Grueninger <grueni@STUTTGART.NETSURF.DE>
Organization: LF.net GmbH, Internet Services, Stuttgart, Germany
Subject: Re: Determine fileref currently in use
You should use the option FILENAME= with the FILE statement.
Example:
FILENAME temp1 ' temp1';
FILENAME temp2 ' temp2';
%MACRO write (var=);
PUT filename &var;
%MEND;
DATA _null_;
LENGTH filename $200;
a = 1;
b = 2;
FILE temp1 FILENAME=filename;
%write (var=a);
FILE temp2 FILENAME=filename;
%write (var=b);
RUN;
On Fri, 9 Oct 1998 12:07:32 -0700, "Scheibert, Valinda"
<Valinda.Scheibert@OFM.WA.GOV> wrote:
>I've written a macro that checks date values and reports if they are out of
>range. This macro is called from a program that is writes out data to
>several flat files and so has many FILE statements pointing to external
>files.
>
>I would like to capture the fileref currently in use at the top of my macro,
>write to the log, and then restore the original fileref at the end of my
>macro.
>
>Does anyone know how I can capture the "in-use" fileref/filename? Is this
>even possible?
>
>Thanks.
---------------------------
Andreas Grueninger
PRIVATE: grueni@stuttgart.netsurf.de
OFFICE: grueninger@lfl.bwl.de
---------------------------