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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 861 views
  • 1 like
  • 1 in conversation