Date: Fri, 30 Jul 2004 14:20:58 +1200
Reply-To: robin.templer@xtra.co.nz
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robin & Charmaine Templer <robin.templer@XTRA.CO.NZ>
Subject: Re: $
Content-Type: text/plain; charset=ISO-8859-1
Use the COMMA. informat when reading the data in.
Following is tested code.
data temp ;
input test :comma8.2 ;
put test= ;
cards;
$2.4
$40.3
$29.4
$13.0
$13.3
$6.4
$45.1
;
>
> From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
> Date: 2004/07/30 Fri AM 11:03:41 GMT+12:00
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: $
>
> x = substring(x,2); should produce a character variable without the $.
>
> If you need a numeric variable, try y = input(substring(x,2),10.0);
>
> Barry Schwarz
> OS/390 Systems Programmer
> Phone: 253-773-4221
> Pager: 206-906-2596
> Fax: 253-773-1257
> Mail stop: 80-JE
> e-mail: barry.a.schwarz@boeing.com
>
>
> -----Original Message-----
> From: June [mailto:spairz@YAHOO.COM]
> Sent: Thursday, July 29, 2004 2:44 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: $
>
>
> Hi,
> How could I get rid off the dollar sign and only keep the numbers?
> $2.4
> $40.3
> $29.4
> $13.0
> $13.3
> $6.4
> $45.1
>
> Thanks.
>
|