Previous Page | Next Page

Data Set Options for Relational Databases

BL_BADFILE= Data Set Option

Identifies a file that contains records that were rejected during bulk load.
Default value: creates a data file in the current directory or with the default file specifications
Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software)
DBMS Support: Oracle

Syntax Description
See Also



Syntax Description


is an SQL*Loader file to which rejected rows of data are written. On most platforms, the default filename takes the form BL_<table>_<unique-ID>.bad:


specifies the table name


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


To specify this option, you must first set BULKLOAD=YES.

If you do not specify this option and a BAD file does not exist, a file is created in the current directory (or with the default file specifications). If you do not specify this option and a BAD file already exists, the Oracle bulk loader reuses the file, replacing the contents with rejected rows from the new load.

Either the SQL*Loader or Oracle can reject records. For example, the SQL*Loader can reject a record that contains invalid input, and Oracle can reject a record because it does not contain a unique key. If no records are rejected, the BAD file is not created.

On most operating systems, the BAD file is created in the same format as the DATA file, so the rejected records can be loaded after corrections have been made.

Operating Environment Information:   On z/OS operating systems, the BAD file is created with default DCB attributes. For details about overriding this, see the information about SQL*Loader file attributes in the SQL*Loader chapter in your Oracle user's guide for z/OS.  [cautionend]

See Also

BULKLOAD= Data Set Option

Previous Page | Next Page | Top of Page