Hello all,
I'm getting the following error when trying to write back to the EM_EXPORT_TRAIN dataset:
ERROR: Write access to member EMWS1.EMCODE_TRAIN.DATA is denied.
In SAS EM it will only export from the SASUSER library of which is \\EMWS1\EMCODE_TRAIN.sas. I have even added the -NORSASUSER option to the configuration file and restarted SAS EM but without success. Any ideas how to overcome as I would prefer to write back to the EMCODE_TRAIN data set. Here is my code within the SAS Code node:
data MyLib.selection;
call streaminit(12345);
set &em_import_data;
urand = rand('uniform');
proc sort data=MyLib.selection;
by urand;
data &em_export_train;
drop fold_size urand;
set MyLib.selection nobs=nobs_;
fold_size = round(nobs_ / 10.0);
if _N_ <= fold_size then fold = 'A';
if _N_ > fold_size and _N_ <= 2*fold_size then fold = 'B';
if _N_ > 2*fold_size and _N_ <= 3*fold_size then fold = 'C';
if _N_ > 3*fold_size and _N_ <= 4*fold_size then fold = 'D';
if _N_ > 4*fold_size and _N_ <= 5*fold_size then fold = 'E';
if _N_ > 5*fold_size and _N_ <= 6*fold_size then fold = 'F';
if _N_ > 6*fold_size and _N_ <= 7*fold_size then fold = 'G';
if _N_ > 7*fold_size and _N_ <= 8*fold_size then fold = 'H';
if _N_ > 8*fold_size and _N_ <= 9*fold_size then fold = 'I';
if _N_ > 9*fold_size then fold = 'J';
proc means data=&em_export_train;
by fold;
run;
So after review I finally discovered that although SAS throws the error when ran within the node you can run it and still produce the proper output outside the node.
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 lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.