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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.