We have a client that runs a legacy Cobol system from a central server to 200+ branches in the UK. It's a system that works and needs little or no maintenance and if it does need some TLC then we have a tame Cobol programmer to do the work. Recently, however, our client asked us to integrate a third party seller SDK into this system. This meant monitoring and responding to XML messages with information from the Cobol system. Oh deep joy! So, how were we to do this? There's a product called Relativity from Liant that enables Cobol flat files to be viewed as if they were tables in a RDBMS system. Once this is done you can access them via ODBC. Now both the server the system runs on and the system that has to access the files are SPARC servers, so you load the Relativity Server on the server and Relativity client on the client machine (no kidding eh!). Once everything is set up you simply have to write a bit of C code to access the files via ODBC. Compile the code via gcc, or similar, not forgetting that you have to use the include files supplied by Liant and also their library, so the compile line will look something like gcc -I /usr/local/liant/include filename.c /usr/local/liant/lib/libodbc.so and you are good to go. An example C file can be found here.
(Technorati tags: , , )