Date: Thu, 8 Jun 2000 16:43:42 EDT
Reply-To: Bernard Tremblay <imaginasys@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bernard Tremblay <imaginasys@HOTMAIL.COM>
Subject: Re: formatting a macro variable
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Richard,
Use a SAS format with the %sysfunc fonction and the putn function.
%let macvar = 600000;
%put %sysfunc(putn(&macvar,comma10.));
returns the following output:
3 %let macvar = 600000;
4 %put %sysfunc(putn(&macvar,comma10.));
SYMBOLGEN: Macro variable MACVAR resolves to 600000
600,000
Regards,
\\\|///
\\ - - //
( @ @ )
+-----oOOo-(_)-oOOo--+-----------------------------------+
| Bernard Tremblay | |
| CSST | Tel: (418) 528-9313 |
| | Fax: (418) 528-1493 |
| | Int: Bernard.Tremblay@csst.qc.ca |
+----------------------------+---------------------------+
| Imaginasys enr | Res: (418) 658-1411 |
| | Int: bertrem@quebectel.com |
| | Hot: imaginasys@hotmail.com |
+--------------Oooo--+-----------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>From: "Richard W. Graham" <Richard.Graham@INTELLICISIONS.COM>
>Reply-To: Richard.Graham@INTELLICISIONS.COM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: formatting a macro variable
>Date: Thu, 8 Jun 2000 15:44:13 -0400
>
>I've got a macro variable that contains a number i.e., macvar = 600000
>
>does anyone know how I might format the value with commas? macvar =
>600,000
>
>
>Richard W. Graham
>Senior Consultant, Technology Delivery
>Intellicisions Data Inc.
>2000 Regency Parkway, Suite 355
>Cary, NC 27511
>(919) 467-0505
>(Embedded image moved to file: pic25736.gif)
>
><< pic25736.gif >>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
|