BL_USE_ESCAPE= LIBNAME Statement Option

Specifies whether to escape a predefined set of special characters during bulk loading or bulk retrieval.

Valid in: SAS/ACCESS LIBNAME statement
Categories: Bulk Loading
Data Set Control
Default: NO
Data source: Amazon Redshift, Microsoft SQL Server
Note: Support for Microsoft SQL Server was added in SAS 9.4M7.
See: BL_DELIMITER= LIBNAME option, BL_USE_ESCAPE= data set option

Table of Contents

Syntax

BL_USE_ESCAPE=YES | NO

Required Arguments

YES

specifies that occurrences of a backslash (‘\’), newline (‘\n’), carriage return (‘\r’), or user-defined delimiter receives a backslash inserted before it. The backslash preserves occurrences of these characters in the data that is transferred during bulk loading or bulk retrieval. Any occurrence of the NULL character (0x00) is replaced by a space (‘ ’).

NO

specifies that occurrences of a backslash (‘\’), newline (‘\n’), carriage return (‘\r’), or user-defined delimiter are not escaped in the data that is transferred during bulk loading or bulk retrieval.

Details

The predefined special characters that are treated as escape characters include the backslash (‘\’), newline (‘\n’), and return (‘\r’). If you have specified another character for the BL_DELIMITER= LIBNAME or data set option, that value is also treated as an escape character.

Amazon Redshift: A bulk-loading or bulk-unloading operation that is executed in Amazon Redshift uses the COPY command.

Microsoft SQL Server: This option is used to support bulk loading when you access Azure Synapse Analytics (SQL DW) using an Azure Data Lake Gen2 account. Bulk loading to Azure Synapse Analytics uses the COPY command.

Last updated: February 3, 2026