13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to DB2 Under z/OS 4 Examples 497SSID=DB2-subsystem-idspecifies the DB2 subsystem ID to connect to at connection time. SSID= isoptional. If you omit it, <strong>SAS</strong> connects to the DB2 subsystem that is specifiedin the <strong>SAS</strong> system option, DB2SSID=. The DB2 subsystem ID is limited tofour characters. See “Settings” on page 514 <strong>for</strong> more in<strong>for</strong>mation.SERVER=DRDA-serverspecifies the DRDA server that you want to connect to. SERVER= enablesyou to access DRDA resources stored at remote locations. Check with yoursystem administrator <strong>for</strong> system names. You can connect to only one serverper LIBNAME statement.SERVER= is optional. If you omit it, you access tables from your local DB2database unless you have specified a value <strong>for</strong> the LOCATION= LIBNAMEoption. There is no default value <strong>for</strong> this option.For in<strong>for</strong>mation about configuring <strong>SAS</strong> to use the SERVER= option, seethe installation instructions <strong>for</strong> this interface.LOCATION=locationenables you to further qualify where a table is located.In the DB2 z/OS engine, the location is converted to the first level of athree-level table name: Location.Authid.Table. The connection to the remoteDB2 subsystem is done implicitly by DB2 when DB2 receives a three-leveltable name in an SQL statement.LOCATION= is optional. If you omit it, <strong>SAS</strong> accesses the data from thelocal DB2 database.3 Here is the TABLE= statement:TABLE= table-nameidentifies the DB2 table or DB2 view that you want to use to create an accessdescriptor. The table-name is limited to 18 characters. The TABLE=statement is required.The authorization-id is a user ID or group ID that is associated with theDB2 table. The authorization ID is limited to eight characters. If you omitthe authorization ID, DB2 uses your TSO (or z/OS) user ID. In batch mode,however, you must specify an authorization ID, otherwise an error message isgenerated.ExamplesThis example creates an access descriptor and a view descriptor that are based onDB2 data.options linesize=80;libname adlib ’<strong>SAS</strong>-data-library’;libname vlib ’<strong>SAS</strong>-data-library’;proc access dbms=db2;/* create access descriptor */create adlib.customr.access;table=testid.customers;ssid=db2;assign=yes;rename customer=custnum;<strong>for</strong>mat firstorder date7.;list all;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!