Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Mar 2005 @ 17:24:05 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Mload thinks these are duplicates
 
From:   Payne, Tom

I have an mload script that when run puts all the data into the UV table. Noting is loaded into the target table. I don't understand why. The table has the first three fields set as the primary key. Is there something needed in the mload script to tell it what the unique fields are? Any help is GREATLY appreciated.


thanks

Tom


     .LOGTABLE $DB$.GAFS_LOG;

     .RUN FILE $logon$;

     .BEGIN MLOAD
           TABLES $DB$.GAFS
           ERRORTABLES $DB$.ET_GAFS
                       $DB$.UV_GAFS
           WORKTABLES  $DB$.WT_GAFS

           SESSIONS 4
           AMPCHECK ALL;

     .LAYOUT INPUTLAYOUT;
           .FIELD IN_TRANSMITTAL_NUMBER    * CHAR(4);
           .FIELD IN_TRANSACTION_ID     * CHAR(8);
           .FIELD IN_TRANSACTION_ID_SUFFIX    * CHAR(2);
           .FIELD IN_FSRA      * CHAR(6);
           .FIELD IN_PSRA      * CHAR(6);
           .FIELD IN_DSRA      * CHAR(6);
           .FIELD IN_AFO_ID      * CHAR(1);
           .FIELD IN_FUND_TYPE     * CHAR(1);
           .FIELD IN_APPRO      * CHAR(14);
           .FIELD IN_ALLOT_CD     * CHAR(8);
           .FIELD IN_MFP      * CHAR(2);
           .FIELD IN_PROG_ELE     * CHAR(6);
           .FIELD IN_DOD_FC      * CHAR(2);
           .FIELD IN_BPAC      * CHAR(6);
           .FIELD IN_MPC      * CHAR(6);
           .FIELD IN_SMC      * CHAR(6);
           .FIELD IN_SALES_CD     * CHAR(3);
           .FIELD IN_ORG_DATA     * CHAR(7);
           .FIELD IN_ESP      * CHAR(2);
           .FIELD IN_PC      * CHAR(2);
           .FIELD IN_DOC_ID      * CHAR(21);
           .FIELD IN_REF_DOC      * CHAR(11);
           .FIELD IN_MAFR_DATA     * CHAR(27);
           .FIELD IN_VENDR      * CHAR(4);
           .FIELD IN_TYPE_VNDR     * CHAR(1);
           .FIELD IN_CASN      * CHAR(6);
           .FIELD IN_PR_MIPR      * CHAR(8);
           .FIELD IN_RES_DOC      * CHAR(11);
           .FIELD IN_BAL_ID      * CHAR(1);
           .FIELD IN_ACT_1ST      * CHAR(1);
           .FIELD IN_POST_CD1     * CHAR(1);
           .FIELD IN_POST_CD2     * CHAR(1);
           .FIELD IN_TYP_REC      * CHAR(1);
           .FIELD IN_BQ_SITE      * CHAR(2);
           .FIELD IN_ACT_2ND      * CHAR(1);
           .FIELD IN_TEX_CDE      * CHAR(1);
           .FIELD IN_FMS_LINE     * CHAR(3);
           .FIELD IN_DSRA_ACT     * CHAR(6);
           .FIELD IN_CONTR_CAT     * CHAR(3);
           .FIELD IN_REMOTE_ID     * CHAR(2);
           .FIELD IN_AMOUNT      * CHAR(13);
           .FIELD IN_QUANTITY     * CHAR(8);
           .FIELD IN_POST_DATE     * CHAR(4);
           .FIELD IN_EFF_DATE     * CHAR(4);
           .FIELD IN_RCVRY_CDE     * CHAR(1);
           .FIELD IN_ILC      * CHAR(2);
           .FIELD IN_TID      * CHAR(5);
           .FIELD IN_FUND_TYPE_IND     * CHAR(1);
           .FIELD IN_CSR      * CHAR(6);
           .FIELD IN_PAYCODE      * CHAR(2);
           .FIELD IN_PROC_OFFICE     * CHAR(1);
           .FIELD IN_SUBTRANS_CD     * CHAR(1);
           .FIELD IN_TREAS_DTE     * CHAR(7);
           .FIELD IN_CONTRACT_MOD     * CHAR(6);
           .FIELD IN_DFAS_CO_VCHR     * CHAR(6);
           .FIELD IN_CLIN      * CHAR(6);
           .FIELD IN_SECOND_DOC_ID     * CHAR(14);
           .FIELD IN_SUFFIX_CD     * CHAR(1);
           .FIELD IN_ORIG_ACRN     * CHAR(2);
           .FIELD IN_FMS_SVC_TYP_CD     * CHAR(3);
           .FIELD IN_SITENAME     * CHAR(2);
           .FIELD IN_OACDESC      * CHAR(60);
           .FIELD IN_OBANDESC     * CHAR(60);
           .FIELD IN_DODEE      * CHAR(2);
           .FIELD IN_DODEEDESC     * CHAR(50);
           .FIELD IN_BADESC      * CHAR(60);
           .FIELD IN_FY4C      * CHAR(4);
           .FIELD IN_OY4C      * CHAR(4);
           .FIELD IN_POSTDATE     * CHAR(10);
           .FIELD IN_EFFDATE      * CHAR(10);


     .DML LABEL INSERTS
     IGNORE DUPLICATE INSERT ROWS;

     INSERT INTO $DB$.GAFS
           (
     TRANSMITTAL_NUMBER,
     TRANSACTION_ID,
     TRANSACTION_ID_SUFFIX,
     FSRA,
     PSRA,
     DSRA,
     AFO_ID,
     FUND_TYPE,
     APPRO,
     ALLOT_CD,
     MFP,
     PROG_ELE,
     DOD_FC,
     BPAC,
     MPC,
     SMC,
     SALES_CD,
     ORG_DATA,
     ESP,
     PC,
     DOC_ID,
     REF_DOC,
     MAFR_DATA,
     VENDR,
     TYPE_VNDR,
     CASN,
     PR_MIPR,
     RES_DOC,
     BAL_ID,
     ACT_1ST,
     POST_CD1,
     POST_CD2,
     TYP_REC,
     BQ_SITE,
     ACT_2ND,
     TEX_CDE,
     FMS_LINE,
     DSRA_ACT,
     CONTR_CAT,
     REMOTE_ID,
     AMOUNT,
     QUANTITY,
     POST_DATE,
     EFF_DATE,
     RCVRY_CDE,
     ILC,
     TID,
     FUND_TYPE_IND,
     CSR,
     PAYCODE,
     PROC_OFFICE,
     SUBTRANS_CD,
     TREAS_DTE,
     CONTRACT_MOD,
     DFAS_CO_VCHR,
     CLIN,
     SECOND_DOC_ID,
     SUFFIX_CD,
     ORIG_ACRN,
     FMS_SVC_TYP_CD,
     SITENAME,
     OACDESC,
     OBANDESC,
     DODEE,
     DODEEDESC,
     BADESC,
     FY4C,
     OY4C,
     POSTDATE,
     EFFDATE,
     TCC_CD,
     PID)
     VALUES (
      :IN_TRANSMITTAL_NUMBER
     ,:IN_TRANSACTION_ID
     ,:IN_TRANSACTION_ID_SUFFIX
     ,CAST(:IN_FSRA AS DECIMAL(6,0))
     ,CAST(:IN_PSRA AS DECIMAL(6,0))
     ,CAST(:IN_DSRA AS DECIMAL(6,0))
     ,:IN_AFO_ID
     ,:IN_FUND_TYPE
     ,:IN_APPRO
     ,:IN_ALLOT_CD
     ,:IN_MFP
     ,:IN_PROG_ELE
     ,:IN_DOD_FC
     ,:IN_BPAC
     ,:IN_MPC
     ,:IN_SMC
     ,:IN_SALES_CD
     ,:IN_ORG_DATA
     ,:IN_ESP
     ,:IN_PC
     ,:IN_DOC_ID
     ,:IN_REF_DOC
     ,:IN_MAFR_DATA
     ,:IN_VENDR
     ,:IN_TYPE_VNDR
     ,:IN_CASN
     ,:IN_PR_MIPR
     ,:IN_RES_DOC
     ,:IN_BAL_ID
     ,:IN_ACT_1ST
     ,:IN_POST_CD1
     ,:IN_POST_CD2
     ,:IN_TYP_REC
     ,CAST(:IN_BQ_SITE AS DECIMAL(2,0))
     ,:IN_ACT_2ND
     ,:IN_TEX_CDE
     ,:IN_FMS_LINE
     ,CAST(:IN_DSRA_ACT AS DECIMAL(6,0))
     ,:IN_CONTR_CAT
     ,:IN_REMOTE_ID
     ,
       CASE
        WHEN SUBSTR(:IN_AMOUNT,12,1) IN ('{','}') THEN
     (CAST(SUBSTR(:IN_AMOUNT,1,11) AS DECIMAL(11,2)) *-1)
        ELSE  CAST(SUBSTR(:IN_AMOUNT,1,11) AS DECIMAL(11,2))
       END
     ,
       CASE
        WHEN SUBSTR(:IN_QUANTITY,8,1) IN ('{','}') THEN
     (CAST(SUBSTR(:IN_QUANTITY,1,7) AS DECIMAL(7,0)) *-1)
        ELSE  CAST(SUBSTR(:IN_QUANTITY,1,7) AS DECIMAL(7,0))
       END
     ,CAST(:IN_POST_DATE AS DECIMAL(4,0))
     ,CAST(:IN_EFF_DATE AS DECIMAL(4,0))
     ,:IN_RCVRY_CDE
     ,CAST(:IN_ILC AS DECIMAL(2,0))
     ,CAST(:IN_TID AS DECIMAL(5,0))
     ,:IN_FUND_TYPE_IND
     ,:IN_CSR
     ,:IN_PAYCODE
     ,:IN_PROC_OFFICE
     ,:IN_SUBTRANS_CD
     ,:IN_TREAS_DTE
     ,:IN_CONTRACT_MOD
     ,:IN_DFAS_CO_VCHR
     ,:IN_CLIN
     ,:IN_SECOND_DOC_ID
     ,:IN_SUFFIX_CD
     ,:IN_ORIG_ACRN
     ,:IN_FMS_SVC_TYP_CD
     ,:IN_SITENAME
     ,:IN_OACDESC
     ,:IN_OBANDESC
     ,:IN_DODEE
     ,:IN_DODEEDESC
     ,:IN_BADESC
     ,:IN_FY4C
     ,:IN_OY4C
     ,:IN_POSTDATE
     ,:IN_EFFDATE
     ,$TCC_CD$
     ,$PID$);

     .IMPORT INFILE $PATH$GAFS.DAT
           FORMAT TEXT
           LAYOUT INPUTLAYOUT
           APPLY INSERTS;

     .END MLOAD;

Sample of the data file

     009710003474020259827181160000000A              68556520  41122F01 102
     58910           111300ZAS BFA442804D00140022 X
     DO057951A           5                         EXUEE36D    076419
     ZZ000002231052H000000}50325032  0000000Z          01Jan00
     OMAIR MOBILITY COMMAND                                        Comm
     Augmentation
     --
     200520052005-02-012005-02-01  <>
     009710003475010259821464950730920A              68556520  41122F   102
     58910           111300  S BFA442804D00130008 X
     5                         UXUEE36D
     ZZ000000051940}000000}50325032  0000000Z          01Jan00
     OMAIR MOBILITY COMMAND                                        Comm
     Augmentation
     --
     200520052005-02-012005-02-01  <>
     009710003475020259821464950000000A              68556520  41122F   102
     58910           111300  S BFA442804D00130008 X
     DO057938A           5                         EXUEE36D    073092
     ZZ000000051940{000000}50325032  0000000Z          01Jan00
     OMAIR MOBILITY COMMAND                                        Comm
     Augmentation
     --
     200520052005-02-012005-02-01  <>


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016