FLOAD, FEXP, MLOAD SAMPLES

 Fast Export Script:
.logtable DXWX_P57_DLWORK_DB01.logtable_EMP;
.logon tdp8/ADMIN_DXWX_P57,apple;
.begin export sessions 2;
.export outfile D:/IDQ/Outputs/emp FORMAT TEXT;
select *from DXWX_P57_PHYSICAL_DB01.emp;
.end export;
.logoff;

Fast Load Script:
SESSIONS 5;
TENACITY 5;
SLEEP 5;
ERRLIMIT 50;
.logon tdp8/ADMIN_DXWX_P57,apple;
delete from DXWX_P57_PHYSICAL_DB01.emp ALL;

DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_WT;
DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_ET;
DROP TABLE DXWX_P57_DLWORK_DB01.SELF_SERVICE_UV;


.SET RECORD VARTEXT "|";

DEFINE
Year_Week_Number (VARCHAR(15)),
Relative_Week (VARCHAR(15)),
Hierarchy_Code (VARCHAR(15)),
Hierarchy_Level (VARCHAR(15)),
Daily_Target (VARCHAR(15)),
Overnight_Target (VARCHAR(15))

FILE=D:/IDQ/Outputs/VWI0SVT_SELF_SERVICE_TARGETS;

SHOW;
BEGIN LOADING DXWX_P57_PHYSICAL_DB01.TWI0SVT_SELF_SERVICE_TARGETS ERRORFILES DXWX_P57_DLWORK_DB01.SELF_SERVICE_ET , DXWX_P57_DLWORK_DB01.SELF_SERVICE_UV
CHECKPOINT 1000;
INSERT INTO DXWX_P57_PHYSICAL_DB01.TWI0SVT_SELF_SERVICE_TARGETS VALUES(
:Year_Week_Number ,
:Relative_Week,
:Hierarchy_Code,
:Hierarchy_Level ,
:Daily_Target,
:Overnight_Target);

END LOADING;
.LOGOFF;
.QUIT;

Multi load Script:
.LOGTABLE LOGTABLEIRW;

.LOGON TDPM/LOAD_UK_UAT_U01,BANANA;
.BEGIN IMPORT MLOAD
TABLES DXWI_UAT_UK_DLWORK_DB01.TWI0IRW_IDQ_REPORT_WEEKS
WORKTABLES DXWI_UAT_UK_DLWORK_DB01.WT_IRW
ERRORTABLES DXWI_UAT_UK_DLWORK_DB01.ET_FWA
DXWI_UAT_UK_DLWORK_DB01.UV_FWA;

.LAYOUT DATAIN_LAYOUT;
.FIELD Year_Week_Number 1 INTEGER;
.FIELD Latest_Week_Ind 5 CHAR(1);

.DML LABEL INSERT_DML;
INSERT INTO DXWI_UAT_UK_DLWORK_DB01.TWI0IRW_IDQ_REPORT_WEEKS(
Year_Week_Number = :Year_Week_Number
,Latest_Week_Ind = :Latest_Week_Ind
);

.IMPORT INFILE D:/IDQ/Outputs/VWI0IRW_IDQ_REPORT_WEEKS.txt
FORMAT FASTLOAD
LAYOUT DATAIN_LAYOUT
APPLY INSERT_DML;

.END MLOAD;

.LOGOFF;

 

 

==========================================================

BEGIN EXPORT
TENACITY 4
SESSIONS 10
SLEEP 6;
.EXPORT OUTFILE 'e:/datafile/agr_farm.out' mode record FORMAT text;
Select COVERAGE_CD,STATE_CD,COUNTY_CD,CROP_CD,INS_PLAN_ID,CROP_YR_ID FROM CAESTG1.AGR_FARM;
.END EXPORT;


If you want the output file in text format you have to mention the format text along with the CAST function to convert the columns in to the character format.

.BEGIN EXPORT
TENACITY 4
SESSIONS 10
SLEEP 6;
.EXPORT OUTFILE 'e:/datafile/agr_farm.out'
mode record
FORMAT text;
Select
cast(COVERAGE_CD as char(1)),
cast(' ' as char(2)), /*tab character from the keyboard */
cast(STATE_CD as char(1)),
cast(' ' as char(2))
cast(COUNTY_CD as char(1)),
cast(' ' as char(2))
cast(CROP_CD as char(1)),
cast(' ' as char(2)),
cast(INS_PLAN_ID as char(1)),
cast(' ' as char(2))
cast(CROP_YR_ID as char(1))

FROM CAESTG1.AGR_FARM;
.END EXPORT;

你可能感兴趣的:(FLOAD, FEXP, MLOAD SAMPLES)