There must be some products out there that do this. For example IBM has JCA connectors to CICS ECI and other vendors like Attachmate have their own integraiton engines. Can you afford to purchase an integration product?
Several challenges:
1) Parsing a copybook or COBOL source code. I've seen it done (in COBOL) and it didn't look too bad. But you can get the compiler to do it for you. I wrote something to extract fieldnames, data type, offset & length in the 01 level from a COBOL compiler listing. See if your PL/I listings have something easy to pull out.
2) Generate matching Java. I don't think you could guarantee matching Java structures without restricting thes use of hierarchies and redefines in COBOL. You could have a getFieldX() routine that would substring any COBOL field and convert the type. If you need setFieldX(value) too you might store the record as a byte or char array.
3) Populate a Java object. If you used the getFieldX() approach, you would only have populate a
string representing the full record and generate the getters.
For those without a COBOL background, here's a structure you can't really translate to Java. It's been at least 10 year since I actually compiled any COBOL but this ought to be close enough ...
We can move a string (display format) "12/31/1985" to Date-Of-Birth, do arithmetic on the numeric year and move the string back out.
[ May 21, 2005: Message edited by: Stan James ]