Archives of the TeradataForum
Message Posted: Fri, 20 Apr 2007 @ 19:09:46 GMT
Subj: | | Unable to read multi files using variables |
|
From: | | Kopuuravuri, Ramu |
I'm trying to import 2 files as variables
.ACCEPT L1 from ENV VAR L1;
.ACCEPT X2 from ENV VAR X2;
.IMPORT INFILE &DATA_DIR./&L1
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
.IMPORT INFILE &DATA_DIR./&X2
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
But 2nd variable is not accepting in Mload. I try with hard code file name it is working fine.
0049 .IMPORT INFILE &DATA_DIR./&L1
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
**** 12:20:02 UTY2402 Previous statement modified to:
0050 .IMPORT INFILE
/home/data/File_001_20070303170000_20070201.txt
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
0051 .IMPORT INFILE &DATA_DIR./&X2
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
**** 12:20:02 UTY2402 Previous statement modified to:
0052 .IMPORT INFILE
/home/data/File_002_20070303170000_20070201.txt
Layout lay_file
FORMAT VARTEXT '|'
APPLY UPSERT_DML;
**** 12:20:02 UTY0014 Bad keyword in the IMPORT command at position 95:
". Expected "LAYOUT" but found "
Using variables I'm unable to load the data.
Thanks in advance.
|