load txt file with delimitor

Database
Enthusiast

load txt file with delimitor

I want to load a txt file into Teradata. Thelayout of this text file looks like

AAA|BBBBBB|CCC CCC|DD
AA|BB BBBB.||D DD
………

As you can see the lines delimited by |, how can I convert it into following layout?
AAA BBBBBB CCC CCC DD
AA BB BBBB. D DD

………
With the fix length(10,12,13.5)
2 REPLIES
ac
Enthusiast

Re: load txt file with delimitor

hi yujing

You should be able to import that file directly into teradata with (for example) bteq or mload by specifying the vartext option. If you want to transform the file before loading you'd need to use a client side tool to perform the tranformation. The choice of tool would depend on what's available on your client system. You might use COBOL/REXX on MVS, awk on unix...

Cheers,

Andy
Enthusiast

Re: load txt file with delimitor

Andy,Thank you very much!