Reputation: 641
I am learning the RSUBMIT newly and I discovered that when I do a rsubmit with data statement, it doesnt take a local libray in the set statement?
How can we process this?
my code
signon server;
rsubmit;
data x;
set loca.mydata ;run;
endrsubmit;
this throws error saying
ERROR: Libref loca is not assigned.
should the set statement dataset also be present in the remote library?
Upvotes: 1
Views: 808
Reputation: 361
When you rsubmit some code you're basically sending it off elsewhere to get processed meaning none of your local assignments are present on the remote server.
One way to use your "LOCA" library would be to reassign it once you've r-submitted the code:
signon server;
rsubmit;
libname LOCA "<path here>";
data x;
set loca.mydata; run;
endrsubmit;
A second method would be to share the library between the sessions using inheritlib:
signon server;
rsubmit inheritlib=(LOCA=R_LOCA);
data x;
set R_LOCA.mydata; run;
endrsubmit;
In the both cases you'll also need to retrieve your dataset "WORK.X" from the remote server. Both methods I've shown will also allow you to do this.
Upvotes: 5