Informix supports a connection to only one database.
If you have data that spans multiple databases, you must use fully
qualified table names to work within the Informix single-connection
constraints.
In this example, the
tables Tab1 and Tab2 reside in different databases, MyDB1 and MyDB2,
respectively.
proc sql;
connect to informix
(server=testdsn);
create view tab1v as
select * from connection
to informix
(select * from mydb1.tab1);
create view tab2v as
select * from connection
to informix
(select * from mydb2.tab2);
quit;
data getboth;
merge tab1v tab2v;
by common;
run;
Because the tables reside
in separate databases, you cannot connect to each database with a
PROC SQL CONNECT statement and then retrieve the data in a single
step. Using the fully qualified table name (that is,
database.table)
enables you to use any Informix database in the CONNECT statement
and access Informix tables in the
same or different databases
in a single SAS procedure or DATA step.