All Forums Database
06 Mar 2006
fastexport to fastload

Gurus and all,I am using fastexport to write data to a file and the default MODE = INDICATORS and the default FORMAT = I am not sure how to use this output file in the fastload script that i created.FastExport uses some 2 byte integer bytes for format indicator, record start indicator and End of record markes, and the default delimiter it use is not PIPE.( i am not sure what it uses)can some one send an example of a fastload script that uses a file written by a fastexport using fastload format as the output format.Here are the fast export and fast load scripts that i have.FAST EXPORT..LOGTABLE DEVDATA.FEROZ_EMPFASTEXP_LOG;.Logon dbc/userid,#######;.BEGIN EXPORTSESSIONS 2;.EXPORT OUTFILE C:\EMP\EMP_OUTPUT.TXTFORMAT fastload;SELECT emp_no (varchar(10)),fname (varchar(20)),lname (varchar(20)),mgr_emp_no (varchar(10)),DOB (varchar(10)),start_date (varchar(10)),dept_no (BYTEINT)FROM DEVDATA.FEROZ_EMP;.END EXPORT;.LOGOFF;FAST LOAD SCRIPT:sessions 2;Logon dbc/userid,#######;set record vartext DISPLAY_ERRORS;DEFINE emp_no (varchar(10)),fname (varchar(20)),lname (varchar(20)),mgr_emp_no (varchar(10)),DOB (varchar(10)),start_date (varchar(10)),dept_no (varchar(3))FILE=c:\EMP\EMP_OUTPUT.TXTSHOW;Begin Loading devdata.feroz_empErrorfiles devdata.feroz_emp_err1, devdata.feroz_emp_err2CHECKPOINT 2;INSERT INTO DEVDATA.FEROZ_EMPVALUES(:emp_no,:fname,:lname,: mgr_emp_no,:dob,:start_date,:dept_no);END LOADING;LOGOFF;is there a way I an avoid writing the extra bytes in tye output file while using fast export?and is there a way to specify a delimiter in the fast export (like a |) other than writing the queryselect fname||'|'|| .......I appreciate your help and Thanks in advance.

You must sign in to leave a comment.