LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 31 Jul 2008 08:38:40 -0700
Reply-To:   "Duell, Bob" <BD9439@ATT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Duell, Bob" <BD9439@ATT.COM>
Subject:   Re: Formating a Macro value ??
Comments:   To: SAS_learner <proccontents@gmail.com>
In-Reply-To:   A<c2192a610807310829mf256397v5b60b5d4363aac0f@mail.gmail.com>
Content-Type:   text/plain; charset="us-ascii"

Because CALL SYMPUT does not use the formatted value of the variable. (BTW, this annoys me sometimes.) Try this instead:

Data test ; time = datetime(); format time datetime20.; call symput('time', put( time, datetime20. )); Run; proc printto log="&logdir.mntx3301_lis_log_&time..txt" new ; run; Proc Print ; Run;

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS_learner Sent: Thursday, July 31, 2008 8:29 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Formating a Macro value ??

hello all,

Data test ; time = %sysfunc(datetime()); Format time datetime20.; call symput('time', time ); Run; proc printto log="&logdir.mntx3301_lis_log_&time..txt" new ; run; Proc Print ; Run;

The Purpose is get a log file with the date and time so that I know what is log that has been run when ?? but some how using above code dose result in formatted value of macro time. What is that I am missing ??

thanks SL


Back to: Top of message | Previous page | Main SAS-L page