CHAR_AS_BINARY= Data Set Option

Specifies whether to fetch all character columns as binary values when reading data from DB2.

Valid in: SAS/ACCESS LIBNAME statement
Category: Data Set Control
Default: NO
Supports: NLS
Data source: DB2 under UNIX and PC Hosts, DB2 under z/OS
Note: Support for this data set option was added in SAS 9.4M1.
Tip: Setting this option to YES applies a $HEXn format to all character variables. Data therefore is displayed in hexadecimal format.

Syntax

CHAR_AS_BINARY=YES | NO
Last updated: February 3, 2026