ADJUST_NCHAR_COLUMN_LENGTHS= LIBNAME Statement Option

Specifies whether to adjust the lengths of NCHAR or NVARCHAR data type columns.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: YES
Supports: NLS
Data source: Oracle
See: SAS/ACCESS LIBNAME options for NLS

Table of Contents

Syntax

ADJUST_NCHAR_COLUMN_LENGTHS=YES | NO

Syntax Description

YES

indicates that column lengths are based on the number of characters multiplied by the DBCLIENT_MAX_BYTES= value.

NO

indicates that column lengths that NCHAR or NVARCHAR columns specify are multiplied by 2.

Example: No Adjustment for Client-Encoded Column Lengths

NCHAR column lengths are no longer adjusted to client encoding when ADJUST_NCHAR_COLUMN_LENGTHS=NO, as shown in this example.

libname x2 &engine &connopt ADJUST_NCHAR_COLUMN_LENGTHS=NO;
proc contents data=x2.char_sem; run;
proc contents data=x2.nchar_sem; run;
proc contents data=x2.byte_sem; run;
proc contents data=x2.mixed_sem; run;

In this example, various options have different values.

libname x5 &engine &connopt ADJUST_NCHAR_COLUMN_LENGTHS=NO
ADJUST_BYTE_SEMANTIC_COLUMN_LENGTHS=NO DBCLIENT_MAX_BYTES=3;
proc contents data=x5.char_sem; run;
proc contents data=x5.nchar_sem; run;
proc contents data=x5.byte_sem; run;
proc contents data=x5.mixed_sem; run;

This example also uses different values for the various options.

libname x6  &engine &connopt ADJUST_BYTE_SEMANTIC_COLUMN_LENGTHS=YES
ADJUST_NCHAR_COLUMN_LENGTHS=YES DBCLIENT_MAX_BYTES=3;
proc contents data=x6.char_sem; run;
proc contents data=x6.nchar_sem; run;
proc contents data=x6.byte_sem; run;
proc contents data=x6.mixed_sem; run;
Last updated: February 3, 2026