DBCLIENT_ENCODING_FIXED= LIBNAME Statement Option

Specifies whether SAS session encoding is a fixed width.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: YES or NO, based on SAS encoding
Restriction: Applies only when you create Oracle tables from within SAS
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

Syntax

DBCLIENT_ENCODING_FIXED=YES | NO

Syntax Description

YES

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 as the length that is specified in SAS, divided by the value in DBCLIENT_MAX_BYTES=. If needed, and if DB_LENGTH_SEMANTIC_BYTE=YES, the character length is then multiplied by the value in DBSERVER_MAX_BYTES=.

NO

indicates that database table column lengths are not a fixed width.

Example: Specify SAS Session Encoding

For this example, the SAS session encoding is euc-cn, the locale is Chinese, and the Oracle server encoding is UTF8.

libname lib1 oracle path=mypath1 user=myusr1 pw=mypwd1 
  dbserver_max_bytes=3 dbclient_max_bytes=2 dbclient_encoding_fixed=yes;

data lib1.test;
id='中文';
run;

SQL> desc test;
Name                             Null?  Type
-------------------------------  -----  -------------------------
ID                                      CHAR(6)
libname lib2 oracle path=nlsbip08 user=myusr1 pw=mypwd1 
   dbserver_max_bytes=3 dbclient_max_bytes=2 dbclient_encoding_fixed=no;

SQL> desc test;
Name                             Null?  Type
-------------------------------  -----  -------------------------
ID                                      CHAR(12)
Last updated: February 3, 2026