Date: Wed, 12 Sep 2001 09:32:57 -0700
Reply-To: "A. Rahman" <ayonrahman@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "A. Rahman" <ayonrahman@HOTMAIL.COM>
Subject: Newbie needs help with Proc tabulate
Content-Type: text/plain; charset=ISO-8859-1
I'm new to SAS and programming in general. I'd very much appreciate
your help. Thanks in advance.
My data set has data for 24 months. I'm taking only 4 variables,
Registration date, Close date, Loan Balance.The last variable is just
a flag that tell you if the account has gone "bad" or not. Bad=1 means
account is "bad". But, I need to work with only those accounts where
the Reg. date and close dates are not equal. If an account is "Bad", I
need to assign the Loan balance as "Bad Balance". In my final results
I need to see, the number of accounts and Bad balance grouped by
quarters. So far, my code looks like this.
OPTIONS OBS=1000 nodate nonumber ;
*defining lower and higher range. the data set has only 0-23 months of
libname aic '/archie/data/aic';
set aic.z200107 (KEEP = REGDATE0 CLOSDATE0 LOANBL&LR-LOANBL&HR
IF REGDATE0 = CLOSDATE0 THEN DELETE;
ARRAY BAD BAD0-BAD23;
ARRAY LOANAMNT LOANBL0-LOANBL23;
ARRAY BADBAL BADBAL0-BADBAL23;
DO I=1 To 24;
IF BAD[I]=1 THEN BADBAL[I]= LOANAMNT[I];
How should I go about finding the number of accounts? Use Proc Freq?
How can I use Proc Tabulate to Group the data by quarters?