SAS replace variable with the variable's value before sending to remote
server
I'm new to SAS and I'm trying to retrieve data from a remote server.
Below is the code that I am trying to execute on the remote server:
rsubmit;
libname abc'server/sasdata'; *This is where the datasets are located;
data all2009;
set abc.file_2007:;
by index date time;
where index in (var1) and time between '8:30:00't and '12:00:00't;
run;
endrsubmit;
Currently, I am trying to pass along the variable var1 which contains the
string index that the "query" needs. var1 is evaluated on my local machine
and contains the value 'abc'.
But, since var1 is evaluated locally, trying to refer to the variable on
the remote server produces an error since var1 does not exist there.
If I run the code as follows (with the explicit value of 'abc') it runs fine:
...
set abc.file_2007:;
by index date time;
where index in ('abc') and time between '8:30:00't and '12:00:00't;
...
I need to run this "query" dynamically. Is there a way to force var1 to be
replaced by its actual value (ie. 'abc') before trying to execute the code
enclosed in rsubmit and endrsubmit?
No comments:
Post a Comment