For some reasons I'm unable to complete the Recency, Frequency, and Monetary Analysis in SAS EG 7.1.
My sample data is as follows. It is customer data.
conkey | rec_pur | Total_bal | no_prods |
1000000 | 1/1/1946 | 712.09 | 1 |
1000001 | 5/1/1992 | 26036.74 | 2 |
1000002 | 6/19/2007 | 105747.2 | 10 |
1000005 | 7/24/2000 | 41.99 | 2 |
Here conkey,Total_bal and no_prods is numeric variable. rec_pur is SAS date format.
Can someone advise the likely workaround or solution to come past this issue?
Log below:
1 The SAS System 05:35 Friday, March 13, 2015
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Recency, Frequency, and Monetary Analysis (5)';
4 %LET _CLIENTPROJECTPATH='';
5 %LET _CLIENTPROJECTNAME='';
6
7 ODS _ALL_ CLOSE;
8 ODS PROCTITLE;
9 OPTIONS DEV=ACTIVEX;
10 GOPTIONS XPIXELS=0 YPIXELS=0;
11 FILENAME EGSR TEMP;
12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
13 STYLE=HtmlBlue
14 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
15 NOGTITLE
16 NOGFOOTNOTE
17 GPATH=&sasworklocation
18 ENCODING=UTF8
19 options(rolap="on")
20 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
21
22 GOPTIONS ACCESSIBLE;
WARNING: Apparent invocation of macro AARFM not resolved.
23
24
25 %aaRFM;
_
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
WARNING: Apparent invocation of macro EM_RFM_CONTROL not resolved.
26 %EM_RFM_CONTROL
_
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
27 (
28 Mode = C,
29 InData = WORK.RFM,
30 CustomerID = conkey,
31 N_R_Grp = 5,
32 N_F_Grp = 5,
33 N_M_Grp = 5,
34 BinMethod = N,
35 PurchaseDate = ,
36 PurchaseAmt = ,
37 SetMiss = Y,
38 SummaryFunc = SUM,
39 MostRecentDate = rec_pur,
40 NPurchase = no_prods,
41 TotPurchaseAmt = Total_bal,
42 MonetizationMap = Y,
43 BinChart = Y,
44 BinTable = N,
45 OutData = WORK.RFM_TABLE_0003,
46 Recency_Score = recency_score,
47 Frequency_Score = frequency_score,
48 Monetary_Score = monetary_score,
49 RFM_Score = rfm_score
50 );
51
52 GOPTIONS NOACCESSIBLE;
53 %LET _CLIENTTASKLABEL=;
54 %LET _CLIENTPROJECTPATH=;
55 %LET _CLIENTPROJECTNAME=;
56
57 ;*';*";*/;quit;run;
58 ODS _ALL_ CLOSE;
59
60
61 QUIT; RUN;
62
Looks like the task is running Enterprise Miner code. Does your SAS server have Enterprise Miner installed and licensed? In the EG server list right-click on the server name, select Properties then select Products to confirm.
No, SAS server is not licensed for Enterprise Miner. How to accomplish this task in SAS EG?
Then it is simply not possible. There are a number of tasks in EG that require certain SAS server-based products. If they are not available then the tasks cannot be run.
Do you have a SAS Enterprise Miner license?
No, SAS server is not licensed for Enterprise Miner.
How it can be accomplished without EM? Because I should be able to do this task in EG (without EM) according to documentation.
http://blogs.sas.com/content/sasdummy/2014/01/20/rfm-in-sas-eg/
Contact Tech Support if you're sure your Server is SAS 9.4
As Reeza says, RFM was moved to Base SAS starting with SAS 9.4. If you are on an earlier version then I think my original response is still correct.
If you are on SAS 9.4 then it is possible, but perhaps the required components were not installed.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.