Table Conversion Error Handling

scottwong

Member
I am trying to catch the error when I am doing table conversion. One error I met is the data length in file is longer than the data length in JDE table. Is there a way to catch this error? Thanks,
 
Scott,

I don't know what kind of table conversion you are doing,
but when I convert text file into JDE (usually the text
file is comma delimited), when a field in the input exceeds
the length defined in the Format, the TC crashes and I get
an entry in JDE.Log that gives me the "Guilty" string.

Now, you could increase in the format the length of the
field, to avoid the program crashing (e.g. you convert a
Description field, that is 30 characters in JDE, but you
could define it in the Text format as 50 characters).

In the Event Rule (Format Fetched), you can then check the
length of the string and truncate it if necessary.
At this stage, I usually have a custom JDE table that I use
to record this type of errors (use Table IO...)... this is
how I handle errors.

Hope this helps

Cheers

Philippe



One World B7332 SP14.2 AS400
 
Thanks, I thought about this way too. I am just wondering there maybe
another better way to do it which I don't know since I am quite new in this
area.

Thanks again,

Scott
 
Hi Scott,

First, welcome to the JDEList Forums!

Just some addition after Philippe's reply.

I prefer to use Fixed Field Length records instead of comma (or other) delimited in the input (and output too) file and I use our "flexible" data type conversion Business Function to convert string parts into date or number, so this way I can handle all type of errors, e.g. invalid number or date too.

In the past, I also used Table Conversion but it placed the flat file only into a workfile and made only some preparation and I placed the most part of our logic into a "main" UBE where I could write more flexibly ER logic and make complicated processes and produce a report about the input as well about errors and statistical data.

Recently I have created 3 new interfaces (2 output + 1 input) and I omitted to use Table Conversion and I used Business Functions to Open, Read, Write and Close the flat file. This is a bit flexible and simple solution, because:
* I do not have to setup OneWorld to access the Flat File (ODBC Data Source, OneWorld Data Source, OneWorld Environment to acces flat files, etc.)
* there are easy ways to deal with the file names and locations

On the other hand, in the mentioned input interface, I used first time the transaction processing with succes to perform a "nothing or all" input.

Hope, could help a bit.

Regards,

Zoltán
P.S.1: I (and many of us) have already sent a lot of post in the flat file and interface themes. Please, check the archives if you are interested in it.
P.S.2.: Next times please, attach your systmconfiguration information too. Thanks.

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Thanks a lot for your help. I think I am going to try to use business
functions to manipulate the file too.

Regards,

Scott

B7333, SP16, Windows 2000, Oracle 8.1.7.
======================================================================
 
Re: RE: Table Conversion Error Handling

Hi Scott,

The original B34A1010 "Flat File Operations" BSFN Source does not contain Read function just Open, Write, Close.
I have been copied it and extended the copy with Read function.
Please, check the post conatining "B34A1010" in the archives for a bit more detail.

Good Luck to play with flat files,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Re: RE: Table Conversion Error Handling

Hi Zoltán

Thanks a lot, that really helpful.


B7333, SP16, Windows 2000, Oracle 8.1.7.
======================================================================
 
Re: RE: Table Conversion Error Handling

Hi Zoltán

I have another question. I am trying to transfer data from F3111Z1 to F3111. I did load data from flat file into F3111Z1 using table conversion first. Do you know which batch process should I use to do the data transfer from F3111Z1 to F3111? Is R31113Z1I the one I should use or something else? I tried R31113Z1I and it didn't work for me.


Best Regards,

Scott

B7333, SP16, Windows 2000, Oracle 8.1.7.
======================================================================
 
Back
Top