Date: Mon, 3 Jan 2011 13:32:47 -0600
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Macro Reading Filename
In-Reply-To: <201101031913.p03BnLlU004357@wasabi.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Brian,
What's the end goal here? If it's simply to 'do things based on the
[provided] LRECL', then %let (or call the macro with the LRECL as a
parameter) seems perfectly reasonable. I assume you must have a reason for
not wanting to do it that way - what is it? Do you want to automatically
determine the LRECL?
Thanks,
Joe
On Mon, Jan 3, 2011 at 1:13 PM, Brian Trautman <btrautman84@gmail.com>wrote:
> I have the following SAS program --
>
> filename fs ftp "'SAMPLE.LOC'"
> binary host="srvr"
> user=user
> pass=pass
> lrecl=200
> debug ;
>
> DATA FFSheet_01_FPPS_Sort ;
>
> INFILE fs ;
> INPUT
> @001 Blob $EBCDIC100.
> @ ;
>
> RUN ;
>
> I'd like to be able to write a macro that detects the lrecl used in my
> filename statement, and does things based on it. I know one way to do it
> would be to simply do something like this --
>
> %let llen = 200;
>
> filename fs ftp "'SAMPLE.LOC'"
> binary host="srvr"
> user=user
> pass=pass
> lrecl=&llen
> debug ;
>
> However, I'd like to avoid this solution if at all possible. Are there any
> other options?
>
|