Hi,
The company I’m working for at present has everything written in
acuCOBOL with flat indexed files. They’re trying to migrate to Oracle
but that’s a long way off. Is there any way to access these data files
from Ruby or would anyone have the expertise to create such an
interface? I wouldn’t know where to start but there’s so much more I
could do for them if Ruby had access to that mine of information!
Cheers,
Pete
Hi,
Unfortunately that won’t work 
Whilst we can extract the data and import it into say Oracle or
Postgres,
the problem is that the live system uses the cobol files. The acuCOBOL
SQL
interface is far too slow to switch to Oracle directly and so Oracle is
only used for data mining.
One of the programs I want to write is a kiosk type application for use
in
the stores where customers can take stock, see what’s available and what
sizes etc and see if they can either get it in this store or another.
Unfortunately the Oracle data is a day old and thus won’t be accurate
enough for the task - which was why I was asking about accessing the
cobol
files directly…
Cheers,
Pete
On Thu, Jun 15, 2006 at 05:33:36PM +0900, Pete Palmer wrote:
Pete
–
Posted via http://www.ruby-forum.com/.
Hi Pete,
I’ve written similar things for Microfocus COBOL, using calls to C API
to small COBOL program to acess ISAM data, but what’s much easier
is to just write small COBOL program that reads and writes from socket
or pipe to talk to external programs, Then you just basically send
and receive all data as strings.
Ralph “PJPizza” Siegler
Peter P. wrote:
Hi,
Unfortunately that won’t work 
Whilst we can extract the data and import it into say Oracle or Postgres,
the problem is that the live system uses the cobol files. The acuCOBOL SQL
interface is far too slow to switch to Oracle directly and so Oracle is
only used for data mining.
Do you have a data format specification? In my limited experience, COBOL
data files tend to be a simple fixed-length record format, which should
make it easy to extract data using scan(/.{length}/) and pack/unpack.
Cheers,
Dave