gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] X86_64 branch


From: David Black
Subject: Re: [open-cobol-list] X86_64 branch
Date: Mon, 24 Feb 2014 15:10:48 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Patrick,

The work performed developing OpenCOBOL is a masterpiece of development. It has taken many man years of very dedicated people to create it. Keisuke, Roger, Brian and many others have spent years of their available time making it happen.

They are the first ones to do it successfully without the funding and support of a hardware or software company behind them. They had the vision many years ago and now it is real and usable. I know that they have more things that they want to add on and they, and the community will make it happen.

Based on my experience with COBOL over the years, and knowing most of the original COBOL compilers author personally, the one thing they had in common was that they lived, breathed, and thought in the computer language they were writing the compiler in for many years. The compilers written in assembler, or some language unique to the hardware using hardware features. They had to support the COBOL standards and portability of the compiler was not even a consideration. The compiler on the IBM 7070 was completely different than the one for the IBM360 and also both were different that the one for the IBM series 1. IBM had a different compiler for each hardware platform. That is a lot of different compilers to write and support.

Unix and Linux are standard in almost all the features that are used in COBOL so a program in C would run in almost all cases with out a problem. Cygwin is used to solve the problem of running the C code on Windows. Other cases where authors of COBOL that wanted to support Oracle, a pre-processor (pro*COBOL) is used which converts the SQL statements to blocks of COBOL code. That output from the pre-processor is compiled with the normal COBOL compiler.

There are only two philosophies to building a compiler. The first it is tailored to the uniqueness of the hardware it is being written for. Or second is written in some form of "P" code that is interpreted/translated at run time with a run time program. That program is tailored to a particular brand of hardware and supports I/O and other unique features on that hardware. In Java you have a runtime program, for each brand of hardware, that executes the Java code. That is the method that AcuCOBOL used and a number of other software houses used. IBM, UNISYS, HP and others wrote their compilers using an army of people and implementing feature above the standards of COBOL.

My 5 cents worth is, that if want your COBOL code to run on another brand of hardware or operating system, that you write a pre-compiler that will generate new COBOL code by write replacement code that can be compiled by OpenCOBOL into C that will run on your target machine. Then you do not need to become an expert in C and need to only know, in-depth, the feature that you want to implement on the target machine. Writing a pre-processor is far easier that forking OpenCobol, mastering C and understating the source of OpenCOBOL.

Best of luck on what ever route you take for solving your portable problem.

David Black


On 2/24/2014 1:28 PM, address@hidden wrote:
Re: X86_64 branch



reply via email to

[Prev in Thread] Current Thread [Next in Thread]