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>
Organization: http://groups.google.com/
Subject: Newbie needs help with Proc tabulate
Content-Type: text/plain; charset=ISO-8859-1
Hello,
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 ;
-----------------------------------
%LET lr=0;
%LET hr=23;
*defining lower and higher range. the data set has only 0-23 months of
data;
libname aic '/archie/data/aic';
DATA temp;
set aic.z200107 (KEEP = REGDATE0 CLOSDATE0 LOANBL&LR-LOANBL&HR
BAD&LR-BAD&HR );
IF REGDATE0 = CLOSDATE0 THEN DELETE;
ARRAY BAD[24] BAD0-BAD23;
ARRAY LOANAMNT[24] LOANBL0-LOANBL23;
ARRAY BADBAL[24] BADBAL0-BADBAL23;
DO I=1 To 24;
IF BAD[I]=1 THEN BADBAL[I]= LOANAMNT[I];
END;
--------------------
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?
Thanks again.
Ayon Rahman