We are on 6.3 Hotfix 0.1 What we are challenged with is performing segmentation in the tool and having it be output as an optional field as the tool doesn’t seem to allow us to use IF or CASE statement-like functionality What I mean by this is Let’s say the output of my list is BAN CTN City Device ARPU Segment1 Segment2 1 2 Mtl Iphone 25 Cell4 Key1 1 6 Tor BB 200 Cell4 Key2 3 7 Cgy Samsg 30 Cell2 Null 4 8 Van Iphone 40 Cell2 Key1 5 9 Hfx Iphone 60 Cell3 Key3 Rules are as follows If sum(ARPU) per BAN <30 then segment1 = Cell1 If sum(ARPU) per BAN <50 then segment1 = Cell2 If sum(ARPU) per BAN <100 then segment1 = Cell3 If sum(ARPU) per BAN <300 then segment1 = Cell4 If city in (Mtl,Tor,Van) and device = ‘Iphone’ Then segment2 = ‘Key1’ If device = ‘BB’ Then segment2 = ‘Key2’ If city = “Hfx’ then segment2 = ‘Key3’ Here is the real code we are trying to implement /* keycode */ rsubmit; proc sql; update svr.&Campaign_Name._ilp_07 set OPT1 = 'BAN:$' || strip(put(all_ban_mm_arpu, 10.2)) || ';' || 'CTN:$' || strip(put(all_mm_arpu_pre,10.2)) , OPT2 = case when NO_OF_LIVE_CTNS = 1 then 'SL' else 'ML - ' || strip(put(NO_OF_LIVE_CTNS,4.)) end , OPT3 = strip(put(all_bl_data_pct,8.)) || '% Usage' , OPT4 = strip(OFFR_SEGMENT) , OPT5 = strip(KEY_ATTRIBUTE) , OPT6 = case when offr_Lead_Smartphone_price is null then '' when language = 'EN' then '$' || strip(put(offr_Lead_Smartphone_price, 8.)) else strip(put(offr_Lead_Smartphone_price, 8.)) || '$' end , OPT7 = case when offr_Lead_Smartphone_price is null then '' else strip(offr_Lead_Smartphone_GB_disp) end , OPT8 = case when NO_OF_LIVE_CTNS > 1 then '' when Share_Type <> 'SHARE EVERYTHING' then '' when offr_Lead_Smartphone_price - msf <= 0 then '' when language = 'EN' and offr_Lead_Smartphone_price - msf > 0 then '$' || strip(put(abs(offr_Lead_Smartphone_price - msf),best8.2)) || ' more' when language = 'FR' and offr_Lead_Smartphone_price - msf > 1 then strip(put(abs(offr_Lead_Smartphone_price - msf),best8.2)) || '$ de plus par mois' end , OPT9 = '' , OPT10 = case when all_ban_data_usage = 0 then 'VOICE ONLY' else 'VOICE & DATA' end , WES = Share_Type , KEYCODE = 'TARGET' , MKT_ACCOUNT_TYPE = case when has_data_ind = 1 then 'D' else 'V' end ; quit; endrsubmit; rsubmit; proc sql; update svr.&Campaign_Name._ilp_08 set keycode = case when all_ban_data_usage = 0 then 'VOICE' when Share_Type <> 'SHARE EVERYTHING' and OFFR_LEAD_SOC is not null and all_bl_data_pct >= 90 then 'LEGDATA' when Share_Type <> 'SHARE EVERYTHING' and OFFR_LEAD_SOC is not null and all_bl_data_pct >= 70 then 'LEGREG' when Share_Type = 'SHARE EVERYTHING' and OFFR_LEAD_SOC is not null and SE_Plus_Flag_Lead = 1 and all_bl_data_pct >= 90 then 'SEDATA' when Share_Type = 'SHARE EVERYTHING' and OFFR_LEAD_SOC is not null and SE_Plus_Flag_Lead = 1 and all_bl_data_pct >= 70 then 'SEREG' when Share_Type <> 'SHARE EVERYTHING' then 'LEGALL' when Share_Type = 'SHARE EVERYTHING' then 'SEALL' else 'N/A' end ; quit; endrsubmit;
... View more