Cobol to Natural Conversion

Hi all,

    Can anyone please inform about any reliable tool that converts existing Cobol programs to Natural programs. If you were across something, please share your experieces also. 

Thanks,
Nagaraju.

Software AG UK offers various conversion services, one of which which is COBOL -> Natural, see: http://www.softwareag.com/UK/service/conv/default.asp

A long time ago I coined the term “Natbol” to describe Natural programs written by Cobol programmers who were not given any Natural training. Instead they were usually given a Natural manual (sometimes not even that) and told to “go forth and write Natural code”.

Software conversion will yield the same result. Natural is NOT cobol. There are efficiency differences (ubiquitous FOR loops from cobol are often better done with EXAMINE or SCAN in Natural), there are style differences, screen interface logic is different, the list goes on and on.

If the company absolutely refuses to do things the right way, writing Natural code from scratch, the next best thing would be to use a software conversion tool (e.g. from Software AG UK) and then have a Natural programmer replace the worst of the conversion code with good code.

steve

Can you please let me know the equivalent statement in Natural for a COBOL GOTO statement

Ima getting the below error. Cannot I put a loop statement within a DO….DOEND ??? what is the solution

NAT0611: Loop/condition not properly closed.
Text Loop/condition not properly closed.
Expl. An active loop or condition was not properly closed.
For example, in structured mode, a FIND statement was
issued without a corresponding END-FIND statement.
Actn. Check program and correct error

Sorry, no answer possible without seeing the actual code,
there seems to be a problem with nesting of loops.

As Wolfgang indicated, the actual code is necessary to directly address the problem.

That said, from your description, I assume you have something like:

READ…
::::
IF something
DO
::::
LOOP
DOEND

This is quite illegal.

DO…DOEND in Report Mode is the mechanism to “group” a series of physical statements into one logical statement.
In Structured Mode this is done with, for example: IF…END-IF

A logical statement, whether in report or structured mode, cannot contain the closure for a loop (READ, FIND, FOR, etc.

Note above that in the illegal code I used, if the IF statement were not true, the loop would not have an ending.

The likely code you would want to write (impossible to know without seeing the actual code) would be something like:

READ…
::::
IF something
DO
::::
DOEND
LOOP

steve

"Can you please let me know the equivalent statement in Natural for a COBOL GOTO statement "…

Well, as we all know for some good reason :slight_smile: there`s no “GOTO” statement in Natural.
However, one may achieve something similar to GOTO with PERFORM (although control would go back to the statement which follows the PERFORM in “normal situation”).
Bottom line: those 2 languages are different, and your source code would be very helpful to suggest anything.

Best regards,
NK