Hi, I want to create a new variable based on an original variable in my dataset by using the SAS Code node. However, when I wrote the following code into the Score Code panel, it gave me error.
data &EM_EXPORT_TRAIN.;
set &EM_IMPORT_DATA.;
if MISSING(PYMT_RATIO) then PYMT_RATIO_grp = 1;
else if NOT MISSING(PYMT_RATIO) and PYMT_RATIO < 0.29 then PYMT_RATIO_grp = 2;
else if NOT MISSING(PYMT_RATIO) and 0.29 <= PYMT_RATIO AND PYMT_RATIO < 1 then PYMT_RATIO_grp = 3;
else if (NOT MISSING(PYMT_RATIO) and 1 <= PYMT_RATIO AND PYMT_RATIO < 1.44) or (9999 <= PYMT_RATIO) then PYMT_RATIO_grp = 4;
else if NOT MISSING(PYMT_RATIO) and 1.44 <= PYMT_RATIO AND PYMT_RATIO < 9999 then PYMT_RATIO_grp = 5;
run;The error is:
ERROR: Unable to create EMWS1.EMCODE_TRAIN.DATA because EMWS1.EMCODE_TRAIN.VIEW already exists.
Does anyone know how I can fix it?
Still have error:
ERROR: Write access to member EMWS1.EMCODE_TRAIN.VIEW is denied.
ERROR: Unable to save DATA STEP view EMWS1.EMCODE_TRAIN.
How do people usually create new variable (by over-writing the dataset) in SAS EM?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.