[kde-linux] 20090622KL -- Kobol & MySQL

Bruce MacArthur bmacasuru at fastmail.us
Tue Jun 23 17:36:15 UTC 2009


On Tuesday 23 June 2009 10:21, John Culleton wrote:
> On Monday 22 June 2009 08:12:25 pm Bruce MacArthur wrote:
> > Greetings --
> >
> > Does anyone know of a way to work with existing MySQL databases
> > from within KOBOL (or COBOL) programs?  Does REKALL simplify this
> > -- or just change the complexities?  What else might be helpful
> > -- either to have or to know?  Thanks for any assistance
> > possible!!!
>
> Not familiar with KOBOL or REKALL. In general COBOL has its own file
> system including an indexed file system with the possibility of
> multiple keys per record, a primary which must be unique and
> alternate keys that need not be unique.  I suggest downloading your
> data from MySql  in the form of a report  and then reading the
> lines of that report into a COBOL program that will create a
> suitable indexed sequential file.
>
> Suggest Open Cobol instead of a commercial version.  Also, use the
> mailing list
> "open-cobol-list" <open-cobol-list at lists.sourceforge.net>
> instead of this one for COBOL questions.

Hello, John --
KOBOL and REKALL are commercial products from "The Kompany".  KOBOL 
includes an IDE and the compiler produces native code directly -- 
rather than "translating" to C and then compiling.  It is suitable for 
both Windows and Linux; I'm not sure about Mac.  You take one single 
source-code deck and simply compile it on the respective system.

I am "leary" of the translate-and-compile approach, partly because I 
have never seen the evidence that implicit redefinitions work in C.  
For instance, consider the following Data Division code --

01  DATE-SALE                    PIC X(10).
01  DATE-SALE-RDEF          REDEFINES DATE-SALE.
      05  DATE-SALE-Y           PIC 9(04).
      05  FILLER                     PIC X(01).
      05  DATE-SALE-M          PIC 9(02).
      05  FILLER                     PIC X(01).
      05  DATE-SALE-D          PIC 9(02).

If C cannot do this "natively", then how can it be made to handle the 
task in any kind of "translation"?  (Of course, if it CAN do this, and 
I am just that ignorant of C, then there is NO problem at all!)

I certainly do understand the COBOL and ISAM notion.  Keys are no 
problem to me.  But what if I want to define a MySQL database and then 
load it from other data, using a COBOL / KOBOL program?  This is why 
professional COBOL allows a program to make simultaneous use of both 
genuine databases AND "native" files.

THANK YOU for pointing me to OpenCOBOL -- I had not been aware of it 
previously.  I have examined some of their web-site.  I was slightly 
frustrated because there was no visible PLUS workable (!) User Manual.  
I found quite a few bits and pieces about compiler options and the 
like -- which can be VERY good to know! -- but no manual as-such.

In spite of these "issues", OpenCOBOL may well be my best option.  I 
will continue my investigations.  THANKS AGAIN.

By the way, thank you, also, for pointing me to that specific list.  I 
agree that it will be much more appropriate.  I mailed this list 
because of its general character and the fact that I will be using 
COBOL within KDE-Linux.  I suspect that the mailing-list you cited is 
pretty-much limited specifically to the OpenCOBOL product, and is NOT 
aimed at COBOL in general.  Therefore, I am guessing that my general 
inquiry would not "really" belong there either!  Am I wrong again?


-- 
布鲁&#26031  麦克阿&#29791
Bruce   Mac Arthur
15875 Switzer
Overland Park, KS 66221
     913-897-4157
     bmacasuru at fastmail.us



More information about the kde-linux mailing list