Archives of the TeradataForum
Message Posted: Fri, 03 Oct 2003 @ 05:35:11 GMT
Subj: | | Re: Creating AMJ Files |
|
From: | | rodro |
Using the OLELOAD utility you can create you amj file, Just use the FILE tab to create it.
Then using any scripting language in this case for Korn Shell you can use amj file as:
fastload <> $LOGFILE 2>&1
.SESSIONS ${FLD_SESSIONS};
.ERRLIMIT ${ERR_LIMIT};
.TENACITY ${TU_TENACITY};
.SLEEP ${TU_SLEEP};
.RECORD 1;
logon ${DW_LOGON};
DROP TABLE ${STAGEDB}.${TABLENAME}_Err1;
DROP TABLE ${STAGEDB}.${TABLENAME}_Err2;
DELETE FROM ${STAGEDB}.${TABLENAME} ALL;
BEGIN LOADING ${STAGEDB}.${TABLENAME}
ERRORFILES ${STAGEDB}.${TABLENAME}_Err1,
${STAGEDB}.${TABLENAME}_Err2
INDICATORS;
AXSMOD Oledb_Axsmod "batch";
HELP TABLE ${STAGEDB}.${TABLENAME};
SHOW;
DEFINE FILE=${DW_OLEDB_DIR}/${LOADFILE}.amj;
INSERT ${STAGEDB}.${TABLENAME}.*
;
END LOADING;
LOGOFF;
EOF_1
Hope it helps.
Jaime Escobar
CEO/Independent Consultant
New Vision Consultants Corp.
|