Re: COBOL to 4GL convertor
Posted in 1995
rlm@thehill.chrh.org (Robert Murphy) wrote:
>
>
> We are looking for a COBOL to 4GL translator. Any suggestions of a
> source, public, private or contract.
> --
> +-------------------------------------------------------------+
> | Robert Murphy Cardinal Hill Rehabilitation Hospital |
> | rlm@chrh.org Phone: 606/254-5701 |
> | FAX: 606/253-2906 |
> | Any opinions expressed here are mine, not my employer's |
> +-------------------------------------------------------------+
I have some Working Storage xref tools from my latest project if
anyone is interested...yes they're free...Robert gracefully declined
off-line, but I thought maybe the rest of you might like them...
and they are a panacea...( I'm very close to some GOOD swamp land
too!--really! )
How they work:
Take a WS ( Working Storage ) and roll up your "REDEFINES" into
simple data elements. Format each line so it falls within a
certain range, with lots of air ( spaces ). The main xref tool
documents what to do.
If you use a lot of prefixing on your variables, strip off the
prefixes: Example: H-ADR-ADDRESS1 and T-ADDRESS1 would be
stripped to ADDRESS1. There's some pigs-eye relating going on here
but of course we're going to use our friend AWK to create the
cross-reference. A flat-file db is going to be created from whence
cometh a report. ( By the way AWK is nice when it comes to orphan
group printing on the header. I wish INFORMIX had orphan support in
their reports but hey life could be worse, I would have to program
in COBOL! COBOL doesn't have the NEED ? LINES statement <burp> )
Anyway, once the data-file is generated, a nice report is created.
The premise is on you making "tables" out of the sections of your
working storage that would appear to look like tables to a relational
eye. Since I got lucky on this project with the way the WS is laid
out these tools might be a complete waste to you, but you make the
call, I enjoyed writing them, and the reports/xref looks great.
I even came up with a "dbschema" program from the data file, a
"info for tables" style "table" report,a program to create RECORDs
for a 4GL program, and a report-code-generator for a report based on
the layout of one of every one of the data structures in the WS--the
pseudo-tables, which was the goal in the first place. If you have to
convert a COBOL "DB" to INFORMIX these might help. A moment of thanks
to Aho Wienberger & Kernigan cause they are @#$@#$^&*^ geniuses...
Tim Schaefer
ps. Netscape News viewer is excellent...just can't put my new
signature on the end of the posting darnit.