From: JanineJDL on
Hi guys.
I’m required to track the outcome of a decision agent on a weekly
basis. Dimensions being customer number, product and decision agent
approved or decline outcome. In order to monitor if decision agent is
stable.
A merge wont work as a customer can move in-between the outcome status
and product offered on a weekly basis. This is a real first one for me
and having a bit a "writers block".
Any help? Suggestions?

JDL
From: Arthur Tabachneck on
Janine,

It is difficult to respond without knowing more about what you are
trying to do.

First, example data files would definitely help, preferably in the
form of a data step.
Second, an example data file or output, showing what you want to end
up with would also be essential.

Art
-----------
On May 14, 3:52 am, JanineJDL <janine.dela...(a)standardbank.co.za>
wrote:
> Hi guys.
> I’m required to track the outcome of a decision agent on a weekly
> basis. Dimensions being customer number, product and decision agent
> approved or decline outcome. In order to monitor if decision agent is
> stable.
> A merge wont work as a customer can move in-between the outcome status
> and product offered on a weekly basis. This is a real first one for me
> and having a bit a "writers block".
> Any help? Suggestions?
>
> JDL

From: Arthur Tabachneck on
Janine sent me the following off-line:

On May 15, 5:41 pm, Arthur Tabachneck <art...(a)netscape.net> wrote:
> Janine,
>
> It is difficult to respond without knowing more about what you are
> trying to do.
>
> First, example data files would definitely help, preferably in the
> form of a data step.
> Second, an example data file or output, showing what you want to end
> up with would also be essential.
>
> Art
> -----------
> On May 14, 3:52 am, JanineJDL <janine.dela...(a)standardbank.co.za>
> wrote:
>
>
>
> > Hi guys.
> > I’m required to track the outcome of a decision agent on a weekly
> > basis. Dimensions being customer number, product and decision agent
> > approved or decline outcome. In order to monitor if decision agent is
> > stable.
> > A merge wont work as a customer can move in-between the outcome status
> > and product offered on a weekly basis. This is a real first one for me
> > and having a bit a "writers block".
> > Any help? Suggestions?
>
> > JDL- Hide quoted text -
>
> - Show quoted text -

Hi

Have been working on it over the weekend and seem to have come up with
a fairly simple solution.

Data step below:


DATA Prescore.Botswana_vintage_Report (keep= CUS_N RUNDATE
Decision_Cat PRODUCT_TYPE1 LIMIT1 Week1 Week2 Week3 Week4 Week5);
SET Prescore.Botswana_vintage;
format Week1 1.
Week2 1.
Week3 1.
Week4 1.
Week5 1.;
if upcase(compress(RUNDATE))= '2010-02-28'd then Week1 = 1.;
Else Week1 = 0.;
if upcase(compress(RUNDATE))= '2010-03-07'd then Week2 = 1.;
Else Week2 = 0.;
if upcase(compress(RUNDATE))= '2010-03-14'd then Week3 = 1.;
Else Week3 = 0.;
if upcase(compress(RUNDATE))= '2010-03-21'd then Week4 = 1.;
Else Week4 = 0.;
if upcase(compress(RUNDATE))= '2010-03-28'd then Week5 = 1.;
Else Week5 = 0.;
Run;

However SAS log giving me

" ERROR: Invalid date/time/datetime constant
ERROR 77-185: Invalid number conversion"

Outcome Im trying to achieve should be something like this

Customer Product Week1 Week2 Week3 Week4
Janine FTL 1 0 0 1

Simply I reflected in week 1 and week 4 file run.
The second problem I will be having is that I have a few other
dimensions ie product changes, approve or decline

On May 14, 3:52 am, JanineJDL <janine.dela...(a)standardbank.co.za>
wrote:
> Hi guys.
> I’m required to track the outcome of a decision agent on a weekly
> basis. Dimensions being customer number, product and decision agent
> approved or decline outcome. In order to monitor if decision agent is
> stable.
> A merge wont work as a customer can move in-between the outcome status
> and product offered on a weekly basis. This is a real first one for me
> and having a bit a "writers block".
> Any help? Suggestions?
>
> JDL

Janine,

I've posted your response to SAS-L as sending questions to individual
SAS-Lers defeats two of the major benefits of SAS-L: collaboration and
historical retrieval.

I don't have time to look at your code this morning, but did notice a
couple of things. First, in using a date constant, you have to use a
valid one. Try "28FEB2010"d instead of "2010-02-28"d, 7MAR2010"d
instead of "2010-03-07"d, etc. However, I saw a related inconsistency
in your code, namely that you were using the compress function on
rundate which you were then comparing with the date constant. Is
rundate a character or date variable?

Art