Statistical programming, matrix languages, and more

ERROR: (execution) Matrix has not been set to a value.

Reply
New Contributor
Posts: 3

ERROR: (execution) Matrix has not been set to a value.

Im executing below code in SAS PC and getting an error like "ERROR: (execution) Matrix has not been set to a value."

and the same code executed successfully in SAS STUDIO and SAS EG.

Please help me on this.

 

options compress=no;

%let outputpath=%sysfunc(pathname(facc1,f));

%put outputpath=&outputpath;


DATA work.date;
INPUT percent country $40.;
CARDS;
10 US
12 UK
4 AUSTRALIA
16 GERMANY
8 FRANCE
RUN;

rsubmit;
proc iml;

outputpath = "&outputpath";
submit outputpath / R;
# read in the sas7bdat created in above sas code (FILE INPUT)
#install.packages('sas7bdat')
library("sas7bdat", lib.loc="/usr/lib64/RRO-3.2.2/R-3.2.2/lib64/R/library")
df2 <- read.sas7bdat("date.sas7bdat")
write.csv(df2, "&outputpath/dater.csv", row.names = FALSE)
endsubmit;
quit;
endrsubmit;

SAS Super FREQ
Posts: 3,232

Re: ERROR: (execution) Matrix has not been set to a value.

You say "The same code executed successfully in SAS STUDIO and SAS EG."  Where are you running it now?

 

If your goal is to transfer data from a SAS data set to an R data frame (and vice versa), you can use the 

EXPORTDATASETTOR subroutine and the IMPORTDATASETFROMR subroutine. There are examples at the linked-to doc pages.

Post a Question
Discussion Stats
  • 1 reply
  • 69 views
  • 0 likes
  • 2 in conversation