x12 850 to CSV

313 views
Skip to first unread message

Chris Luehmann

unread,
Apr 21, 2015, 11:47:50 AM4/21/15
to bots...@googlegroups.com
Hello all,

I know this is a beginner question, but I need some help.

My goal is to translate x12 850 to CSV and I'm having trouble.
I believe that my issue comes with my "frommessagetype" -- I keep getting various errors.

How do I know the message type?

Any help would be greatly appreciated!


This is my current workflow:

Translation:
Fromeditype: x12 Frommessagetype:  850004010VICS
Mapping Script: orders_x122xml
Toeditype: csv  Tomessagetype: csv_orders

Route:
Fromeditype: x12  Frommessagetype:  850004010VICS

Daniel Tuffs

unread,
Apr 21, 2015, 11:57:19 AM4/21/15
to bots...@googlegroups.com
looking at the mapping script name suggests you're translating to xml. which wouldn't line up with a csv file. was the csv grammar made to same structure as the xml grammar that mapping file was originally for?

henk-jan ebbers

unread,
Apr 21, 2015, 12:18:54 PM4/21/15
to bots...@googlegroups.com
hi Chris,

use:
Route:
Fromeditype: x12 Frommessagetype: x12

bots will find out what messagetype it is by itself.


kind regards,
henk-jan
> --
> You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com <mailto:botsmail+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Chris Luehmann

unread,
Apr 21, 2015, 1:14:18 PM4/21/15
to bots...@googlegroups.com
Where can I get additional mappings?  

I'm looking for an x12 --> CSV.  I see one for x12 -> Fixed, but that's all I can find.

Also, which structure is "fixed"?

henk-jan ebbers

unread,
Apr 21, 2015, 1:35:20 PM4/21/15
to bots...@googlegroups.com


On 04/21/2015 07:14 PM, Chris Luehmann wrote:
> Where can I get additional mappings?
>
> I'm looking for an x12 --> CSV. I see one for x12 -> Fixed, but that's all I can find.
there are plugins for download.
if there is no such plugin, it is not provided.
nice if you provide...

>
> Also, which structure is "fixed"?
fixed in bots are fixed length records.



kind regards,
henk-jan

>
> On Tuesday, April 21, 2015 at 11:57:19 AM UTC-4, Daniel Tuffs wrote:
>
> looking at the mapping script name suggests you're translating to xml. which wouldn't line up with a csv file. was the csv grammar made to same structure as the xml grammar that mapping file was
> originally for?
>
> On Tuesday, 21 April 2015 16:47:50 UTC+1, Chris Luehmann wrote:
>
> Hello all,
>
> I know this is a beginner question, but I need some help.
>
> My goal is to translate x12 850 to CSV and I'm having trouble.
> I believe that my issue comes with my "frommessagetype" -- I keep getting various errors.
>
> How do I know the message type?
>
> Any help would be greatly appreciated!
>
>
> This is my current workflow:
>
> Translation:
> Fromeditype: x12 Frommessagetype: 850004010VICS
> Mapping Script: orders_x122xml
> Toeditype: csv Tomessagetype: csv_orders
>
> Route:
> Fromeditype: x12 Frommessagetype: 850004010VICS
>

Chris Luehmann

unread,
Apr 21, 2015, 2:57:41 PM4/21/15
to bots...@googlegroups.com
I'm now trying to translate from x12 to XML.  I'm currently getting this error:  MessageError: [A51]: Found non-valid data at end of edi file; probably a problem with separators or message structure: "000083661".

I'm assuming this is referring to the last line of the file.

I've attached a sample file I'm trying to translate -- I know the filetype says .edi, but it looks to be in x12 formatting rather than EDI -- if I'm incorrect PLEASE TELL ME!

Thanks for all your support!
sample.edi

Tom Westrick

unread,
Apr 21, 2015, 3:04:55 PM4/21/15
to bots...@googlegroups.com
X12 is an EDI type/standard. Your problem is that you need a blank line at the end as a line break is your segment separator.

-Tom

Chris Luehmann

unread,
Apr 21, 2015, 3:30:04 PM4/21/15
to bots...@googlegroups.com
Alright, I'm almost there!

I'm now getting error:  MessageError: [E17]: Count in GE-GE01 is 2; should be equal to number of transactions: 1.

If GE*2*110425 is changed to GE*1*110425 it runs without error.  

What is the Group Set Trailer and what does it effect?  What is being changed when edited from 2 to 1?

--
You received this message because you are subscribed to a topic in the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/botsmail/fhTdNxYwcUM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to botsmail+u...@googlegroups.com.

Tom Westrick

unread,
Apr 21, 2015, 3:33:07 PM4/21/15
to bots...@googlegroups.com
That is the number of transaction sets included (ST/SE groups). In the example file you gave, there is only one ST/SE group. Where did you get this file from?

-Tom

Chris Luehmann

unread,
Apr 21, 2015, 4:49:06 PM4/21/15
to bots...@googlegroups.com
Alright, I understand.  The files I'm working with are generated hourly.

Is there a way to modify the field domains length maximum?  I'm getting an error saying that the "desc" field has a max of 70 chars, which seems arbitrary to me.  Can this limit be modified?

Tom Westrick

unread,
Apr 21, 2015, 4:54:35 PM4/21/15
to bots...@googlegroups.com
Could you post the error? I am guessing you are getting this error when bots is trying to create the XML file. You could edit the grammar to increase the max size if whatever is using the XML file supports a field greater than 70 chars.


-Tom

Chris Luehmann

unread,
Apr 21, 2015, 5:01:23 PM4/21/15
to bots...@googlegroups.com
Sure!  This is the error I'm getting:

MessageError: [F20]: Record "message-lines-line" field "desc" too big (max 70): "Horizontal Toast 5/8 in. Thick x 3-3/4 in. Wide x 37-3/4 in. Length Solid Bamboo".


Tom Westrick

unread,
Apr 21, 2015, 5:08:18 PM4/21/15
to bots...@googlegroups.com
Ok, it would appear that is from the XML grammar. Increasing the max size should work.

-Tom
Reply all
Reply to author
Forward
0 new messages