Help using Base SAS procedures

connecting different servers

Reply
N/A
Posts: 0

connecting different servers

Good Morning,

I'm trying to access different tables from different servers, but when I connect to the 'second' server I lose the connection from the first!

I connect to the 'first' server with:

%let rsas=xxx.xxx.xxx.xxx;
options comamid=tcp;
signon rsas.spwn user=_prompt_;

TABLE1 is on my own library stated as:
rsubmit;
libname lib1 'ucdmpwk.dw.lib1' disp=old;
endrsubmit;
libname lib1 server=rsas.spwn;

After creating a table (TABLE1) in lib1 library with this connection, I want to be able to access another table. Then I connect to this:

%let rsasaix=xxx.xxx.xxx.xxx xxxx;
options remote=rsasaix comamid=tcp;
filename rlink "!sasroot\connect\saslink\tcpunix.scr";
signon rsasaix user=_prompt_;

TABLE2 is in this library:
rsubmit;
LIBNAME DEP DB2 USER=XXXXXXX PASSWORD=XXXXXXX
PRESERVE_COL_NAMES=YES PRESERVE_TAB_NAMES=YES
SCHEMA=prod DATASRC=prod;
endrsubmit;
libname DEP server=rsasaix;


let's say I have the same column in the two tables.
what I want to do is something like this:

select *
from
lib1.TABLE1 a,
DEP.TABLE2 b,
where
a.col1 = b.col1


ERROR: Libname LIB1 is not assigned.
ERROR: File DEP.TABLE2.DATA does not exist.


Thanks in advance

Pintarolas
SAS Employee Leo
SAS Employee
Posts: 1

Re: connecting different servers

Posted in reply to deleted_user
Hi Pintarolas, I see your libref is not consistent. You said your table1 is in dmprs library but you define the libref called lib1. You should use the same libref as what you used in your last SQL.

Leo
N/A
Posts: 0

Re: connecting different servers

sorry m8!
my bad!
I've made some changes to what I've posted but now I've edited the previous post. it has nothing to do with inconsistent libref.

I believe that when I connect to the rsasaix I lose the previous connection to rsas.spwn.
Super Contributor
Posts: 291

Re: connecting different servers

Posted in reply to deleted_user
Pintarolas;

In situations similar to this, I upload the extract from the one server to the other server and do the "join" there.
Super Contributor
Posts: 474

Re: connecting different servers

Posted in reply to deleted_user
Hi Pintarolas,

I do not see any wrong about your script, at leas with the syntax and options.

Wouldn't you be working at CGD?

Because your nick is definitively a portuguese nick and your signon script is very similar to the one we use here.

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
Ask a Question
Discussion stats
  • 4 replies
  • 154 views
  • 0 likes
  • 4 in conversation