Hi,
I need to compare two different sas datasets lying in two different servers. One is Unix and the other one is in Windows. I am running my sas session in windows , connecting to Unix using SAS/CONNECT to compare both the datasets. The program is throwing an error that the local library is not recognised. Please find below the snippet. The local directory was recognized by PROC DOWNLOADS but not by PROC COMPARE.
libname local "D:\test_dir";
%let rmtsrvr = xxxxxxxx xxxx;
options comamid=tcp remote=rmtsrvr;
signon user="xxxx" password="xxxxxxxxxxxxxxxxxxxxxx";
rsubmit;
libname rmt "/xxx/xxx/xxxx";
proc compare base=rmt.dt1 compare=local.dt1_t;
ID var1 var2;
run;
endrsubmit;
ERROR: Libref LOCAL is not assigned.
Thanks,
Vijay.
libname local "D:\test_dir"; * this happens in your local session;
%let rmtsrvr = xxxxxxxx xxxx;
options comamid=tcp remote=rmtsrvr;
signon user="xxxx" password="xxxxxxxxxxxxxxxxxxxxxx";
rsubmit; * from here on everything happens in the remote session;
libname rmt "/xxx/xxx/xxxx";
proc compare base=rmt.dt1 compare=local.dt1_t;
* you never executed a libname for local in the remote session, so it does not have that libref;
ID var1 var2;
run;
endrsubmit;
You should do this instead:
libname local "D:\test_dir";
%let rmtsrvr = xxxxxxxx xxxx;
options comamid=tcp remote=rmtsrvr;
signon user="xxxx" password="xxxxxxxxxxxxxxxxxxxxxx";
libname rmt remote "/xxx/xxx/xxxx" server=rmtsrvr;
proc compare base=rmt.dt1 compare=local.dt1_t;
ID var1 var2;
run;
Now, everything executes locally, and the libref for rmt points to the SAS/CONNECT session.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.