

|
 |
| Programming > Cobol > Re: Thoughts on... |
|
| << Topic |
< Post |
Post 2 of 20 Topic 4100 of 4195
|
Post > |
Topic >> |
Re: Thoughts on MF COBOL, Unix, and RDBMS
by Richard <riplin@[EMAIL PROTECTED]
>
May 2, 2008 at 06:53 PM
| On May 3, 12:51=A0pm, "Pete Dashwood"
<dashw...@[EMAIL PROTECTED]
> wrote:
> I have some programs written in Fujitsu COBOL (generated by a tool) that
r=
un
> in a Windows environment, read ISAM and write a RDB using embedded SQL
and=
> ODBC.
>
> I would like to have these programs run in a Unix environment. There is
a
> COBOL compiler (MicroFocus) available but it doesn't sup****t SQL, and
the
> ISAM is C-ISAM. :-)
Is that a really old compiler ?
> The fundamental problem is one we see here quite often; The ISAM files
wer=
e
> created by COBOL, are "COBOL oriented" (may contain packed and binary
> fields) and this means that accessing them with a language other than
COBO=
L,
> while not impossible, is fraught with danger and problems. So, it makes
> sense to read them with COBOL. (Especially as there is a COBOL compiler
fo=
r
> the platform available.) COBOL definitions of the files are available.
>
> Having got the data, the COBOL program would normally move the fields to
> equivalent host variables and write them to the database, but it can't
do
> that because the MF COBOL on the platform doesn't sup****t embedded SQL
in
> COBOL.
>
> So maybe the generated code should simply write the data out as strings
th=
at
> can be INSERTED with a script, as another step in the process.
>
> Maybe it should generate a .CSV or maybe an XML file (either of which
can =
be
> easily im****ted into most RDBs)
>
> Or maybe this is not a good approach at all...
>
> Given my unfamilairity with Unix environments I may have missed
something
> that is normal in that environment.
There is UnixODBC that will work with PostgreSQL and MySQL and others.
You can run your program on a Windows machine and put the data into
the Unix Database (given ODBC for that).
A CSV file is a good option, it would also allow a manual tidy up of
the data before it is read into the DB.
Or write the INSERT commands. Actually with templated output from the
program it need not know nor care whether it is outputting CSV or
INSERTs or XML, it will just read a text template and populate the
tags with data.


|
20 Posts in Topic:
|
"Pete Dashwood" |
2008-05-03 12:51:38 |
|
Richard <riplin@[EMAIL |
2008-05-02 18:53:39 |
|
"Pete Dashwood" |
2008-05-03 15:41:54 |
|
Richard <riplin@[EMAIL |
2008-05-03 01:16:10 |
|
Robert <no@[EMAIL PROT |
2008-05-03 01:05:28 |
|
"Pete Dashwood" |
2008-05-03 19:31:47 |
|
Robert <no@[EMAIL PROT |
2008-05-03 19:59:52 |
|
"Pete Dashwood" |
2008-05-05 10:40:34 |
|
"William M. Klein&qu |
2008-05-05 03:22:35 |
|
"Pete Dashwood" |
2008-05-05 17:40:19 |
|
"James J. Gavan" |
2008-05-05 16:20:22 |
|
Frederico Fonseca <rea |
2008-05-04 11:01:51 |
|
Robert <no@[EMAIL PROT |
2008-05-04 14:01:25 |
|
Frederico Fonseca <rea |
2008-05-04 22:33:18 |
|
Rene_Surop <infodynami |
2008-05-04 03:51:48 |
|
"Pete Dashwood" |
2008-05-05 10:48:42 |
|
"James J. Gavan" |
2008-05-04 23:03:51 |
|
Richard <riplin@[EMAIL |
2008-05-04 18:18:51 |
|
"Pete Dashwood" |
2008-05-05 14:42:18 |
|
"Pete Dashwood" |
2008-05-05 14:28:51 |
|
Post A Reply:

|
|
|
|