From: Pete Dashwood on
In response to a client request, PRIMA has developed an additional tool for
the Migration Toolset which may be of interest to people using COBOL in
general.

Here's an example scenario:

You have a package solution which uses a relational database and you would
like to be able to use the information in this DB for other applications,
and your core processing, which are all using COBOL.

You need to analyse the package's RDB tables, DECLGEN the HostVariables so
you can connect COBOL to the RDB and you will end up with embedded COBOL
code in various new and existing applications. If you are considering
migration now or in the future the last thing you need is more embedded
COBOL scattered through your applications, but in the meantime, COBOL is
being used.

The Toolset will automatically analyse the tables and relationships in the
RDB, and generate appropriate Data Access Layer objects (in OO COBOL, which
can be called from your existing COBOL by means of a Component Object Model
wrapper (also automatically generated)). These objects provide all of the
facilities you are used to when accessing indexed files: sequential, random,
and skip sequential access, plus the usual add, change, and delete
facilities. It is simple and intuitive and the generated code is debugged
and working. (As it is in COBOL and you have the source code, there is
nothing to stop you modifying it if you wanted to, but so far, this has
never been necessary.) The DAL objects can be called remotely across a
network, or from web pages, or from a Windows desktop, so you can have your
external package providing data wherever it is needed.

The most important point though, is that the use of these objects separates
your Business Logic from data access and and gives you a data access layer.
Although you would be currently accessing this layer from COBOL, in the
future these same objects can be accessed from ANY language that supports
the Component Object Model (COM).

For details of the facilities available and how you would activate them from
COBOL, please see the DAL Programming handbook:

(Because there are spaces in it, the following link will probably not work
from this newsgroup post. Cut it and drop it into your Browser address bar.)

http://primacomputing.co.nz/COBOL21/ShowMe.aspx?ptitle=DAL Programmer's
Guide&pcontent=documents/DAL Manual.pdf

From Page 14 of the document there is a summary of the services available...
they are all the things you would expect, and are oriented towards record
style processing of COBOL data structures, but using a Relational Database
as the repository. The DAL objects automatically construct and deconstruct
data fields on the database into records for presentation to your COBOL
applications, and also take care of all type conversion (including dates...)
between application program data types and RDB data types.

Typically, the Toolset will generate DAL Objects from metadata captured when
you generated your database tables, using your existing COBOL COPY books
(the FD/01 level book and the SELECT... ASSIGN... book). The new facility
reverses this process and generates the COPY Books from the existing
Relational Database. Once these are available, DAL generation proceeds as
usual.

Currently, the new facility is integrated into the PRIMA Toolset, but if
there is a level of interest in using this facility, I'll decouple it and
provide it as a separate tool. As there is a fair bit of work in doing this,
I'm interested in assessing whether there is a market for it before I start.
(I intend to keep the price absolutely minimal (I'm thinking not more than
$150...) so it won't happen unless there are a few takers...)

Please contact me by private mail to get an idea of when this would be
available and how much it will cost. If you urgently need a facility like
this, PRIMA can generate the DAL objects for you and return them
immediately, if you can provide a copy of the database you want access to,
or allow us VPN access to your site.

Given that a DAL object source is typically around 2000 lines of COBOL, and
it is fully debugged and working, the $20 we would charge you to provide it,
is a reasonable price. How much programmer time can you buy for $20?
Obviously, you can buy the tool for $150 (or will be able to soon, if there
is enough interest), so you can do the math :-)

Any comments or questions, please post here; anyone seriously interested,
private mail.

Please note: People who have already registered to the PRIMA or cobol21 web
sites will get a "cherry on top" and priority. :-)

Pete.
--
"I used to write COBOL...now I can do anything."