Date, time, and timestamp options in the generated Db2 Load file
The date, time, and timestamp formats are integrated into the load command generation for ASC and DELIMITED formats.
If the date, time, or timestamp formats are defined in
the control file (keywords: DATE, TIME, TIMESTAMP, DATEDELIM, and
TIMEDELIM), a date, time, or timestamp modifier is included in the
generated load command. For example, the following control file includes
the DATEDELIM option:
GLOBAL CONNECT TO SAMPLE;
UNLOAD TABLESPACE
DATE DATE_A DATEDELIM '!'
SELECT * FROM EMPLOYEE;
OUTFILE("employee.del")
LOADFILE("employee.load")
FORMAT DELIMITED;
The generated Db2® load
file will look like this:LOAD FROM "employee.del" OF DEL
MODIFIED BY CODEPAGE=1208 DATEFORMAT="MM!DD!YYYY"
INSERT INTO EMPLOYEE (EMPNO,FIRSTNME,MIDINIT,LASTNAME,WORKDEPT,
PHONENO,HIREDATE,JOB,EDLEVEL,SEX,BIRTHDATE,SALARY,BONUS,COMM);
The DATEFORMAT="MM!DD!YYYY fragment of
the load file is generated based on the DATE_A DATEDELIM '!' option
in the Optim™ High Performance Unload control
file.Supported formats
The Db2 Load command supports only the following Optim High Performance Unload formats:- DATE_A, DATE_C, DATE_E, DATE_G, DATE_I, DATE_K, DATE_M, and DATE_O
- All of the time formats.
- TIMESTAMP_A, TIMESTAMP_B, TIMESTAMP_C, and TIMESTAMP_E
- All of the alphanumeric date and time delimiters.