Date: Mon, 30 Aug 2004 22:56:52 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: easy way to strip formats & create new vars with formatted
values?
Try something like:
proc sql;
create table new as
select vvalue(var1) as var1,
vvalue(var2) as var2,
. . .
vvalue(varn) as varn
from old;
quit;
This assume Version 9. Otherwise you can do the same thing with VFORMAT and
PUTN and PUTC; it's a bit messier.
If there are a lot of variables, tap DICTIONARY.COLUMNS to generate the
code. There are lots of examples of that in the archives.
On Mon, 30 Aug 2004 16:03:17 -0400, Igor Kurbeko
<ikurbeko@ATHEROGENICS.COM> wrote:
>Hi, folks.
>
>
>
>Does anyone know an easy way to strip all formats in a dataset and
>display formatted values as new values using the same vars (maybe
>changes type char or num where necessary)
>
>
>
>Thanks
>
>
>
>Igor Kurbeko
>
>Clinical Programmer Analyst
>
>678 336 4328
>
>ikurbeko@atherogenics.com
>
>
>
>Imagination is more important than knowledge
>
>
|