|
|
|
Forum 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
|
|
|
|
|
Supreme 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
|
|
|
|