Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update 6/25:</strong> A friend just ran across the <a href="http://media-tech.blogspot.com/2009/06/naca-presented-jazoon-2009.html" rel="nofollow noreferrer">NACA</a> Cobol to Java converter. Looks quite interesting, it was used to translate 4m lines of Cobol with 100% accuracy. Here's the <a href="http://code.google.com/p/naca/" rel="nofollow noreferrer">NACA open source project page</a>. The other converters I've seen were proprietary, and the materials were conspicuously lacking success stories and detailed example code. NACA is worth a long look.</p> <p><strong>Update 7/4:</strong> @Ira Baxter reports that the Java output looks very Cobol-esque, which it absolutely does. To me, this is the natural result of automatic translation. I doubt we'll ever find a much better translator. This perhaps argues for a gradual re-write approach.</p> <p><strong>Update 2/7/11:</strong> @spgennard points out that there are some Cobol compilers on the JVM, for example Veryant's <a href="http://www.veryant.com/products/" rel="nofollow noreferrer">isCobol Evolve</a>. These could be used to help gradually transition the code base, though I think the OP was more interested in automated source conversion.</p> <hr> <p>I'd be very cautious about this. (I used to work for a company that automatically <em>corrected</em> Cobol and PL/I programs for Y2K, and did the front end compiler that converted many dialects of Cobol into our intermediate analytic form, and also a code generator.) My sense is that you'd wind up with a Java code base that still would be inelegant and unsatisfying to work with. You may wind up with performance problems, dependencies on vendor-supplied libraries, generated code that's buggy, and so on. You'll certainly incur a huge testing bill.</p> <p>Starting from scratch with a new object-oriented design can be the right approach, but you also have to carefully consider the decades of stored knowledge represented by the code base. Often there are many subtleties that your new code may miss. On the other hand, if you're having a hard time finding staff to maintain the legacy system, you may not have a choice.</p> <p>One gradual approach would be to first upgrade to Cobol 97. This adds object-orientation, so you can rewrite and refactor subsystems individually when you add new functionality. Or you could replace individual subsystems with freshly-written Java. </p> <p>Sometimes you'll be able to replace components with off-the-shelf software: we helped one very large insurance company that still had 2m lines of code in a legacy language it created in the 1950s. We converted half of it to Y2K compliant legacy language, and they replaced the other half with a modern payroll system they bought from an outside vendor.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThe NACA output looks COBOL-esque because they designed the translator to be trivial, e.g., they're simply implementing COBOL semantics using java code. There's no reason you can't produce much better translations. For instance, the NACA implementation likely keeps the decimal data type from the mainframe and implements decimal arithmetic, etc, thus ADD A TO B in COBOL gets translated to something like (NACA says "one statement per statement" B.COBOLDECIMALADDTO(A) It should be straightforward to infer when a datatype is always just as pure integer and generate A+=B; as one expects.
      singulars
    2. COWhy bother translating the COBOL to Java, why not just use one of various COBOL compilers that target the JVM itself and use COBOL OO syntax to expose a much nicer interface to Java. This allows you modernise the COBOL with the safety of knowing it will work as expected.
      singulars
    3. COIf all you want to move is the COBOL verbs, this might work. As general rule, there are a large number of other application dependencis you have to simulate in the new world: interanction manaement (CICS), file access methods (ISAM? DB2? ...), screen I/O (3270? 24x80?), job management, ... that the "COBOL translator" won't handle. You can't "just recompile"; you must translate the idioms that represent legacy dependencies into something equivalent. This is generally nontrivial. See http://stackoverflow.com/questions/3455456/how-to-translate-between-programming-languages/3460977#3460977
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload