× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.

On Tue, May 31, 2022 at 10:21 AM Art Tostaine, Jr. <atostaine@xxxxxxxxx> wrote:

I've done it. I created a data structure for each line type, ST, SE, N1,
N2, etc.

Then I just wrote a parser to look for the segment terminator and put the
data into those fields. I pass the data structure name and the data. I
don't have any code to share though sorry.

It's interesting. Googling around for free Python EDI packages, I
found someone asking on the Python mailing list (20 years ago!)
whether there exists a Python EDI-to-XML converter.

Here are a couple of choice excerpts from the response:

The main thing is to understand that it's not complicated. I worked on
an EDI product years ago, and we hired several programmers with CS
backgrounds who immediately wanted to use stuff like lex and yacc on
it. Really, EDI was designed to be processed by RPG and COBOL programs
and just doesn't have much syntactic hair. If you find yourself
reaching for fancy compiler implementation techniques, you're probably
misunderstanding something.

99% of the work is typing in all the rules from the spec. The code
that follows them should be very simple.

And Rob said existing EDI packages are expensive.

So it's not surprising to me that plenty of IBM midrange shops,
particularly smaller, more cash-strapped ones, would opt for rolling
their own.

Indeed, data structures in RPG seem almost tailor-made for EDI "parsing".

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2023 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.