BL_DATAFILE= Data Set Option: Teradata

Identifies the file that contains control statements.

Valid in: DATA and PROC steps (when accessing data using SAS/ACCESS software)
Categories: Bulk Loading
Data Set Control
Default: creates a MultiLoad script file in the temporary file directory that is specified by the UTILLOC= system option with a platform-specific name
Restriction: Teradata: Starting in SAS 9.4M9, this option is no longer used.
Requirement: To specify this option, you must first specify MULTILOAD=YES.
Data source: Teradata
Note: Additional data sources are supported. See the main entry for the BL_DATAFILE= data set option.
See: BL_DATAFILE= data set option (main entry), BL_CONTROL= data set option, MULTILOAD= data set option, TPT= data set option

Syntax

Syntax Description

path-and-data-file-name

specifies the name of the control file to generate for loading data with SAS/ACCESS Interface to Teradata using non-TPT MultiLoad. On Windows and UNIX platforms, the default file name takes the form BL_<table>_<unique-ID>.ctl:

table

specifies the table name.

unique-ID

specifies a number that is used to prevent collisions in the event of two or more simultaneous bulk loadings of a particular table. The SAS/ACCESS engine generates the number.

On z/OS platforms, the default file name takes the form <unique-ID>.<table>.dat:

unique-ID

specifies the user or group ID that owns the file. By default, this is your user ID. However, you can set this to a security group ID with the TD_RACF environment variable.

table

specifies the table name.

Details

Overview of BL_DATAFILE= for Teradata

Note: Starting in SAS 9.4M9, SAS/ACCESS no longer supports non-TPT MultiLoad. For this reason, this option is not used in SAS 9.4M9 and later.

The file contains non-TPT MultiLoad Language definitions that specify the location of the data and how the data corresponds to the database table. It specifies exactly how MultiLoad should interpret the data that you are loading. Because the script file that SAS generates for MultiLoad must contain logon information in cleartext, you should secure the script file by specifying a protected directory path.

Teradata on AIX: Beginning with the August 2024 update for SAS/ACCESS on SAS 9.4M8 and with the October 2024 update for SAS/ACCESS on SAS 9.4M7, setting TPT=NO is ignored. SAS uses the Teradata Parallel Transporter API to load data to Teradata. For more information, see SAS Note 70928 - SAS/ACCESS Interface to Teradata support for Teradata Tools and Utilities (TTU) 17.xx and later in AIX environments.

Specifics for File Naming under z/OS

By default under z/OS, the control file name is prefixed with your user ID. This happens automatically without having to specify it. However, you can suppress the addition of your user ID to the file name and add text of your choice instead. Typically, you would add a security group ID to the beginning of the file name in place of your user ID. When the addition of your user ID is suppressed, you specify the text to add to the beginning of the file name. To prevent adding your user ID to the file name, enable the TD_RACF environment variable when you start SAS. To set the TD_RACF environment variable, include the following code in your SAS command:

Alternatively, you can specify TD_RACF as a SAS option.

Note: You can use the TD_RACF environment variable even when you use a security method other than RACF.

Examples

Example 1: Generate Teradata Script Files

Note: Do not specify DBSLICEPARM=ALL in SAS 9.4M9 or later. These examples pertain only to releases prior to SAS 9.4M9.

This example generates a Teradata script file, C:\protdir\ml.ctl, on Windows.

DATA teralib.test(DBSLICEPARM=ALL BL_DATAFILE="C:\protdir\ml.ctl");
SET teralib.mydata;
run;

This next example generates a Teradata script file, fe.ctl, for FastExport and ml.ctl for MultiLoad.

Note: After the August 2024 update for SAS/ACCESS on SAS 9.4M8 and the October 2024 update for SAS/ACCESS on SAS 9.4M7, TPT=NO is ignored for users of Teradata on AIX. SAS uses the TPT API to load data. (See Details.)
data teralib.test1(MULTILOAD=YES TPT=NO BL_DATAFILE="ml.ctl");
SET teralib.test2(DBSLICEPARM=ALL BL_CONTROL="fe.ctl");
run;

Example 2: Under z/OS: Add a Security Group Name to the File Name

Note: The BL_CONTROL= and BL_DATAFILE= options are not supported in SAS 9.4M9 or later. These examples pertain only to releases prior to SAS 9.4M9.

This example shows how to specify that generated file names should include the dbi2 security group rather than the user ID.

/* the new env variable / SAS option TD_RACF should be set to YES when invoking
*  SAS in order to test any scenario:   
 *
*  sas -set TD_RACF YES -set SYSIN SASIN
*
*/

libname tera teradata user=dbitest pw=XXXXXX tdpid=tdp0;
proc delete data=tera.multitest ; run;

/* Multiload utility */
data tera.multitest(multiload=yes 
        bl_datafile='dbi2.test.datafile'
        bl_control='dbi2.test.control');
set sashelp.class;
run;
Last updated: February 3, 2026