TC for reading Flat File

KSK

KSK

Well Known Member
Hi,
I’m trying to read a flat file of Text format with comma(,) delimited ,for that I’ve written an Table conversion with input as Text file and out as my JDE table F55XXX .

JDE is Converting the data in text into some Junk characters and unable to read the data properly , Due to this special character TC is not recognizing the delimiter and showing “TextLine1 exceeds length in column definition” in JDE.log.

Please Give solution for avoiding the junk
PFA the log file.

Release =8.12



Thanks
Siva
 
Make sure that you have a record in the F93081 as a default for all.=A0 You can add one using the following application:=A0
P93081 =96 Work with Flat File Encoding ( and use CP1252 as the default enc oding=A0for all)
=A0
Hope this helps
 
Hi, how are you reading the flat file, with a BF, ner..¿?..and how you generate the regs in the table..?

I do this in many proces and works fine..!!
i use a NER to read the flat file and this function puts the lines into a table.

Example
192384WHEREHOUSE DENVER0200120180
i get this line from the flat file with de BF "Fetch Next Line from Flat File"

and after i parse the string like this
the first 6 possition are the ITM so i convert this text to a number and assign to a ITM variable.
and from the position 7 to the 24 is a description then i put this into a DL01 variable...an so on..
i get a portion and each portiton must prepared before asign to a variable and after this, you can insert this variables into a table as usual.


Zorry for my terrible english..

saludos ...
 
Show us teh data! <- note properly formatted 'net speak'.


tongue.gif
 
I got the solution; Input notepad file (.txt) should be in UNICODE format. My Notepad is in ASCI format, so the Table Conversion unable to read the data in ASCI format and taking it as Junk Characters .
 
There are two things to note while transfering data from flat file to JDE.

1. Directly transfering the data from flat file to JDE without any formatting of the column values. Here the columns should be defined with user defined format(defining the data type and size) Choose the delimiter(comma,colon,space,tab etc) the delimiter should be present throught the file.Later map the input text columns with output JDE and run the TC.

If I see you Error Log, it looks like delimiter is not present for some values after ITM column. Please check this.

2.Second thing can be converting the text data into numberic or string and before inserting the data into JDE.

In the row fetched event we can do convert,ltrim,rtrim,substr whatever is suitable.
 
Hi KSK

You said that,
I got the solution; Input notepad file (.txt) should be in UNICODE format. My Notepad is in ASCI format, so the Table Conversion unable to read the data in ASCI format and taking it as Junk Characters .

May I know, the process of converting the ASCI file format to UNICODE file format ?
 
Back
Top