Using the Runfile (-r) Parameter

Teradata MultiLoad Reference

brand
Teradata Tools and Utilities
prodname
MultiLoad
vrm_release
16.10
category
Programming Reference
featnum
B035-2409-057K

The typical option selection is:

mload -r '.RUN FILE mld.startup;' < infilename >outfilename

Sample Logon Contents

.LOGTABLE SAMPLESCRIPT_LOG;
.LOGON NODEID/mlntuser,mlntuser;

Sample MLOAD Job

DROP TABLE WT_ML0020;
DROP TABLE ET_ML0020;
DROP TABLE UV_ML0020;
DROP TABLE ML0020;

CREATE TABLE ML0020,FALLBACK(
F1 INTEGER,
F2 BYTEINT,
F3 SMALLINT,
F4 INTEGER,
F5 BIGINT,
F6 DECIMAL(9,2),
F7 FLOAT)
primary index(F1);

.BEGIN IMPORT MLOAD TABLES ML0020 SESSIONS 4;
.LAYOUT LAY1A;
.FIELD FF1 * INTEGER;
.FIELD FF2 * FLOAT;
.FIELD FF3 * FLOAT;
.FIELD FF4 * FLOAT;
.FIELD FF5 * FLOAT;
.FIELD FF6 * FLOAT;
.FIELD FF7 * FLOAT;

.DML LABEL LABELA;
INSERT INTO ML0020 VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7);

.IMPORT INFILE INDAT94
               LAYOUT LAY1A
               APPLY LABELA;
.END MLOAD;
.LOGOFF;

Sample Command:

mload -r ".run file logon;" < samplescript

Sample Output

     ========================================================================
     =                                                                      =
     =          MultiLoad Utility    Release MLOD.16.10.00.00               =
     =          Platform WIN32                                              =
     =          PID      8892                                               =
     =                                                                      =
     ========================================================================
     =                                                                      =
     =     Copyright 1990-2017 Teradata Corporation. ALL RIGHTS RESERVED.   =
     =                                                                      =
     ========================================================================
**** 13:47:53 UTY2411 Processing start date: TUE MAY 02, 2017
     ========================================================================
     =                                                                      =
     =          Logon/Connection                                            =
     =                                                                      =
     ========================================================================
0001 .run file logon;
0002 .LOGTABLE ML0020_LOG;
0003 .LOGON NODEID/fluser,;
**** 13:47:58 UTY8400 Teradata Database Release: 16.10.00.00
**** 13:47:58 UTY8400 Teradata Database Version: 16.10.00.00
**** 13:47:58 UTY8400 Default character set: ASCII
**** 13:47:58 UTY8400 Current RDBMS has interval support
**** 13:47:58 UTY8400 Current RDBMS has UDT support
**** 13:47:58 UTY8400 Current RDBMS has Large Decimal support
**** 13:47:58 UTY8400 Current RDBMS has TASM support
**** 13:47:58 UTY8400 Maximum supported buffer size: 1M
**** 13:47:58 UTY8400 Data Encryption supported by RDBMS server
**** 13:48:00 UTY6211 A successful connect was made to the RDBMS.
**** 13:48:00 UTY6217 Logtable 'FLUSER.ML0020_LOG' has been created.
     ========================================================================
     =                                                                      =
     =          Processing Control Statements                               =
     =                                                                      =
     ========================================================================

0004 DROP TABLE WT_ML0020;
**** 13:48:01 UTY1008 RDBMS failure: 3807, Object 'WT_ML0020' does not exist.
0005 DROP TABLE ET_ML0020;
**** 13:48:02 UTY1008 RDBMS failure: 3807, Object 'ET_ML0020' does not exist.
0006 DROP TABLE UV_ML0020;
**** 13:48:03 UTY1008 RDBMS failure: 3807, Object 'UV_ML0020' does not exist.
0007 DROP TABLE ML0020;
**** 13:48:04 UTY1016 'DROP' request successful.

0008 CREATE TABLE ML0020,FALLBACK(
     F1 INTEGER,
     F2 BYTEINT,
     F3 SMALLINT,
     F4 INTEGER,
     F5 BIGINT,
     F6 DECIMAL(9,2),
     F7 FLOAT)
     primary index(F1);
**** 13:48:05 UTY1016 'CREATE' request successful.

0009 .BEGIN IMPORT MLOAD TABLES ML0020 SESSIONS 4;
     ========================================================================
     =                                                                      =
     =          Processing MultiLoad Statements                             =
     =                                                                      =
     ========================================================================
0010 .LAYOUT LAY1A;
0011 .FIELD FF1 * INTEGER;
0012 .FIELD FF2 * FLOAT;
0013 .FIELD FF3 * FLOAT;
0014 .FIELD FF4 * FLOAT;
0015 .FIELD FF5 * FLOAT;
0016 .FIELD FF6 * FLOAT;
0017 .FIELD FF7 * FLOAT;

0018 .DML LABEL LABELA;
0019 INSERT INTO ML0020 VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7);

0020 .IMPORT INFILE INDAT94
                    LAYOUT LAY1A
                    APPLY LABELA;
0021 .END MLOAD;
     ========================================================================
     =                                                                      =
     =          MultiLoad Initial Phase                                     =
     =                                                                      =
     ========================================================================
**** 13:48:05 UTY0829 Options in effect for this MultiLoad import task:
     .       Sessions:    4 session(s).
     .       Checkpoint:  15 minute(s).
     .       Tenacity:    4 hour limit to successfully connect load sessions.
     .       Errlimit:    No limit in effect.
     .       AmpCheck:    In effect for apply phase transitions.
**** 13:48:05 UTY0817 MultiLoad submitting the following request:
     Select NULL from FLUSER.ML0020_LOG where (LogType = 125) and (Seq = 1) and
     (MloadSeq = 0);
**** 13:48:05 UTY0817 MultiLoad submitting the following request:
     Select NULL from FLUSER.ML0020_LOG where (LogType = 120) and (Seq = 1);
**** 13:48:07 UTY0817 MultiLoad submitting the following request:
     SET QUERY_BAND='UTILITYNAME=MULTLOAD;' UPDATE FOR SESSION;
**** 13:48:07 UTY0817 MultiLoad submitting the following request:
     CHECK WORKLOAD FOR BEGIN MLOAD ML0020;
**** 13:48:07 UTY0817 MultiLoad submitting the following request:
     CHECK WORKLOAD END;
**** 13:48:12 UTY0812 MLOAD session(s) requested: 4.
**** 13:48:12 UTY0815 MLOAD session(s) connected: 4.
**** 13:48:12 UTY0817 MultiLoad submitting the following request:
     BEGIN MLOAD ML0020 WITH INTERVAL;
**** 13:48:12 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 10);
**** 13:48:12 UTY0817 MultiLoad submitting the following request:
     MLOAD ML0020 with WT_ML0020 errortables ET_ML0020, UV_ML0020;
     ========================================================================
     =                                                                      =
     =          MultiLoad DML Transaction Phase                             =
     =                                                                      =
     ========================================================================
**** 13:48:13 UTY0817 MultiLoad submitting the following request:
     BT;
**** 13:48:13 UTY0817 MultiLoad submitting the following request:
     USING FF1(INTEGER), FF2(FLOAT), FF3(FLOAT), FF4(FLOAT), FF5(FLOAT),
     FF6(FLOAT), FF7(FLOAT) INSERT INTO ML0020
     VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7);
**** 13:48:13 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 20);
**** 13:48:13 UTY0817 MultiLoad submitting the following request:
     ET;
     ========================================================================
     =                                                                      =
     =          MultiLoad Acquisition Phase                                 =
     =                                                                      =
     ========================================================================
**** 13:48:14 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:14 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 0;
**** 13:48:14 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 0;
**** 13:48:15 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 0;
**** 13:48:17 UTY0817 MultiLoad submitting the following request:
     USING Ckpt(VARBYTE(1024)) INSERT FLUSER.ML0020_LOG         (Logtype, Seq,
     MLoadSeq, MLoadImpSeq, MLoadSrcSeq,
     MiscInt1,MiscInt2,MiscInt3,MiscInt4,
     MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt)
      VALUES (110, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, :Ckpt);
**** 13:48:17 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 0;
**** 13:48:18 UTY0817 MultiLoad submitting the following request:
     USING Ckpt(VARBYTE(1024)) INSERT FLUSER.ML0020_LOG         (Logtype, Seq,
     MLoadSeq, MLoadImpSeq, MLoadSrcSeq,
     MiscInt1,MiscInt2,MiscInt3,MiscInt4,
     MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt)
      VALUES (110, 1, 1, 1, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 1, :Ckpt);
**** 13:48:19 UTY0826 A checkpoint has been taken, recording that end of file
     has been reached for IMPORT 1 of this MultiLoad Import task.
**** 13:48:19 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 1;
**** 13:48:20 UTY0817 MultiLoad submitting the following request:
     USING Ckpt(VARBYTE(1024)) INSERT FLUSER.ML0020_LOG          (Logtype, Seq,
     MLoadSeq, MLoadImpSeq, MLoadSrcSeq,
     MiscInt1,MiscInt2,MiscInt3,MiscInt4,
     MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt)
       VALUES (110, 1, 2, 1, 0, 5, 5, 5, 5, 0, 0, 0, 0, 1, 1, :Ckpt);
**** 13:48:20 UTY1803 Import processing statistics
     .                                       IMPORT  1     Total thus far
     .                                       =========     ==============
     Candidate records considered:........           5.......           5
     Apply conditions satisfied:..........           5.......           5
     Candidate records not applied:.......           0.......           0
     Candidate records rejected:..........           0.......           0
**** 13:48:20 UTY1821 Aquisition Phase statistics
     Elapsed time:  00:00:06
     CPU time:      0 Seconds
     MB/sec:        4.33333e-005
     MB/cpusec:     N/A
**** 13:48:20 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 1;
**** 13:48:21 UTY0817 MultiLoad submitting the following request:
     CHECKPOINT LOADING INTERVAL 1 END;
**** 13:48:23 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 30);
**** 13:48:23 UTY0817 MultiLoad submitting the following request:
     ET;
     ========================================================================
     =                                                                      =
     =          MultiLoad Application Phase                                 =
     =                                                                      =
     ========================================================================
**** 13:48:23 UTY0817 MultiLoad submitting the following request:
     EXEC MLOAD ML0020;
**** 13:48:24 UTY0818 Statistics for table ML0020:
        Inserts:                    5
        Updates:                    0
        Deletes:                    0
**** 13:48:24 UTY1822 Application Phase statistics
     Elapsed time:  00:00:01
**** 13:48:24 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq) VALUES (115, 1)
**** 13:48:24 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:24 UTY0817 MultiLoad submitting the following request:
     END MLOAD;
**** 13:48:24 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq) VALUES (120, 1)
**** 13:48:25 UTY0817 MultiLoad submitting the following request:
     USING Ckpt(VARBYTE(1024)) INS FLUSER.ML0020_LOG (LogType, Seq,
     MLoadCkpt)VALUES(135, 1, :Ckpt);
**** 13:48:25 UTY0817 MultiLoad submitting the following request:
     END TRANSACTION;
     ========================================================================
     =                                                                      =
     =          MultiLoad Task Cleanup                                      =
     =                                                                      =
     ========================================================================
**** 13:48:26 UTY0817 MultiLoad submitting the following request:
     SELECT CAST(COUNT(*) AS BIGINT) FROM ET_ML0020;
**** 13:48:26 UTY0821 Error table ET_ML0020 is EMPTY, dropping table.
**** 13:48:26 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:26 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 1)
**** 13:48:27 UTY0817 MultiLoad submitting the following request:
     DROP TABLE ET_ML0020;
**** 13:48:27 UTY0817 MultiLoad submitting the following request:
     END TRANSACTION;
**** 13:48:27 UTY0817 MultiLoad submitting the following request:
     SELECT CAST(COUNT(*) AS BIGINT) FROM UV_ML0020;
**** 13:48:28 UTY0821 Error table UV_ML0020 is EMPTY, dropping table.
**** 13:48:28 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:28 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 2)
**** 13:48:28 UTY0817 MultiLoad submitting the following request:
     DROP TABLE UV_ML0020;
**** 13:48:28 UTY0817 MultiLoad submitting the following request:
     END TRANSACTION;
**** 13:48:29 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:29 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 3)
**** 13:48:29 UTY0817 MultiLoad submitting the following request:
     DROP TABLE WT_ML0020;
**** 13:48:29 UTY0817 MultiLoad submitting the following request:
     END TRANSACTION;
**** 13:48:30 UTY0825 Error table statistics for:

     Target table 1: ML0020
     Number of Rows        Error Table Name
     ====================  ==================================================
                        0  ET_ML0020
                        0  UV_ML0020

**** 13:48:30 UTY0817 MultiLoad submitting the following request:
     BEGIN TRANSACTION;
**** 13:48:30 UTY0817 MultiLoad submitting the following request:
     USING Ckpt(VARBYTE(1024)) INS FLUSER.ML0020_LOG (LogType, Seq,
     MLoadCkpt)VALUES(140, 1, :Ckpt);
**** 13:48:30 UTY0817 MultiLoad submitting the following request:
     INS FLUSER.ML0020_LOG (LogType, Seq) VALUES (125, 1)
**** 13:48:30 UTY0817 MultiLoad submitting the following request:
     END TRANSACTION;
**** 13:48:32 UTY0822 MultiLoad processing complete for this MultiLoad import
     task.
     ========================================================================
     =                                                                      =
     =          MultiLoad Task Complete                                     =
     =                                                                      =
     ========================================================================
**** 13:48:34 UTY1024 Session modal request, 'SET
     QUERY_BAND='UTILITYNAME=MULTLOAD;' UPDATE FOR SESSION;', re-executed.
     ========================================================================
     =                                                                      =
     =          Processing Control Statements                               =
     =                                                                      =
     ========================================================================

0022 .LOGOFF;
     ========================================================================
     =                                                                      =
     =          Logoff/Disconnect                                           =
     =                                                                      =
     ========================================================================
**** 13:48:34 UTY6216 The restart log table has been dropped.
**** 13:48:35 UTY6212 A successful disconnect was made from the RDBMS.
**** 13:48:35 UTY2410 Total processor time used = '0.577204 Seconds'
     .       Start : 13:47:53 - TUE MAY 02, 2017
     .       End   : 13:48:35 - TUE MAY 02, 2017
     .       Highest return code encountered = '0'.