Specifies whether Oracle database encoding is a fixed width.
| Valid in: | SAS/ACCESS LIBNAME statement |
|---|---|
| Category: | Data Set Control |
| Default: | YES or NO, based on Oracle server encoding |
| Restriction: | Applies only when you read Oracle tables in SAS |
| Interaction: | To avoid truncation issues, use care when setting this option to YES. |
| Supports: | NLS |
| Data source: | Oracle |
| See: | SAS/ACCESS LIBNAME options for NLS |
| CAUTION |
To avoid truncation issues, use care when setting this option to YES. |
Table of Contents
indicates that database table column lengths in characters are a fixed width. Use this value to adjust byte lengths within SAS for any database column lengths that are specified in bytes. The number of characters is calculated by dividing the byte length by the value in DBSERVER_MAX_BYTES=.
indicates that database table column lengths are not a fixed width.
For this example, the SAS session encoding is euc-cn, the locale is Chinese, and the Oracle server encoding is UTF8.
/* Read */
/* Prepare in Oracle a table with char(6), named test. */
/* See from SQLPLUS: */
SQL> desc test;
Name Null? Type ------------------------------- ----- ------------------------- ID CHAR(6)
libname lib1 oracle path=nlsbip08 user=myusr1 pw=mypwd1
dbserver_max_bytes=3 dbclient_max_bytes=2
dbserver_encoding_fixed = yes;
proc contents data=lib1.test;run;
libname lib2 oracle path=nlsbip08 user=myusr1 pw=mypwd1
dbserver_max_bytes=3 dbclient_max_bytes=2
dbserver_encoding_fixed=no;
proc contents data=lib2.test;run;
Result
First Proc contents
Alphabetic List of Variables and Attributes
# Variable Type Len Format Informat Label
1 ID Char 4 $4. $4. ID
Second Proc contents
Alphabetic List of Variables and Attributes
# Variable Type Len Format Informat Label
1 ID Char 12 $12. $12. ID