Re: EDI Using Informix
Posted in 1995
zgedtts@orf.nctamslant.navy.mil (DTTS) wrote: >>> We're interested in implementing "classical" EDI ... >>> Has anyone use or written Informix code for this purpose? >By "classical" EDI, do you mean ANSI X12? We use a translator which I >wrote in ESQL/C for ASC X12 EDI, release 3010. However, it is customized >for a unique application and only makes use of the 858 and 997 transaction >sets. I set up files in my SE database which keep track of the ISA, GS, >and ST sets received for purpose of audit trails and producing 997s. Using >ESQL/C, I load valid shipment data directly into my SE database as I am >translating it. >ESQL/C works great for this. Admittedly, a custom application limits the >portability of the code. However, the real work in EDI is processing the >flat files produced by the translator to and from your unique database. In >addition, commercial translators only check for EDI syntax and don't provide >edits on any unique conventions you may have worked out with your trading >pardner. We tried a commercial translator and then discarded it. After you >get the hang of ANSI X12, it's just as easy to read the EDI transaction set >as it is to translate it and then read the flat file. >If you are only dealing with one or two trading pardners and your data >transfer needs are relatively simple, I personally would not recommend ANSI >X12. It was designed by a committee and the government is pushing it. That >should tell you something. I am not up to date on X12 but if each segment type has fixed number of fields, a simple C program could parse each segment into its own file prefixed/suffixed with the line # from the flat file. Each of these segment files could be loaded into matching db tables by using DBLOAD. If the number of fields in each segment is variable, create an ideal record layout for each segment. Create these same tables in the database. A C program could parse each segment into the ideal record and written to seperate fiels for each segment as before. The use DBLOAD. This is easier to maintain and keep up date than using ESQL/C even though the same logic could be used. -------------------------------------------------------- Rob McAllister rmcall@on-ramp.ior.com Spokane, WA "On all good programmers a little core must dump"