View previous topic :: View next topic |
Author |
Message |
dario.karlen
Joined: 13 Mar 2008 Posts: 4
|
Posted: Thu Mar 13, 2008 3:43 pm Post subject: Fortran examples |
|
|
Hi all
Does anybody have some fortran examples how to connect and maipulate data within mysql? I would really accreciate a helpfull introduction into this topic.
Thanks a lot
Dario |
|
Back to top |
|
 |
bisonmalembouche
Joined: 01 Jun 2005 Posts: 74
|
|
Back to top |
|
 |
rft
Joined: 20 Jun 2007 Posts: 43 Location: Massachusetts
|
Posted: Thu Dec 04, 2008 12:42 am Post subject: |
|
|
I will post a very simple FORTRAN API that we have developed. The heart is a small C wrapper for the MYSQL C API.
It will take me some time to package it and provide reasonable documentation. |
|
Back to top |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 623
|
Posted: Thu Dec 04, 2008 1:58 pm Post subject: |
|
|
Thanks, I'm sure that this will be helpful.
JF |
|
Back to top |
|
 |
icl
Joined: 26 Oct 2007 Posts: 29 Location: London, UK
|
Posted: Thu Jul 23, 2009 4:01 pm Post subject: |
|
|
rft have you made any progress on the FORTRAN API?
If you want I am happy to help out with it. |
|
Back to top |
|
 |
rft
Joined: 20 Jun 2007 Posts: 43 Location: Massachusetts
|
Posted: Wed Sep 02, 2009 4:58 pm Post subject: |
|
|
Unfortunately other projects have taken priority, the following link is to the documentation:
http://asthomas.com/mysql_dist/MySQL_AST.htm
A zip file containing a VMS backup is availabe at:
http://asthomas.com/mysql_dist
The critical source are the C jacket routines in FOR_MYSQL.C
The fortran routines for mimicking RMS ISAM file I/O are based on our internal programming conventions to allow for migrating from RMS to other database systems. (It would be nice to add RMS as an alternative to InnoDB in MySQL)
The Fortran sources and includes are in the .TLB
There are probably many more C headers than are necessary.
The interface is primitive, but works well for our needs at this time. |
|
Back to top |
|
 |
icl
Joined: 26 Oct 2007 Posts: 29 Location: London, UK
|
Posted: Wed Sep 02, 2009 11:11 pm Post subject: |
|
|
Thanks for that.
Unfortunately there is a problem with the download. I can unzip the BCK file but when I try to list this [BAC/LIS MYSQL_ISAM.BCK/SAV] - I get an error that it isn't a valid Backup file.
I tried this with a download both via Windows and direct onto a VMS server with the same results in both cases. I used the UNZIP within OpenVMS to unpack the BCK using: unzip "-V" mysql_isam.zip
It looks like your BCK got "windowfied" on a transfer into the windows domain (possibly prior to zipping). Is there an anonymous FTP location on an OpenVMS site that can be used? |
|
Back to top |
|
 |
rft
Joined: 20 Jun 2007 Posts: 43 Location: Massachusetts
|
Posted: Wed Sep 02, 2009 11:53 pm Post subject: |
|
|
The file was zipped using the ZIP utility that HP packages with OpenVMS.
Use the following command to properly set the file attributes:
set file mysql_isam.bck /attr=(rfm:fix,rat:none,lrl:32256) |
|
Back to top |
|
 |
icl
Joined: 26 Oct 2007 Posts: 29 Location: London, UK
|
Posted: Wed Sep 02, 2009 11:56 pm Post subject: |
|
|
that works a trick (Thanks for that tip - I can use that at other times)
 |
|
Back to top |
|
 |
rft
Joined: 20 Jun 2007 Posts: 43 Location: Massachusetts
|
Posted: Thu Sep 03, 2009 12:09 am Post subject: |
|
|
Upon linking there wqill be a number of undefined symbols. These are routines that are not accessed and the unresolved symbols can be ignored. |
|
Back to top |
|
 |
Emanuel Meireles
Joined: 11 Dec 2014 Posts: 1
|
Posted: Thu Dec 11, 2014 8:27 pm Post subject: |
|
|
Rtf,
I am going to start a new project to upgrade a VAX to Itanium and I was thinking to install MySQL. All the applications are in fortran, could I use the FORTRAN API that you wrote to fill the tables with the data that I want to ?
Thanks,
Emanuel |
|
Back to top |
|
 |
rft
Joined: 20 Jun 2007 Posts: 43 Location: Massachusetts
|
Posted: Tue Sep 29, 2015 5:59 pm Post subject: |
|
|
Sorry for the delay in responding. We are using the FORTRAN interface for production programs. We have created two levels of interface:
1) A simple level that is just jacket routines to basic C/C++ interface, i.e. establish a connection and then issue SQL commands.
2) A mechanism to mimic the DEC extensions for multi-key ISAM (INDEXED) files:
Open
key read
keyed sequential read
write
update
delete |
|
Back to top |
|
 |
|