Chapter Contents |
Previous |
Next |
SAS/CONNECT User's Guide |
Purpose |
Program |
The following sequence of statements would be used in an OS/390 SAS session to establish a connection to DB2 and query the table SYSIBM.SYSTABLES:
connect to db2 (ssid=db2p); select * from connection to db2 (select name, creator, colcount from sysibm.systables where creator='THOMPSON' or creator='JONES');
The same connection and query could be performed from an OS/2 SAS session by using RSPT by means of a SAS server in a remote session under OS/390:
connect to remote (server=rmt dbms=db2 dbmsarg=(ssid=db2p)); select * from connection to remote (select name, creator, colcount from sysibm.systables where creator='THOMPSON' or creator='JONES');
Use the AS alias clause in the CONNECT TO statement to give the same name to the connection to the remote DBMS as it would have if you connected directly to it. This enables you to use queries without changing the FROM CONNECTION TO clause:
connect to remote as db2 (server=rmt dbms=db2 dbmsarg=(ssid=db2p)); select * from connection to db2 (select name, creator, colcount from sysibm.systables where creator='THOMPSON' or creator='JONES');
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.