我制作了这个 mload 脚本,但它卡在了 LOGON 上。我可以访问数据库,并且类似的登录在快速加载脚本中工作正常。
这是脚本:
.LOGTABLE UD821.FRC_RPT_PERD_Log;
.LOGON oneview/uid,pw;
.BEGIN IMPORT MLOAD TABLES UD821.FRC_RPT_PERD SESSIONS 5;
.LAYOUT InputFile_layout;
.field PERD_END_RPT_DT (VARCHAR(20));
.field RPT_PERD_TYPE_CD (VARCHAR(20));
.field PERD_NM (VARCHAR(30));
.field QTR_NUM (VARCHAR(2));
.field YEAR_NUM (VARCHAR(4));
.field RPT_PERD_TYPE_NM (VARCHAR(10));
.field DATA_VLDTN_IND (VARCHAR(1));
.fieldEDW_PUBLN_ID (VARCHAR(18));
.DML LABEL FRC_RPT_PERD_INSERT;
.INSERT INTO UD821.FRC_RPT_PERD ( PERD_END_RPT_DT, RPT_PERD_TYPE_CD, PERD_NM, QTR_NUM, YEAR_NUM, RPT_PERD_TYPE_NM,
DATA_VLDTN_IND, EDW_PUBLN_ID )
VALUES (
CASE WHEN Substr(PERD_END_RPT_DT,3,1) = '/'
AND Substr(PERD_END_RPT_DT,6,1) = '/'
THEN Substr(PERD_END_RPT_DT,7,4)||'-'||Substr(PERD_END_RPT_DT,1,2)||'-' ||Substr(PERD_END_RPT_DT,4,2)
WHEN Substr(PERD_END_RPT_DT,2,1) = '/'
AND Substr(PERD_END_RPT_DT,5,1) = '/'
THEN Substr(PERD_END_RPT_DT,6,4)||'-0'||Substr(PERD_END_RPT_DT,1,1)||'-' ||Substr(PERD_END_RPT_DT,3,2)
WHEN Substr(PERD_END_RPT_DT,2,1) = '/'
AND Substr(PERD_END_RPT_DT,4,1) = '/'
THEN Substr(PERD_END_RPT_DT,5,4)||'-0'||Substr(PERD_END_RPT_DT,1,1)||'-0' ||Substr(PERD_END_RPT_DT,3,1)
WHEN Substr(PERD_END_RPT_DT,3,1) = '/'
AND Substr(PERD_END_RPT_DT,5,1) = '/'
THEN Substr(PERD_END_RPT_DT,6,4)||'-'||Substr(PERD_END_RPT_DT,1,2)||'-0' ||Substr(PERD_END_RPT_DT,4,1)
ELSE PERD_END_RPT_DT
END (Date,Format 'yyyy-mm-dd'),, :RPT_PERD_TYPE_CD, :PERD_NM, :QTR_NUM, :YEAR_NUM, :RPT_PERD_TYPE_NM,
:DATA_VLDTN_IND, :EDW_PUBLN_ID ) ;
.import infile C:\Documents and Settings\bkp343\Desktop\FRC_RPT_PERD.csv
format vartext ','
display errors
nostop
layout InputFile_Layout
apply FRC_RPT_PERD_INSERT;
.end mload;
.logoff;
这里有什么明显的错误吗?它只是挂在 0002 登录。