Date: Wed, 9 Jun 2004 16:15:25 -0400
Reply-To: "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (PHPPO)" <RJF2@CDC.GOV>
Subject: Re: Adding date to a file name
Content-Type: text/plain; charset="US-ASCII"
you need snakeeyes: double dots:
replace this
> ODS RTF FILE = "InvName&date.RTF";
with
> ODS RTF FILE = "InvName&date..RTF";
...............................^
the left eye is the delimiter for the macro variable Date
the right eye is the delimiter between filename and extension
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
remember perspective: the error is not always where it seems to occur!
-- RJF2
> -----Original Message-----
> From: Melanie J. [mailto:mbarish@PROGENICS.COM]
> Sent: Wednesday, June 09, 2004 4:05 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Adding date to a file name
>
>
> Hello everyone,
>
> Can anyone tell me if it's possible for me to add the current
> date to a file name being created in an ODS statement? I'd
> like to setup my program so that when anyone else runs it,
> the date that they run it is automatically attached to the
> RTS file name. For instance, today's file would be called
> "InvName060904". I tried using a let statement, and was able
> to create the proper value as follows:
>
> %let date = compress(put(today(),mmddyy8.),'/');
>
>
> However, it's not working when I substitute this in the RTF
> file name, as follows:
>
> ODS RTF FILE = "InvName&date.RTF";
>
> I think I'm missing something in the ODS statement, but maybe
> it's just not possible to do this?
>
> TIA,
>
> Melanie
>
|