Date: Thu, 16 Jun 2011 10:33:36 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Referring Back to Filename
Content-Type: text/plain; charset=ISO-8859-1
Does the filename= option work for ftp files? That's an option on the
INFILE statement that appends the incoming filename as a temporary variable.
On Thu, Jun 16, 2011 at 10:31 AM, Brian Trautman <firstname.lastname@example.org>wrote:
> I have the following SAS job that takes two different files and combines
> filename myfile ftp ("'ABC123.LA'", "'ABC123.NY'")
> binary host="host"
> debug ;
> DATA IMPORT_FILE;
> format STREET_ADDR $30.;
> INFILE myfile ;
> @001 STREET_ADDR $EBCDIC30.
> @ ;
> RUN ;
> In the data step, is there a reasonably elegant way to determine if a
> came from the NY or the LA file? The only option I can think of is to
> import each file separately and then append them, but I'm hoping for a way
> to avoid resorting to that.
> Thank you!