<< Satyam auctioned - Tech Mahindra is new owner | Home | Green Shoots of recovery .... too early ? >>


Semantic translation - First requirement for generation of "Maintainable" Code

Step-by-Step Guide to Successful COBOL Modernization

The new system should represent the "intentions" of the original program. Need less to say that the "intentions" must also be written out in the syntax and coding-standards of the target language.


Lets take a simple example from a COBOL / CICS program:



A literal translation would at best produce

    If (eibcalen == 0) { …

In IBM/CICS, this condition actually a way of determining whether this was the first time the program/task was being executed. (At this stage, The readers with IBM/CICS experience would have a smile on their face, and those without would have an expression of horror !!)

So, we have to take the "sematics" of the operation into account in order to produced something more meaningful, such as:

      If (this.isFirstTimeExecution() )

(Now I can hear the java people: the method isFirstTimeExecution isn’t included as standard in Java. Yes, we had to write our own framework to support this, and we supply the run time free of charge).


In my next blog, I will be covering the use of Object-Orientation.

Watch this space.

Add a comment Send a TrackBack