Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 Feb 2005 @ 16:21:41 GMT


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


Subj:   Re: MultiLoad With VARTEXT/Delimited Input File
 
From:   Goode, Mervyn

Funny you should ask. I got this MVS job working yesterday. It uses TAB rather than PIPE or COMMA, but I'm sure you can cope fine with that.

No doubt someone can refine it even more.


     //USERIDM JOB   (ACCOUNT),'USERID',
     // CLASS=C,MSGCLASS=E,NOTIFY=USERID
     //*
     //STEP01   EXEC PGM=BTQMAIN,PARM='=ERRORLEVEL=OFF'
     //STEPLIB  DD DSN=TERADATA.SOFTWARE.LOAD,DISP=SHR
     //SYSPRINT DD SYSOUT=*
     //SYSIN    DD *
     .LOGON TDP?/USERID,USERID;

     DROP TABLE DATABASE.TAB_TRIAL
     ;
     DROP TABLE DATABASE.TAB_TRIAL_WT
     ;
     DROP TABLE DATABASE.TAB_TRIAL_ET
     ;
     DROP TABLE DATABASE.TAB_TRIAL_UV
     ;
     DROP TABLE DATABASE.MLOAD_ERRORS
     ;
     CREATE TABLE DATABASE.TAB_TRIAL
     (      SEQUENCE_NUMBER                     DECIMAL(5,2)
                                                NOT NULL
     ,      FILE_DESCRIPTION                    CHAR(100)
     ,      SOURCE                              CHAR(3)
     ,      APPLICATION_GROUP                   CHAR(20)
     ,      RECEIVING_JOB                       CHAR(10)
     ,      HYPERCHANNEL_ID                     CHAR(15)
     ,      FILE_RECEIVED                       CHAR(100)
     )      PRIMARY INDEX(SEQUENCE_NUMBER)
     ;
     //*
     //STEP02   EXEC PGM=MLOAD,PARM='=ERRORLEVEL=OFF'
     //STEPLIB  DD DSN=TERADATA.SOFTWARE.LOAD,DISP=SHR
     //INDATA   DD DSN=YOUR.INPUT.FILE,DISP=SHR
     //SYSOUT   DD SYSOUT=*
     //SYSPRINT DD SYSOUT=*
     //SYSIN    DD *

     .LOGTABLE DATABASE.MLOAD_ERRORS;
     .LOGON TDP?/USERID,USERID;

     .BEGIN IMPORT MLOAD
      AMPCHECK NONE
      TABLES       DATABASE.TAB_TRIAL
      WORKTABLES   DATABASE.TAB_TRIAL_WT
      ERRORTABLES  DATABASE.TAB_TRIAL_ET
                   DATABASE.TAB_TRIAL_UV
     ;
     .LAYOUT INPUT_RECORD;
     .FIELD SEQUENCE_NUMBER                   * VARCHAR(100);
     .FIELD FILE_DESCRIPTION                  * VARCHAR(100);
     .FIELD SOURCE                            * VARCHAR(100);
     .FIELD APPLICATION_GROUP                 * VARCHAR(100);
     .FIELD RECEIVING_JOB                     * VARCHAR(100);
     .FIELD HYPERCHANNEL_ID                   * VARCHAR(100);
     .FIELD FILE_RECEIVED                     * VARCHAR(100);

     .DML LABEL STANDARD
      IGNORE DUPLICATE ROWS
     ;
     INSERT INTO DATABASE.TAB_TRIAL
     VALUES (     :SEQUENCE_NUMBER
            ,     :FILE_DESCRIPTION
            ,     :SOURCE
            ,     :APPLICATION_GROUP
            ,     :RECEIVING_JOB
            ,     :HYPERCHANNEL_ID
            ,     :FILE_RECEIVED)
     ;
     .IMPORT INFILE INDATA
             FROM 2
             FORMAT VARTEXT ' ' /* <=== TAB CHARACTER HERE (HEX '05') */
             LAYOUT INPUT_RECORD
             APPLY STANDARD
     ;
     .END MLOAD;
     .LOGOFF;
     //*

Mervyn Goode



     
  <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: 15 Jun 2023