Altova Horizontal Split

265 views Asked by At

I am trying to split a repeated string in Tradacoms Edi file.

I have a line as below

DNC+14+1+1++268:2758005:268:2758006

I would like to split this based on the code : 268. So I should be getting 2 rows (2758005, 2758006)

I am using rtex filter to pull the value out for 268. However, it only pulls the first value (278005)

Any ideas on how to get them split properly?

  • Alan -
1

There are 1 answers

0
Codex On

The way to do this properly is with the Enterprise version of mapforce. Rather than using the tools to split the file read the file by setting up an EDI input and picking the right version of the standard.

It will clean component on the left with everything labeled and in the right fields. Then you can map perfectly from that to whatever you want.

Otherwise, you can use variants of the string functions to do this. But that will be incredibly messy. You really should be using EDI to do EDI. If you can't get the right mapforce version then there are free x11 tools that will convert it to XML. Here's a free open source one. https://x12parser.codeplex.com/documentation

From there using mapforce you can add an XML input (mapforce can generate the XSD for you) and start mapping from there. Either to me is far better than simply splitting on strings which negates the actual implementation of mapforce to handle all the logic/crap for you.

Cheers,

Walter.