SAS/ACCESS Interface to Sybase |
SAS opens multiple Sybase tables for simultaneous reading in these situations:
When you are using PROC COMPARE. Here is an example:
proc compare base=syb.data1 compare=syb.data2;
When you are running an SCL program that reads from more than one Sybase table simultaneously.
When you are joining Sybase tables in SAS--namely, when implicit pass-through is not used (DIRECT_SQL=NO). Here are four examples:
proc sql ; select * from syb.table1, syb.table2 where table1.x=table2.x; proc sql; select * from syb.table1 where table1.x = (select x from syb.table2 where y = 33); proc sql; select empname from syb.employee where empyears > all (select empyears from syb.employee where emptitle = 'salesrep'); proc sql ; create view myview as select * from employee where empyears > all (select empyears from syb.employee where emptitle = 'salesrep'); proc print data=myview ;
To read two or more Sybase tables simultaneously, you must specify either the LIBNAME option CONNECTION=UNIQUE or the LIBNAME option READLOCK_TYPE=PAGE. Because READLOCK_TYPE=PAGE can degrade performance, it is generally recommended that you use CONNECTION=UNIQUE (unless there is a concern about the number of connections that are opened on the database).
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.