MLOAD .LAYOUT continueif
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


MLOAD .LAYOUT continueif Expand / Collapse
Author
Message
Posted 6/26/2006 2:11:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/8/2008 3:44:46 PM
Posts: 1, Visits: 3
I have data that is variable length and can be continued in any field with the character "\".
I have the following defined. But I am getting an error message when I try to run. Is anyone more familar
with the continueif statement? I need the input line to continue to the next line when a "\" is encountered. I also tried with a single "\" and got the same error. the documentation says that format of the continueif is position = value. Position has to be a positve value > 0 and is in relation to the 1st char of the record. I have tried multiple different ways, but I always get a syntax error when anything other than a numeric is used to start the condition.

.LAYOUT LAYOUT_LABEL1 continueif 1 = '\\';
.FIELD ABC * VARCHAR(22);
.FIELD DEF * VARCHAR(5);
.FIELD GHI * VARCHAR(50);
.DML LABEL DML_LABEL1;
insert into ${LOADDB}.${LOADTABLE1} (
ABC,
DEF,
GHI
) values (
:ABC,
EF,
:GHI
);

.IMPORT
INFILE ${FTPPATH}/input.file
FORMAT VARTEXT '^V' NOSTOP
LAYOUT LAYOUT_LABEL1
APPLY DML_LABEL1;

**** 10:31:17 UTY4203 Attempted to access out of range input data in field 'ABC', file
'/export/home/yblmgpq/load/input.file',record number '1'.
**** 10:31:17 UTY1803 Import processing statistics
. IMPORT 1 Total thus far
. ========= ==============
Candidate records considered:........ 1....... 1
Apply conditions satisfied:.......... 0....... 0
Candidate records not applied:....... 0....... 0
Candidate records rejected:.......... 0....... 0
========================================================================
= =
= Logoff/Disconnect =
= =
========================================================================
**** 10:31:24 UTY6212 A successful disconnect was made from the RDBMS.
**** 10:31:24 UTY2410 Total processor time used = '8.18 Seconds'
. Start : 10:30:28 - MON JUN 26, 2006
. End : 10:31:24 - MON JUN 26, 2006
. Highest return code encountered = '12'.

data looks something like this: There is no fixed position that the "\" will occur.
15^V12G^VThis is the\$
text$
17^V14G^VThis is another line$
19^V15G\$
\$
The text line$
21^V16G^VAnother line$


Thanks

David

Post #4443
Posted 6/28/2006 3:53:14 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2 days ago @ 3:41:05 AM
Posts: 522, Visits: 264
This can't be done within Mload using continueif.

Do the concatenation before you load the file or write an Inmod to do it...

Dieter

Post #4478
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 3:55am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 7 queries. Compression Disabled.