Date: Thu, 24 Jun 2004 18:07:51 -0400
Reply-To: "Buchanan, Gordon" <gordon.buchanan@GMACRFC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Buchanan, Gordon" <gordon.buchanan@GMACRFC.COM>
Subject: Re: %SYSFUNC and PUT function
You can also use the fact the the %sysfunc function lets you specify a
format as the second parameter. This works fine:
%let v=%sysfunc(abs(&i), z4.);
Just use some function that does not change the value of your number; in
this case I use ABS.
I often use this to reformat date macro variables as in:
%let d=25jun2004;
%let prt_d=%sysfunc(abs("&date"d), mmddyy10.);
On Thu, 24 Jun 2004 01:06:57 -0400, Talbot Michael Katz <topkatz@MSN.COM>
wrote:
>Hi.
>
>I wanted to create integer macro variables of equal length, using the Zw.d
>format, e.g., 0001, 0002, 0003,...
>
>I figured I would do something like:
>%let v = %sysfunc(put(&i.,Z4.));
|