Chapter Contents

Previous

Next
SAS ODBC Driver User's Guide and Programmer's Reference

Naming Your Data Source and Specifying SQL Options

When you first access the SAS ODBC Driver Configuration dialog, the General page is at the foreground, as shown in SAS ODBC Driver Configuration Dialog.

  1. In the Data Source Name field, enter a name for the data source that you want to access. The name must begin with a letter, and it cannot contain commas, semicolons, or any of the following special characters: [ ] { } ( ) ? * = ! @. For example, if you are defining SAS data that is stored on a machine named CICERO, you might call your data source SAS_CICERO. If you or other users are concerned only with the type of data (or with the type of application that uses that data), and not with where the data is stored, then you might have data sources with names like Finance or Payroll.

  2. (Optional) In the Description field, you can supply a description of the data source.

  3. The Server field includes a drop-list that you select in order to expand the list of defined servers. The first time you define a data source, the list is empty. Define one or more servers (as described in the next section), and then come back to the General page to make a selection from the Server list. You must specify a server for every data source.

SQL options on this page affect the interaction between the SAS ODBC driver, SAS, and ODBC-compliant applications. The default settings for the options are those that most ODBC-compliant applications will expect and will work best with. However, you can override the defaults by selecting any of the SQL Options listed. Select the box next to the desired option.

Preserve trailing blanks
preserves trailing blanks at the end of character fields. The default action is that trailing blanks are removed, so that each field ends in a null.

Support VARCHAR
causes character fields that are longer than 80 characters to be reported as variable-length fields, and causes the trailing blanks to be removed. See Support VARCHAR Option for more information.

Infer INTEGER from FORMAT
causes SAS numeric data types (typically reported as SQL_DOUBLE) to be reported as SQL_INTEGER. See Infer INTEGER from FORMAT Option for more information.

Return SQLTables REMARKS
causes the SAS ODBC driver to read and return the SAS data set label for each data set in the library you are accessing. (SQLTables is the name of an ODBC function that can be used for this purpose.) For SAS data sets, this can have a negative impact on performance, because each data set must be opened in order to read the label. Therefore, you should not select this option unless there is information in the label that you really need to see.

UNDO_POLICY=REQUIRED
implements the UNDO_POLICY option of the SAS System's SQL procedure with a setting of REQUIRED. With this setting, INSERT or UPDATE operations that fail are undone. However, this action is performed only for operations that affect multiple records; a statement that affects a single record behaves the same regardless of the UNDO_POLICY setting. When UNDO_POLICY=REQUIRED, the associated statement handle ( hstmt) of an UPDATE or INSERT statement must be the only active hstmt against the table. If another user, or an hstmt within the same user's application, has an active SELECT statement, the UPDATE or INSERT statement fails.

Fuzz Numbers at N Places
specifies the degree of precision to use when comparing numbers. See Fuzz Numbers at N Places Option for more information. By default, this option is selected. You can change the default value, 12, by typing over it.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.