BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Shrutibhatnagar
Obsidian | Level 7

libname class1 '/folders/myfolders/mysas';
proc import datafile='/folders/myfolders/mysas/smb.csv'
dbms=csv out=class1.smb replace;
libname class2 '/folders/myfolders/mysas';
proc import datafile='/folders/myfolders/mysas/churners_and_labels.xls'
dbms=xls out=labels replace;sheet=labels;
DATA labels;
SET class1.smb;
LABEL PRODUCT_ID="Line number";
label Year="Year";
label AON="Age on network";
label CELL_CALL_CNT_M1 ="count of cell calls-April";
label CELL_CALL_CNT_M2 ="count of cell calls-May";
label CELL_CALL_CNT_M3 ="count of cell calls-June";
label CELL_CALL_CNT_M4 ="count of cell calls-July";
label CELL_CALL_CNT_M5 ="count of cell calls-August";
label CELL_CALL_CNT_M6 ="count of cell calls-September";
label CELL_CALL_SEC_M1= "Cell calls duration in seconds-April";
label CELL_CALL_SEC_M2 ="Cell calls duration in seconds-May";
label CELL_CALL_SEC_M3 ="Cell calls duration in seconds-June";
label CELL_CALL_SEC_M4 ="Cell calls duration in seconds-July";
label CELL_CALL_SEC_M5 ="Cell calls duration in seconds-August";
label CELL_CALL_SEC_M6 ="Cell calls duration in seconds-September";
label CELL_CALL_avg_dur_M1 ="Average cell calls duration-April";
label CELL_CALL_avg_dur_M2= "Average cell calls duration-May";
label CELL_CALL_avg_dur_M3= "Average cell calls duration-June";
label CELL_CALL_avg_dur_M4= "Average cell calls duration-July";
label CELL_CALL_avg_dur_M5= "Average cell calls duration-August" ;
label CELL_CALL_avg_dur_M6 ="Average cell calls duration-September";
label CELL_USAGE_CHARGE_AMT_M1="Cell usage charge amount-April";
label CELL_USAGE_CHARGE_AMT_M2= "Cell usage charge amount-May";
label CELL_USAGE_CHARGE_AMT_M3= "Cell usage charge amount-June";
label CELL_USAGE_CHARGE_AMT_M4= "Cell usage charge amount-July";
label CELL_USAGE_CHARGE_AMT_M5= "Cell usage charge amount-August";
label CELL_USAGE_CHARGE_AMT_M6= "Cell usage charge amount-September";
label DATA_CALL_CNT_M1 ="count of Data calls-April";
label DATA_CALL_CNT_M2 ="count of Data calls-May";
label DATA_CALL_CNT_M3= "count of Data calls-June";
label DATA_CALL_CNT_M4="count of Data calls-July";
label DATA_CALL_CNT_M5= "count of Data calls-August";
label DATA_CALL_CNT_M6= "count of Data calls-September";
label DATA_CALL_SEC_M1= "Data calls duration in seconds-April";
label DATA_CALL_SEC_M2= "Data calls duration in seconds-May";
label DATA_CALL_SEC_M3= "Data calls duration in seconds-June";
label DATA_CALL_SEC_M4= "Data calls duration in seconds-July";
label DATA_CALL_SEC_M5= "Data calls duration in seconds-August";
label DATA_CALL_SEC_M6= "Data calls duration in seconds-September";
label DATA_CALL_avg_dur_M1= "Average Data calls duration-April";
label DATA_CALL_avg_dur_M2= "Average Data calls duration-May";
label DATA_CALL_avg_dur_M3= "Average Data calls duration-June";
label DATA_CALL_avg_dur_M4= "Average Data calls duration-July";
label DATA_CALL_avg_dur_M5= "Average Data calls duration-August" ;
label DATA_CALL_avg_dur_M6= "Average Data calls duration-September";
label DATA_USAGE_CHARGE_AMT_M1 ="Data usage charge amount-April";
label DATA_USAGE_CHARGE_AMT_M2= "Data usage charge amount-May";
label DATA_USAGE_CHARGE_AMT_M3= "Data usage charge amount-June";
label DATA_USAGE_CHARGE_AMT_M4= "Data usage charge amount-July";
label DATA_USAGE_CHARGE_AMT_M5="Data usage charge amount-August ";
label DATA_USAGE_CHARGE_AMT_M6= "Data usage charge amount-September";
label INT_CALL_CNT_M1 ="count of International calls calls-April";
label INT_CALL_CNT_M2 ="count of International calls calls-May";
label INT_CALL_CNT_M3 ="count of International calls calls-June";
label INT_CALL_CNT_M4 ="count of International calls calls-July";
label INT_CALL_CNT_M5 ="count of International calls calls-August" ;
label INT_CALL_CNT_M6="count of International calls calls-September";
label INT_CALL_SEC_M1 ="International calls calls duration in seconds-April";
label INT_CALL_SEC_M2="International calls calls duration in seconds-May";
label INT_CALL_SEC_M3="International calls calls duration in seconds-June";
label INT_CALL_SEC_M4 ="International calls calls duration in seconds-July";
label INT_CALL_SEC_M5="International calls calls duration in seconds-August ";
label INT_CALL_SEC_M6 ="International calls calls duration in seconds-September";
label INT_CALL_avg_dur_M1="Average International calls calls duration-April";
label INT_CALL_avg_dur_M2="Average International calls calls duration-May";
label INT_CALL_avg_dur_M3="Average International calls calls duration-June";
label INT_CALL_avg_dur_M4="Average International calls calls duration-July";
label INT_CALL_avg_dur_M5="Average International calls calls duration-August ";
label INT_CALL_avg_dur_M6="Average International calls calls duration-September";
label INT_USAGE_CHARGE_AMT_M1="International calls usage charge amount-April";
label INT_USAGE_CHARGE_AMT_M2="International calls usage charge amount-May";
label INT_USAGE_CHARGE_AMT_M3="International calls usage charge amount-June";
label INT_USAGE_CHARGE_AMT_M4="International calls usage charge amount-July";
label INT_USAGE_CHARGE_AMT_M5="International calls usage charge amount-August ";
label INT_USAGE_CHARGE_AMT_M6="International calls usage charge amount-September";
label LOCAL_CALL_CNT_M1= "count of Local calls calls-April";
label LOCAL_CALL_CNT_M2="count of Local calls calls-May";
label LOCAL_CALL_CNT_M3= "count of Local calls calls-June";
label LOCAL_CALL_CNT_M4= "count of Local calls calls-July";
label LOCAL_CALL_CNT_M5= "count of Local calls calls-August ";
label LOCAL_CALL_CNT_M6="count of Local calls calls-September";
label LOCAL_CALL_SEC_M1= "Local calls calls duration in seconds-April";
label LOCAL_CALL_SEC_M2= "Local calls calls duration in seconds-May";
label LOCAL_CALL_SEC_M3= "Local calls calls duration in seconds-June";
label LOCAL_CALL_SEC_M4= "Local calls calls duration in seconds-July";
label LOCAL_CALL_SEC_M5= "Local calls calls duration in seconds-August" ;
label LOCAL_CALL_SEC_M6= "Local calls calls duration in seconds-September";
label LOCAL_CAL_avg_dur_M1="Average Local calls calls duration-April";
label LOCAL_CAL_avg_dur_M2="Average Local calls calls duration-May";
label LOCAL_CAL_avg_dur_M3="Average Local calls calls duration-June";
label LOCAL_CAL_avg_dur_M4="Average Local calls calls duration-July";
label LOCAL_CAL_avg_dur_M5="Average Local calls calls duration-August" ;
label LOCAL_CAL_avg_dur_M6="Average Local calls calls duration-September";
label LOCAL_USAGE_CHARGE_AMT_M1= "Local calls usage charge amount-April";
label LOCAL_USAGE_CHARGE_AMT_M2=" Local calls usage charge amount-May";
label LOCAL_USAGE_CHARGE_AMT_M3= "Local calls usage charge amount-June";
label LOCAL_USAGE_CHARGE_AMT_M4= "Local calls usage charge amount-July";
label LOCAL_USAGE_CHARGE_AMT_M5= "Local calls usage charge amount-August ";
label LOCAL_USAGE_CHARGE_AMT_M6=" Local calls usage charge amount-September";
label NAT_CALL_CNT_M1= "count of National calls calls-April";
label NAT_CALL_CNT_M2= "count of National calls calls-May";
label NAT_CALL_CNT_M3 ="count of National calls calls-June";
label NAT_CALL_CNT_M4 ="count of National calls calls-July";
label NAT_CALL_CNT_M5 ="count of National calls calls-August ";
label NAT_CALL_CNT_M6= "count of National calls calls-September";
label NAT_CALL_SEC_M1= "National calls calls duration in seconds-April";
label NAT_CALL_SEC_M2 ="National calls calls duration in seconds-May";
label NAT_CALL_SEC_M3 ="National calls calls duration in seconds-June";
label NAT_CALL_SEC_M4 ="National calls calls duration in seconds-July";
label NAT_CALL_SEC_M5= "National calls calls duration in seconds-August" ;
label NAT_CALL_SEC_M6= "National calls calls duration in seconds-September";
label NAT_CALL_avg_dur_M1 ="Average National calls calls duration-April";
label NAT_CALL_avg_dur_M2= "Average National calls calls duration-May";
label NAT_CALL_avg_dur_M3 ="Average National calls calls duration-June";
label NAT_CALL_avg_dur_M4 ="Average National calls calls duration-July";
label NAT_CALL_avg_dur_M5= "Average National calls calls duration-August" ;
label NAT_CALL_avg_dur_M6 ="Average National calls calls duration-September";
label NAT_USAGE_CHARGE_AMT_M1 ="National calls usage charge amount-April";
label NAT_USAGE_CHARGE_AMT_M2= "National calls usage charge amount-May";
label NAT_USAGE_CHARGE_AMT_M3 ="National calls usage charge amount-June";
label NAT_USAGE_CHARGE_AMT_M4= "National calls usage charge amount-July";
label NAT_USAGE_CHARGE_AMT_M5= "National calls usage charge amount-August ";
label NAT_USAGE_CHARGE_AMT_M6 ="National calls usage charge amount-September";
label ONE_TIME_CHARGE_AMT_M1= "One time charge-April";
label ONE_TIME_CHARGE_AMT_M2 ="One time charge-May";
label ONE_TIME_CHARGE_AMT_M3= "One time charge-June";
label ONE_TIME_CHARGE_AMT_M4=" One time charge-July";
label ONE_TIME_CHARGE_AMT_M5= "One time charge-August ";
label ONE_TIME_CHARGE_AMT_M6 ="One time charge-September";
label OTHER_CALL_CNT_M1 ="count of cell calls-April";
label OTHER_CALL_CNT_M2 ="count of cell calls-May";
label OTHER_CALL_CNT_M3= "count of cell calls-June";
label OTHER_CALL_CNT_M4 ="count of cell calls-July";
label OTHER_CALL_CNT_M5 ="count of cell calls-August ";
label OTHER_CALL_CNT_M6= "count of cell calls-September";
label OTHER_CALL_SEC_M1 ="Cell calls duration in seconds-April";
label OTHER_CALL_SEC_M2 ="Cell calls duration in seconds-May";
label OTHER_CALL_SEC_M3= "Cell calls duration in seconds-June";
label OTHER_CALL_SEC_M4 ="Cell calls duration in seconds-July";
label OTHER_CALL_SEC_M5= "Cell calls duration in seconds-August ";
label OTHER_CALL_SEC_M6= "Cell calls duration in seconds-September";
label OTHER_CAL_avg_dur_M1= "Average cell calls duration-April";
label OTHER_CAL_avg_dur_M2= "Average cell calls duration-May";
label OTHER_CAL_avg_dur_M3=" Average cell calls duration-June";
label OTHER_CAL_avg_dur_M4=" Average cell calls duration-July";
label OTHER_CAL_avg_dur_M5= "Average cell calls duration-August ";
label OTHER_CAL_avg_dur_M6= "Average cell calls duration-September";
label OTHER_USAGE_CHARGE_AMT_M1= "Cell usage charge amount-April";
label OTHER_USAGE_CHARGE_AMT_M2 ="Cell usage charge amount-May";
label OTHER_USAGE_CHARGE_AMT_M3= "Cell usage charge amount-June";
label OTHER_USAGE_CHARGE_AMT_M4= "Cell usage charge amount-July";
label OTHER_USAGE_CHARGE_AMT_M5= "Cell usage charge amount-August ";
label OTHER_USAGE_CHARGE_AMT_M6= "Cell usage charge amount-September";
label OVR_CALL_AVG_DURATION_M1 ="Overall average calls duration-April";
label OVR_CALL_AVG_DURATION_M2= "Overall average calls duration-May";
label OVR_CALL_AVG_DURATION_M3 ="Overall average calls duration-June";
label OVR_CALL_AVG_DURATION_M4 ="Overall average calls duration-July";
label OVR_CALL_AVG_DURATION_M5 ="Overall average calls duration-August ";
label OVR_CALL_AVG_DURATION_M6 ="Overall average calls duration-September";
label RECURRING_CHARGE_AMT_M1= "Recurring bill amount-April";
label RECURRING_CHARGE_AMT_M2= "Recurring bill amount-May";
label RECURRING_CHARGE_AMT_M3= "Recurring bill amount-June";
label RECURRING_CHARGE_AMT_M4= "Recurring bill amount-July";
label RECURRING_CHARGE_AMT_M5= "Recurring bill amount-August ";
label RECURRING_CHARGE_AMT_M6= "Recurring bill amount-September";
label SPEND_AMT_M1= "Spend amount-April";
label SPEND_AMT_M2= "Spend amount-May";
label SPEND_AMT_M3= "Spend amount-June";
label SPEND_AMT_M4= "Spend amount-July";
label SPEND_AMT_M5 ="Spend amount-August ";
label SPEND_AMT_M6= "Spend amount-September";
label TOT_CALL_CNT_M1= "Total calls counts-April";
label TOT_CALL_CNT_M2 ="Total calls counts-May";
label TOT_CALL_CNT_M3 ="Total calls counts-June";
label TOT_CALL_CNT_M4= "Total calls counts-July";
label TOT_CALL_CNT_M5= "Total calls counts-August ";
label TOT_CALL_CNT_M6 ="Total calls counts-September";
label TOT_CALL_SEC_M1 ="Total calls seconds-April";
label TOT_CALL_SEC_M2 ="Total calls seconds-May";
label TOT_CALL_SEC_M3 ="Total calls seconds-June";
label TOT_CALL_SEC_M4 ="Total calls seconds-July";
label TOT_CALL_SEC_M5 ="Total calls seconds-August ";
label TOT_CALL_SEC_M6 ="Total calls seconds-September";
label TOT_CHARGE_AMT_M1= "Total charge amount-April";
label TOT_CHARGE_AMT_M2 ="Total charge amount-May";
label TOT_CHARGE_AMT_M3 ="Total charge amount-June";
label TOT_CHARGE_AMT_M4= "Total charge amount-July";
label TOT_CHARGE_AMT_M5= "Total charge amount-August" ;
label TOT_CHARGE_AMT_M6= "Total charge amount-September";
label USAGE_CHARGE_AMT_M1 ="Total usage charge amount-April";
label USAGE_CHARGE_AMT_M2= "Total usage charge amount-May";
label USAGE_CHARGE_AMT_M3 ="Total usage charge amount-June";
label USAGE_CHARGE_AMT_M4= "Total usage charge amount-July";
label USAGE_CHARGE_AMT_M5 ="Total usage charge amount-August ";
label USAGE_CHARGE_AMT_M6 ="Total usage charge amount-September";
label TCL_DLM ="Ratio of total calls seconds in last month to previous 5 months";
label TCL_DL2M ="Ratio of total calls seconds in last 2 month to previous 4 months";
label TCL_DL3M ="Ratio of total calls seconds in last 3 month to previous 3 months";
label TCH_DLM ="Ratio of total charge amount in last month to previous 5 months";
label TCH_DL2M= "Ratio of total charge amount in last 2 month to previous 4 months";
label TCH_DL3M ="Ratio of total charge amount in last 3 month to previous 3 months";
label LCL_DLM ="Ratio of Local calls seconds in last month to previous 5 months";
label LCL_DL2M= "Ratio of Local calls seconds in last 2 month to previous 4 months";
label LCL_DL3M= "Ratio of Local calls seconds in last 3 month to previous 3 months";
label NCL_DLM ="Ratio of National calls seconds in last month to previous 5 months";
label NCL_DL2M ="Ratio of National calls seconds in last 2 month to previous 4 months";
label NCL_DL3M= "Ratio of National calls seconds in last 3 month to previous 3 months";
label CELL_CALL_SEC_Avg6= "Cell calls duration in seconds (Last 6 months Average)";
label CELL_CALL_avg_dur_Avg6 ="Average cell calls duration (Last 6 months Average)";
label CELL_USAGE_CHARGE_AMT_Avg6 ="Cell usage charge amount (Last 6 months Average)";
label DATA_CALL_CNT_Avg6 ="Count of Data calls (Last 6 months Average)";
label DATA_CALL_SEC_Avg6 ="Data calls duration in seconds (Last 6 months Average)";
label DATA_CALL_avg_dur_Avg6 ="Average data calls duration (Last 6 months Average)";
label DATA_USAGE_CHARGE_AMT_Avg6 ="Data usage charge amount (Last 6 months Average)";
label INT_CALL_CNT_Avg6= "Count of international calls (Last 6 months Average)";
label INT_CALL_SEC_Avg6 ="international calls duration in seconds (Last 6 months Average)";
label INT_CALL_avg_dur_Avg6= "Average international calls duration (Last 6 months Average)";
label INT_USAGE_CHARGE_AMT_Avg6 ="international calls usage charge amount (Last 6 months Average)";
label LOCAL_CALL_CNT_Avg6 ="Count of Local calls (Last 6 months Average)";
label LOCAL_CALL_SEC_Avg6 ="Local calls duration in seconds (Last 6 months Average)";
label LOCAL_CAL_avg_dur_Avg6= "Average local calls duration (Last 6 months Average)";
label LOCAL_USAGE_CHARGE_AMT_Avg6 ="Local calls usage charge amount (Last 6 months Average)";
label NAT_CALL_CNT_Avg6 ="Count of National calls (Last 6 months Average)";
label NAT_CALL_SEC_Avg6 ="National calls duration in seconds (Last 6 months Average)";
label NAT_CALL_avg_dur_Avg6= "Average national calls duration (Last 6 months Average)";
label NAT_USAGE_CHARGE_AMT_Avg6 ="National calls usage charge amount (Last 6 months Average)";
label ONE_TIME_CHARGE_AMT_Avg6= "One time charge amount (Last 6 months Average)";
label OTHER_CALL_CNT_Avg6 ="Count of other calls (Last 6 months Average)";
label OTHER_CALL_SEC_Avg6 ="Other calls duration in seconds (Last 6 months Average)";
label OTHER_CAL_avg_dur_Avg6 ="Average others calls duration (Last 6 months Average)";
label OTHER_USAGE_CHARGE_AMT_Avg6= "Other usage charge amount (Last 6 months Average)";
label OVR_CALL_AVG_DURATION_Avg6= "Overall average calls duration (Last 6 months Average)";
label RECURRING_CHARGE_AMT_Avg6= "Recurring bill amount (Last 6 months Average)";
label SPEND_AMT_Avg6 ="Spend amount (Last 6 months Average)";
label TOT_CALL_CNT_Avg6 ="Total call count (Last 6 months Average)";
label TOT_CALL_SEC_Avg6 ="Total call seconds (Last 6 months Average)";
label TOT_CHARGE_AMT_Avg6= "Total charge amount (Last 6 months Average)";
label USAGE_CHARGE_AMT_Avg6 ="Total usage charge amount (Last 6 months Average)";
label CELL_CALL_SEC_Avg3 ="Cell calls duration in seconds (Last 3 months Average)";
label CELL_CALL_avg_dur_Avg3 ="Average cell calls duration (Last 3 months Average)";
label CELL_USAGE_CHARGE_AMT_Avg3= "Cell usage charge amount (Last 3 months Average)";
label DATA_CALL_CNT_Avg3 ="Count of Data calls (Last 3 months Average)";
label DATA_CALL_SEC_Avg3 ="Data calls duration in seconds (Last 3 months Average)";
label DATA_CALL_avg_dur_Avg3 ="Average data calls duration (Last 3 months Average)";
label DATA_USAGE_CHARGE_AMT_Avg3= "Data usage charge amount (Last 3 months Average)";
label INT_CALL_CNT_Avg3= "Count of international calls (Last 3 months Average)";
label INT_CALL_SEC_Avg3 ="international calls duration in seconds (Last 3 months Average)";
label INT_CALL_avg_dur_Avg3 ="Average international calls duration (Last 3 months Average)";
label INT_USAGE_CHARGE_AMT_Avg3= "international calls usage charge amount (Last 3 months Average)";
label LOCAL_CALL_CNT_Avg3 ="Count of Local calls (Last 3 months Average)";
label LOCAL_CALL_SEC_Avg3 ="Local calls duration in seconds (Last 3 months Average)";
label LOCAL_CAL_avg_dur_Avg3= "Average local calls duration (Last 3 months Average)";
label LOCAL_USAGE_CHARGE_AMT_Avg3 ="Local calls usage charge amount (Last 3 months Average)";
label NAT_CALL_CNT_Avg3= "Count of National calls (Last 3 months Average)";
label NAT_CALL_SEC_Avg3= "National calls duration in seconds (Last 3 months Average)";
label NAT_CALL_avg_dur_Avg3= "Average national calls duration (Last 3 months Average)";
label NAT_USAGE_CHARGE_AMT_Avg3 ="National calls usage charge amount (Last 3 months Average)";
label ONE_TIME_CHARGE_AMT_Avg3 ="One time charge amount (Last 3 months Average)";
label OTHER_CALL_CNT_Avg3 ="Count of other calls (Last 3 months Average)";
label OTHER_CALL_SEC_Avg3 ="Other calls duration in seconds (Last 3 months Average)";
label OTHER_CAL_avg_dur_Avg3 ="Average others calls duration (Last 3 months Average)";
label OTHER_USAGE_CHARGE_AMT_Avg3 ="Other usage charge amount (Last 3 months Average)";
label OVR_CALL_AVG_DURATION_Avg3 ="Overall average calls duration (Last 3 months Average)";
label RECURRING_CHARGE_AMT_Avg3= "Recurring bill amount (Last 3 months Average)";
label SPEND_AMT_Avg3 ="Spend amount (Last 3 months Average)";
label TOT_CALL_CNT_Avg3= "Total call count (Last 3 months Average)";
label TOT_CALL_SEC_Avg3 ="Total call seconds (Last 3 months Average)";
label TOT_CHARGE_AMT_Avg3 ="Total charge amount (Last 3 months Average)";
label USAGE_CHARGE_AMT_Avg3= "Total usage charge amount (Last 3 months Average)";
label CELL_CALL_CNT_DEC2_1 ="Total cell calls count-Change from 2 months to 1 month ";
label CELL_CALL_CNT_DEC3_2 ="Total cell calls count-Change from 3 months to 2 month" ;
label CELL_CALL_CNT_DEC4_3= "Total cell calls count-Change from 4 months to 3 month ";
label CELL_CALL_CNT_DEC5_4 ="Total cell calls count-Change from 5 months to 4 month ";
label CELL_CALL_CNT_DEC6_5= "Total cell calls count-Change from 6 months to 5 month ";
label CELL_CALL_SEC_DEC2_1= "Total cell calls seconds-Change from 2 months to 1 month ";
label CELL_CALL_SEC_DEC3_2 ="Total cell calls seconds-Change from 3 months to 2 month ";
label CELL_CALL_SEC_DEC4_3 ="Total cell calls seconds-Change from 4 months to 3 month ";
label CELL_CALL_SEC_DEC5_4 ="Total cell calls seconds-Change from 5 months to 4 month ";
label CELL_CALL_SEC_DEC6_5 ="Total cell calls seconds-Change from 6 months to 5 month ";
label CELL_CALL_avg_dur_DEC2_1="Average cell calls duration-Change from 2 months to 1 month" ;
label CELL_CALL_avg_dur_DEC3_2 ="Average cell calls duration-Change from 3 months to 2 month ";
label CELL_CALL_avg_dur_DEC4_3= "Average cell calls duration-Change from 4 months to 3 month ";
label CELL_CALL_avg_dur_DEC5_4= "Average cell calls duration-Change from 5 months to 4 month ";
label CELL_CALL_avg_dur_DEC6_5 ="Average cell calls duration-Change from 6 months to 5 month ";
label CELL_USAGE_CHARGE_AMT_DEC2_1 ="Cell usage charge amount-Change from 2 months to 1 month ";
label CELL_USAGE_CHARGE_AMT_DEC3_2= "Cell usage charge amount-Change from 3 months to 2 month ";
label CELL_USAGE_CHARGE_AMT_DEC4_3= "Cell usage charge amount-Change from 4 months to 3 month" ;
label CELL_USAGE_CHARGE_AMT_DEC5_4= "Cell usage charge amount-Change from 5 months to 4 month ";
label CELL_USAGE_CHARGE_AMT_DEC6_5 ="Cell usage charge amount-Change from 6 months to 5 month ";
label INT_CALL_CNT_DEC2_1 ="Total international calls count-Change from 2 months to 1 month ";
label INT_CALL_CNT_DEC3_2 ="Total international calls count-Change from 3 months to 2 month ";
label INT_CALL_CNT_DEC4_3 ="Total international calls count-Change from 4 months to 3 month ";
label INT_CALL_CNT_DEC5_4 ="Total international calls count-Change from 5 months to 4 month ";
label INT_CALL_CNT_DEC6_5 ="Total international calls count-Change from 6 months to 5 month ";
label INT_CALL_SEC_DEC2_1 ="Total international calls seconds-Change from 2 months to 1 month" ;
label INT_CALL_SEC_DEC3_2 ="Total international calls seconds-Change from 3 months to 2 month ";
label INT_CALL_SEC_DEC4_3 ="Total international calls seconds-Change from 4 months to 3 month ";
label INT_CALL_SEC_DEC5_4= "Total international calls seconds-Change from 5 months to 4 month" ;
label INT_CALL_SEC_DEC6_5= "Total international calls seconds-Change from 6 months to 5 month" ;
label INT_CALL_avg_dur_DEC2_1= "Average international calls duration-Change from 2 months to 1 month" ;
label INT_CALL_avg_dur_DEC3_2 ="Average international calls duration-Change from 3 months to 2 month ";
label INT_CALL_avg_dur_DEC4_3 ="Average international calls duration-Change from 4 months to 3 month ";
label INT_CALL_avg_dur_DEC5_4 ="Average international calls duration-Change from 5 months to 4 month" ;
label INT_CALL_avg_dur_DEC6_5 ="Average international calls duration-Change from 6 months to 5 month" ;
label INT_USAGE_CHARGE_AMT_DEC2_1 ="international usage charge amount-Change from 2 months to 1 month ";
label INT_USAGE_CHARGE_AMT_DEC3_2 ="international usage charge amount-Change from 3 months to 2 month ";
label INT_USAGE_CHARGE_AMT_DEC4_3 ="international usage charge amount-Change from 4 months to 3 month" ;
label INT_USAGE_CHARGE_AMT_DEC5_4 ="international usage charge amount-Change from 5 months to 4 month ";
label INT_USAGE_CHARGE_AMT_DEC6_5= "international usage charge amount-Change from 6 months to 5 month ";
label LOCAL_CALL_CNT_DEC2_1 ="Total Local calls count-Change from 2 months to 1 month ";
label LOCAL_CALL_CNT_DEC3_2 ="Total Local calls count-Change from 3 months to 2 month" ;
label LOCAL_CALL_CNT_DEC4_3 ="Total Local calls count-Change from 4 months to 3 month ";
label LOCAL_CALL_CNT_DEC5_4 ="Total Local calls count-Change from 5 months to 4 month" ;
label LOCAL_CALL_CNT_DEC6_5 ="Total Local calls count-Change from 6 months to 5 month ";
label LOCAL_CALL_SEC_DEC2_1 ="Total Local calls seconds-Change from 2 months to 1 month ";
label LOCAL_CALL_SEC_DEC3_2 ="Total Local calls seconds-Change from 3 months to 2 month" ;
label LOCAL_CALL_SEC_DEC4_3 ="Total Local calls seconds-Change from 4 months to 3 month" ;
label LOCAL_CALL_SEC_DEC5_4 ="Total Local calls seconds-Change from 5 months to 4 month" ;
label LOCAL_CALL_SEC_DEC6_5 ="Total Local calls seconds-Change from 6 months to 5 month" ;
label LOCAL_CAL_avg_dur_DEC2_1 ="Average Local calls duration-Change from 2 months to 1 month ";
label LOCAL_CAL_avg_dur_DEC3_2= "Average Local calls duration-Change from 3 months to 2 month ";
label LOCAL_CAL_avg_dur_DEC4_3 ="Average Local calls duration-Change from 4 months to 3 month ";
label LOCAL_CAL_avg_dur_DEC5_4= "Average Local calls duration-Change from 5 months to 4 month ";
label LOCAL_CAL_avg_dur_DEC6_5= "Average Local calls duration-Change from 6 months to 5 month" ;
label LOCAL_USAGE_CHARGE_AMT_DEC2_1 ="Local usage charge amount-Change from 2 months to 1 month" ;
label LOCAL_USAGE_CHARGE_AMT_DEC3_2= "Local usage charge amount-Change from 3 months to 2 month ";
label LOCAL_USAGE_CHARGE_AMT_DEC4_3= "Local usage charge amount-Change from 4 months to 3 month" ;
label LOCAL_USAGE_CHARGE_AMT_DEC5_4= "Local usage charge amount-Change from 5 months to 4 month ";
label LOCAL_USAGE_CHARGE_AMT_DEC6_5= "Local usage charge amount-Change from 6 months to 5 month" ;
label NAT_CALL_CNT_DEC2_1 ="Total National calls count-Change from 2 months to 1 month ";
label NAT_CALL_CNT_DEC3_2 ="Total National calls count-Change from 3 months to 2 month ";
label NAT_CALL_CNT_DEC4_3 ="Total National calls count-Change from 4 months to 3 month" ;
label NAT_CALL_CNT_DEC5_4 ="Total National calls count-Change from 5 months to 4 month ";
label NAT_CALL_CNT_DEC6_5 ="Total National calls count-Change from 6 months to 5 month ";
label NAT_CALL_SEC_DEC2_1 ="Total National calls seconds-Change from 2 months to 1 month ";
label NAT_CALL_SEC_DEC3_2 ="Total National calls seconds-Change from 3 months to 2 month ";
label NAT_CALL_SEC_DEC4_3 ="Total National calls seconds-Change from 4 months to 3 month" ;
label NAT_CALL_SEC_DEC5_4 ="Total National calls seconds-Change from 5 months to 4 month" ;
label NAT_CALL_SEC_DEC6_5 ="Total National calls seconds-Change from 6 months to 5 month ";
label NAT_CALL_avg_dur_DEC2_1= "Average National calls duration-Change from 2 months to 1 month" ;
label NAT_CALL_avg_dur_DEC3_2=" Average National calls duration-Change from 3 months to 2 month" ;
label NAT_CALL_avg_dur_DEC4_3 ="Average National calls duration-Change from 4 months to 3 month ";
label NAT_CALL_avg_dur_DEC5_4 ="Average National calls duration-Change from 5 months to 4 month" ;
label NAT_CALL_avg_dur_DEC6_5= "Average National calls duration-Change from 6 months to 5 month ";
label NAT_USAGE_CHARGE_AMT_DEC2_1= "National usage charge amount-Change from 2 months to 1 month ";
label NAT_USAGE_CHARGE_AMT_DEC3_2 ="National usage charge amount-Change from 3 months to 2 month ";
label NAT_USAGE_CHARGE_AMT_DEC4_3= "National usage charge amount-Change from 4 months to 3 month" ;
label NAT_USAGE_CHARGE_AMT_DEC5_4 ="National usage charge amount-Change from 5 months to 4 month ";
label NAT_USAGE_CHARGE_AMT_DEC6_5 ="National usage charge amount-Change from 6 months to 5 month ";
label SPEND_AMT_DEC2_1 ="Total spend amount-Change from 2 months to 1 month ";
label SPEND_AMT_DEC3_2 ="Total spend amount-Change from 3 months to 2 month" ;
label SPEND_AMT_DEC4_3 ="Total spend amount-Change from 4 months to 3 month ";
label SPEND_AMT_DEC5_4 ="Total spend amount-Change from 5 months to 4 month ";
label SPEND_AMT_DEC6_5 ="Total spend amount-Change from 6 months to 5 month ";
label TOT_CALL_CNT_DEC2_1 ="Total calls count-Change from 2 months to 1 month ";
label TOT_CALL_CNT_DEC3_2 ="Total calls count-Change from 3 months to 2 month ";
label TOT_CALL_CNT_DEC4_3= "Total calls count-Change from 4 months to 3 month ";
label TOT_CALL_CNT_DEC5_4 ="Total calls count-Change from 5 months to 4 month ";
label TOT_CALL_CNT_DEC6_5= "Total calls count-Change from 6 months to 5 month ";
label TOT_CALL_SEC_DEC2_1= "Total calls seconds-Change from 2 months to 1 month ";
label TOT_CALL_SEC_DEC3_2= "Total calls seconds-Change from 3 months to 2 month" ;
label TOT_CALL_SEC_DEC4_3 ="Total calls seconds-Change from 4 months to 3 month ";
label TOT_CALL_SEC_DEC5_4= "Total calls seconds-Change from 5 months to 4 month ";
label TOT_CALL_SEC_DEC6_5 ="Total calls seconds-Change from 6 months to 5 month ";
label TOT_CHARGE_AMT_DEC2_1 ="Total charge amount-Change from 2 months to 1 month ";
label TOT_CHARGE_AMT_DEC3_2= "Total charge amount-Change from 3 months to 2 month ";
label TOT_CHARGE_AMT_DEC4_3 ="Total charge amount-Change from 4 months to 3 month" ;
label TOT_CHARGE_AMT_DEC5_4 ="Total charge amount-Change from 5 months to 4 month" ;
label TOT_CHARGE_AMT_DEC6_5 ="Total charge amount-Change from 6 months to 5 month" ;
label USAGE_CHARGE_AMT_DEC2_1 ="Total usage charge amount-Change from 2 months to 1 month ";
label USAGE_CHARGE_AMT_DEC3_2 ="Total usage charge amount-Change from 3 months to 2 month ";
label USAGE_CHARGE_AMT_DEC4_3 ="Total usage charge amount-Change from 4 months to 3 month" ;
label USAGE_CHARGE_AMT_DEC5_4 ="Total usage charge amount-Change from 5 months to 4 month" ;
label USAGE_CHARGE_AMT_DEC6_5 ="Total usage charge amount-Change from 6 months to 5 month ";
label Avg_DEC_6M_CELL_CALL_CNT ="Total cell calls count (Average change in last 6 months)";
label Avg_DEC_6M_CELL_CALL_SEC ="Total cell calls seconds (Average change in last 6 months)";
label Avg_DEC_6M_CELL_CALL_avg_dur ="Average cell calls duration (Average change in last 6 months)";
label Avg_DEC_6M_CELL_USAGE_CHARGE_AMT= "Cell usage charge amount (Average change in last 6 months)";
label Avg_DEC_6M_INT_CALL_CNT ="Total international calls count (Average change in last 6 months)";
label Avg_DEC_6M_INT_CALL_SEC ="Total international calls seconds (Average change in last 6 months)";
label Avg_DEC_6M_INT_CALL_avg_dur= "Average international calls duration (Average change in last 6 months)";
label Avg_DEC_6M_INT_USAGE_CHARGE_AMT= "international usage charge amount (Average change in last 6 months)";
label Avg_DEC_6M_LOCAL_CALL_CNT= "Total Local calls count (Average change in last 6 months)";
label Avg_DEC_6M_LOCAL_CALL_SEC= "Total Local calls seconds (Average change in last 6 months)";
label Avg_DEC_6M_LOCAL_CAL_avg_dur= "Average Local calls duration (Average change in last 6 months)";
label Avg_DEC_6M_LOC_USAGE_CHRG_AMT ="Local usage charge amount (Average change in last 6 months)";
label Avg_DEC_6M_NAT_CALL_CNT ="Total National calls count (Average change in last 6 months)";
label Avg_DEC_6M_NAT_CALL_SEC ="Total National calls seconds (Average change in last 6 months)";
label Avg_DEC_6M_NAT_CALL_avg_dur= "Average National calls duration (Average change in last 6 months)";
label Avg_DEC_6M_NAT_USAGE_CHARGE_AMT ="National usage charge amount (Average change in last 6 months)";
label Avg_DEC_6M_SPEND_AMT ="Total spend amount (Average change in last 6 months)";
label Avg_DEC_6M_TOT_CALL_CNT ="Total calls count (Average change in last 6 months)";
label Avg_DEC_6M_TOT_CALL_SEC ="Total calls seconds (Average change in last 6 months)";
label Avg_DEC_6M_TOT_CHARGE_AMT ="Total charge amount (Average change in last 6 months)";
label Avg_DEC_6M_USAGE_CHARGE_AMT ="Total usage charge amount (Average change in last 6 months)";
label Avg_DEC_3M_CELL_CALL_CNT ="Total cell calls count (Average change in last 3 months)";
label Avg_DEC_3M_CELL_CALL_SEC ="Total cell calls seconds (Average change in last 3 months)";
label Avg_DEC_3M_CELL_CALL_avg_dur ="Average cell calls duration (Average change in last 3 months)";
label Avg_DEC_3M_CELL_USAGE_CHARGE_AMT ="Cell usage charge amount (Average change in last 3 months)";
label Avg_DEC_3M_INT_CALL_CNT ="Total international calls count (Average change in last 3 months)";
label Avg_DEC_3M_INT_CALL_SEC= "Total international calls seconds (Average change in last 3 months)";
label Avg_DEC_3M_INT_CALL_avg_dur= "Average international calls duration (Average change in last 3 months)";
label Avg_DEC_3M_INT_USAGE_CHARGE_AMT= "international usage charge amount (Average change in last 3 months)";
label Avg_DEC_3M_LOCAL_CALL_CNT= "Total Local calls count (Average change in last 3 months)";
label Avg_DEC_3M_LOCAL_CALL_SEC= "Total Local calls seconds (Average change in last 3 months)";
label Avg_DEC_3M_LOCAL_CAL_avg_dur=" Average Local calls duration (Average change in last 3 months)";
label Avg_DEC_3M_LOC_USAGE_CHRG_AMT ="Local usage charge amount (Average change in last 3 months)";
label Avg_DEC_3M_NAT_CALL_CNT= "Total National calls count (Average change in last 3 months)";
label Avg_DEC_3M_NAT_CALL_SEC ="Total National calls seconds (Average change in last 3 months)";
label Avg_DEC_3M_NAT_CALL_avg_dur ="Average National calls duration (Average change in last 3 months)";
label Avg_DEC_3M_NAT_USAGE_CHARGE_AMT= "National usage charge amount (Average change in last 3 months)";
label Avg_DEC_3M_SPEND_AMT ="Total spend amount (Average change in last 3 months)";
label Avg_DEC_3M_TOT_CALL_CNT ="Total calls count (Average change in last 3 months)";
label Avg_DEC_3M_TOT_CALL_SEC ="Total calls seconds (Average change in last 3 months)";
label Avg_DEC_3M_TOT_CHARGE_AMT ="Total charge amount (Average change in last 3 months)";
label Avg_DEC_3M_USAGE_CHARGE_AMT ="Total usage charge amount (Average change in last 3 months)";

RUN;
libname class3 '/folders/myfolders/mysas';
proc import datafile='/folders/myfolders/mysas/churners_and_labels.xls'
dbms=xls out=churners replace;sheet=churners;
proc sql ;
select product_id from class1.SMB
left join churners
on smb.product_id=churners.product_id;
quit;
run;

 

 

 

 

hello the error is coming when i execute proc sql only please tell what is wrong with my code ?

1 ACCEPTED SOLUTION

Accepted Solutions
jennifert
SAS Employee

 @Shrutibhatnagar ,

 

I believe you need to qualify your reference to product_id in your select statement as follows:

 

select SMB.product_id from class1.SMB

 

Hope that helps!

 

thanks,

Jennifer

 


Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF

View solution in original post

6 REPLIES 6
Kurt_Bremser
Super User

CLASS1 is assigned at the top of your code.

If you only execute the SQL without executing at least that line in the same session first, it will fail.

Libnames do not persist from one session to another (unless you put them in your autoexec).

Shrutibhatnagar
Obsidian | Level 7

hello,

I executed the libname statement before running the proc sql , the error is still the same .

Kurt_Bremser
Super User

Run this code:

libname class1 '/folders/myfolders/mysas';

proc import datafile='/folders/myfolders/mysas/smb.csv'
dbms=csv out=class1.smb replace;
run;

proc import datafile='/folders/myfolders/mysas/churners_and_labels.xls'
dbms=xls out=churners replace;
sheet=churners;
run;

proc sql;
select product_id from class1.SMB
left join churners
on smb.product_id=churners.product_id;
quit;

and then post the whole log from that, using the {i} button

Shrutibhatnagar
Obsidian | Level 7

hello,

this gives the following log with the error :-

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc sql;
74 select product_id from class1.SMB
75 left join churners
76 on smb.product_id=churners.product_id;
ERROR: Ambiguous reference, column product_id is in more than one table.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
77 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.05 seconds
cpu time 0.04 seconds
 
78
79
80 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
92
 
jennifert
SAS Employee

 @Shrutibhatnagar ,

 

I believe you need to qualify your reference to product_id in your select statement as follows:

 

select SMB.product_id from class1.SMB

 

Hope that helps!

 

thanks,

Jennifer

 


Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF

Shrutibhatnagar
Obsidian | Level 7

hey 

thanks for the help that works fine now 🙂

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1268 views
  • 0 likes
  • 3 in conversation