Multiload using two source files

Tools
Enthusiast

Multiload using two source files

hi

i want to mload data from two separate files into a single table.
i dont know whether it is possible or not, if so please tell me how to do a multiload for this or
even if there is any other alternative.

.LAYOUT COUNTDS;
.FIELD RULECNT * CHAR(12);
.DML LABEL COUNTDS1_ins;

.LAYOUT ERCDS;
.FIELD ERRORCODE * CHAR(4);
.DML LABEL ERCDS1_ins;
INSERT INTO TEMP_EXCPT_SG
(
REC_CNT,
EXCPT_DEF_CD,
)
VALUES
(
:RULECNT,
:ERRORCODE,
);

.IMPORT INFILE INDATA1
LAYOUT COUNTDS
APPLY COUNTDS1_ins;

.IMPORT INFILE INDATA2
LAYOUT ERCDS
APPLY ERCDS1_ins;

.END MLOAD;
.LOGOFF;

is it possible to do some thing like this?

Ajai
2 REPLIES
Teradata Employee

Re: Multiload using two source files

You can do it using any of these methods:

1. Use Teradata Parallel Transporter (TPT).

2. Run the mload twice. First on one file then on the other.

3. Combine the files and run mload.

4. Create a named pipe (on Unix) and stream both files to it.
Enthusiast

Re: Multiload using two source files

use cat command in command line and redirect to single file ....
use that file in mload script

if u r running in unix env

if it is windows

write first mlaod script with out endmload command
after that write next with endmload command

execute the script