Sub Parsing data in Variable len delimited [message #69348] |
Wed, 12 December 2001 15:11 |
Tom Feehan
Messages: 1 Registered: December 2001
|
Junior Member |
|
|
I have a control card like:
LOAD DATA
APPEND
INTO TABLE AFF
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
RCRD_NBR RECNUM,
ID ,
CD ,
A_NBR "SUBSTR(REPLACE(REPLACE(REPLACE(REPLACE(:NBR,' '),')'),','),'-'),1,3)",
B_NBR "SUBSTR(REPLACE(REPLACE(REPLACE(REPLACE(:NBR,' '),')'),','),'-'),4,3)",
C_NBR "SUBSTR(REPLACE(REPLACE(REPLACE(REPLACE(:NBR,' '),')'),','),'-'),7,4)"
)
I get an error msg "variable unbound". I want to keep the input variable length ( not fixed position), but want to parse the one field. Any ideas?
----------------------------------------------------------------------
|
|
|
|