Default: The same name as the control file, but with an extension of .dat
.
Purpose
The DATA
parameter specifies the name(s) of the data file(s) containing the data to be loaded.
Syntax and Description
DATA=data_file_name
If you do not specify a file extension, then the default is .dat.
The file specification can contain wildcards (only in the file name and file extension, not in a device or directory name). An asterisk (*) represents multiple characters and a question mark (?) represents a single character. For example:
DATA='emp*.dat' DATA='m?emp.dat'
To list multiple data file specifications (each of which can contain wild cards), the file names must be separated by commas.
If the file name contains any special characters (for example, spaces, *, ?, ), then the entire name must be enclosed within single quotation marks.
The following are three examples of possible valid uses of the DATA
parameter (the single quotation marks would only be necessary if the file name contained special characters):
DATA='file1','file2','file3','file4','file5','file6'
DATA='file1','file2' DATA='file3,'file4','file5' DATA='file6'
DATA='file1' DATA='file2' DATA='file3' DATA='file4' DATA='file5' DATA='file6'
If multiple data files are being loaded and you are also specifying the BAD
parameter, it is recommended that you specify only a directory for the bad file, not a file name. If you specify a file name, and a file with that name already exists, then it is either overwritten or a new version is created, depending on your operating system.
If you specify data files on the command line with the DATA
parameter and also specify data files in the control file with the INFILE
clause, then the first INFILE
specification in the control file is ignored. All other data files specified on the command line and in the control file are processed.
If you specify a file processing option along with the DATA
parameter when loading data from the control file, then a warning message is issued.
Example
The following example specifies that a data file named employees.dat
is to be loaded. The .dat
extension is assumed as the default because no extension is provided.
DATA=employees