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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to ODBC 4 Arguments 657odbcspecifies the <strong>SAS</strong>/<strong>ACCESS</strong> engine name <strong>for</strong> the ODBC interface.connection-optionsprovide connection in<strong>for</strong>mation and control how <strong>SAS</strong> manages the timing andconcurrence of the connection to the DBMS. When you use the LIBNAMEstatement, you can connect to ODBC in many different ways. Specify only one ofthese methods <strong>for</strong> each connection because they are mutually exclusive.3 USER=, PASSWORD=, DATASRC=3 COMPLETE=3 NOPROMPT=3 PROMPT=3 READBUFF=3 REQUIRED=Here is how these options are defined.USER=user-namelets you connect to an ODBC database with a user ID that is different fromthe default ID. USER= is optional. UID= is an alias <strong>for</strong> this option.PASSWORD=passwordspecifies the ODBC password that is associated with your user ID.PASSWORD= is optional. PWD is an alias <strong>for</strong> this option. If you do not wantto enter your DB2 password in uncoded text on this statement, see PROCPWENCODE in Base <strong>SAS</strong> Procedures Guide<strong>for</strong> a method to encode it.DATASRC=ODBC-data-sourcespecifies the ODBC data source to which you want to connect. For PCplat<strong>for</strong>ms, data sources must be configured by using the ODBC icon in theWindows Control Panel. For UNIX plat<strong>for</strong>ms, data sources must beconfigured by modifying the .odbc.ini file. DSN= is an alias <strong>for</strong> this option thatindicates that the connection is attempted using the ODBC SQLConnect API,which requires a data source name. You can also use a user ID and passwordwith DSN=. If you want to use an ODBC file DSN, then instead of supplyingDATASRC=ODBC-data-source, use the PROMPT= or NOPROMPT=option followed by "filedsn=(name-of-your-file-dsn);". For example:libname mydblib odbc noprompt="filedsn=d:\share\msafiledsn.dsn;";COMPLETE=ODBC-connection-optionsspecifies connection options <strong>for</strong> your data source or database. Separatemultiple options with a semicolon. When connection succeeds, the completeconnection string is returned in the SYSDBMSG macro variable. If you donot specify enough correct connection options, you are prompted with a dialogbox that displays the values from the COMPLETE= connection string. Youcan edit any field be<strong>for</strong>e you connect to the data source. This option is notsupported on UNIX plat<strong>for</strong>ms. See your ODBC driver documentation <strong>for</strong>more details.NOPROMPT=ODBC-connection-optionsspecifies connection options <strong>for</strong> your data source or database. Separatemultiple options with a semicolon. If you do not specify enough correctconnection options, an error is returned. No dialog box displays to help youcomplete the connection string.

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

Saved successfully!

Ooh no, something went wrong!