For Programmers: Free Programming Magazines  


Home > Archive > Cobol > February 2005 > EDIFACT and z/OS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author EDIFACT and z/OS
Joe Zitzelberger

2005-02-25, 3:55 am

Is anyone aware of of vendor package for dealing nicely with EDIFACT
files on z/OS?

I've recently received a question for research from the group dealing
with said files that they are unable to cope nicely with the '
record delimiter.

It seems the programmers are expecting to be able to do a simple COBOL
sequential file READ and receive exactly 1 record. But the transmission
product is not breaking QSAM records on the ' delimiter.

Writing a program to reformat the file into 1 QSAM record per ' is
trivial. My great concern is that this is only the FIRST problem that
has reared its unsightly head. I don't want to have to repeat this
process several hundred more times as the project continues.

I'm tempted by the PERL EDIFACT-to-XML package -- but the shop doesn't
run Perl in production, though it is available via OMVS, I don't want to
get too out-of-the-box on them.

I suppose what I want is any of the following:

- Texts on EDIFACT handling in Cobol or in general MVS envorinments.

- Free packages/software/source examples for dealing with the files.

- Vendor products that make EDIFACT easier to use.

The languages available are IBM Enterprise Cobol, Rexx, IBM C, Java,
PL/I, IBM Pascal and, of course, High Level Assembler. Anything like
pointers to packages or documentation in those languages is greatly
appreciated.

TIA...
Richard

2005-02-25, 3:55 am

> I suppose what I want is any of the following:
> - Texts on EDIFACT handling in Cobol or in general MVS

envorinments.
> - Free packages/software/source examples for dealing with the

files.
> - Vendor products that make EDIFACT easier to use.


I have been writing systems that create and process EDIFACT messages
for a couple of decades. Some are in Cobol, some in C. These days I
create them using templates so I no longer care so much if the user
wants EDIFACT or XML or CSV.

You need to be careful as the characters may be escaped. This means
that, for example:

NAD+ST+1234::91+MARY?'S MARKET STALL'

is one segment. You probably also need to use the UNA to specify the
characters used in the message, so these need not be :+.? '.

This generally means that you need to process the whole message
character by character, UNSTRING just won't work, nor will breaking it
into lines using "'".

Also you need to ignore control characters between a segment terminator
and the next segment. I have found that when sending some receivers
need to have newlines (of some form) while others need not to have them
and some don't care. My software doesn't care.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com