Date: Wed, 9 Jul 2008 14:58:37 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: can this code be more concise?
In-Reply-To: <200807091943.m69HmQAg009357@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Yes. Skip step 1.
/*Step 2*/
proc freq data=id06.id06s1;
tables id9;
format id9 $1.;
run;
On 7/9/08, Jerry <i89rt5@gmail.com> wrote:
> Hi,
>
> I'm wondering the following simple 2-step process (Data step + Proc Freq)
> can be possibly reduced to only 1 step to make it more concise.
>
> Thanks!
>
> Jerry
>
> /*Purpose: Check the frequency distribution of the 9th digit of ID*/
>
> libname id06 "/id/2006";
>
> /*Step 1*/
> data id9;
> length id9 $1;
> set id06.id06s1 (keep=id);
> id9=substr(id,9,1);
> run;
>
> /*Step 2*/
> proc freq data=id9;
> tables id9;
> run;
>
|