|
When using %sysfunc, one has to bear in mind that it cannot be applied to
nested functions - each function requires its own %sysfunc. Further, the PUT
and INPUT functions are not available to the %sysfunc function. One needs to
use the corresponding SCL functions:
footnote1 "%sysfunc( putn (%sysfunc( inputn(&sysdate., date7.)) ,
worddate28.) )";
I agree the solution below is more elegant.
%sysfunc is a powerful tool to extend the capabilities of the macro facility
and is definitely worth reading up.
Christoph Edel
IMS Health, Frankfurt (Germany)
CEdel@de.imshealth.com
> -----Original Message-----
> From: Ray Pass [SMTP:raypass@WORLDNET.ATT.NET]
> Sent: Monday, April 19, 1999 11:43 PM
> To: SAS-L@UGA.CC.UGA.EDU
> Subject: Unfinished SAS-L Live from Miami Beach business
>
> In one of the more lively discussions at the session, the question to be
> answered was how to put the automatic variable &sysdate out in a footnote
> with a format other than the default date7. Since none of us were syntax
> certified, we couldn't quite come up with the correct code at the moment,
> although we knew how to do it. I forgot about it for a few days and I
> just
> now remembered to post "an" answer.
>
> One solution would be to use the today() function instead of the &sysdate
> automatic variable, and take advantage of the fact that the %sysfunc
> function can have an output format associated with it. It's easy enough:
>
> footnote "%sysfunc(today(),mmddyy10.)";
>
> Of course you can use any output date format you like. I leave it to my
> colleague DR to post the non %sysfunc solution (with or without &sysdate)
> since he was in such an anti-%sysfunc at the time :-) Go Dave!
>
> Ray
>
>
> *------------------------------------------------*
> | Ray Pass voice: (914) 693-5553 |
> | Ray Pass Consulting fax: on request |
> | 5 Sinclair Place |
> | Hartsdale, NY 10530 e-mail: raypass@att.net |
> *------------------------------------------------*
|