| Date: | Thu, 31 Jul 2008 13:15:11 -0400 |
| Reply-To: | SAS_learner <proccontents@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | SAS_learner <proccontents@GMAIL.COM> |
| Subject: | Re: Formating a Macro value ?? |
|
| In-Reply-To: | <9480BF48-E90D-4C6D-8239-50275814F59B@alumni.stanford.org> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Thanks Jack, for the help
On Thu, Jul 31, 2008 at 1:12 PM, Jack Hamilton <jfh@alumni.stanford.org>wrote:
> Documentation on %SYSFUNC can be found at
>
>
> http://support.sas.com/onlinedoc/913/getDoc/en/mcrolref.hlp/z3514sysfunc.htm
>
> Leaning how to find something in the online documentation is an important
> skill for SAS programmers.
>
> You might also want to look at some user group papers, which can be found
> through
>
> http://www.lexjansen.com/
>
>
>
> --
> Jack Hamilton
> jfh@alumni.stanford.org
>
>
>
>
> On Jul 31, 2008, at 10:07 am, SAS_learner wrote:
>
> thank you data _null_ like always very intelligent solution . I did not
>> know
>> about the %sysfunc function. What it does ??
>>
>> New thing learned today
>> thanks for the help
>>
>> SL
>>
>> On Thu, Jul 31, 2008 at 11:51 AM, data _null_, <datanull@gmail.com>
>> wrote:
>>
>> How about skipping the data step and just put TOD directly in the
>>> place where it is needed. SYSFUNC has a format parameter.
>>>
>>> proc printto
>>> log="&logdir.mntx3301_lis_log_%sysfunc(datetime(),datetime20.).txt"
>>> new ;
>>> run;
>>>
>>>
>>> On 7/31/08, Duell, Bob <BD9439@att.com> wrote:
>>>
>>>> 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
>>>>
>>>>
>>>
>
|