BookmarkSubscribeRSS Feed
David_S
Fluorite | Level 6

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;
1 REPLY 1
David_S
Fluorite | Level 6

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.

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 851 views
  • 1 like
  • 1 in conversation