Can anyone tell me how I can read data from a table of an MS-ACCESS database within a GnuCOBOL program?
Maybe even without using embedded SQL statements of the type EXEC SQL xxxx END-EXEC.
Instead, perhaps using just COBOL statements like "CALL xxxxx.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anyone tell me how I can read data from a table of an MS-ACCESS
database within a GnuCOBOL program?
Maybe even without using embedded SQL statements of the type EXEC SQL
xxxx END-EXEC.
Instead, perhaps using just COBOL statements like "CALL xxxxx.
If it was me, I would export the table as a comma limited file and read
that in Cobol as a LS file where record size is larger than the max record.
I do that in my software flightlog program to import a file of technical
log operations for many differing a/c's to save type lots of flights etc.
Yeah, there was once a full treatise written up on how to access Excel and Access data from OpenCOBOL, but I didn't snag the article out of the TikiWiki before Aoirthoir had to reset the hosting. Steve unlayered the docx zip and got at the inner XML. I think goes all the way back to 2015ish or before.
And yes, there should be more articles. Well, there are a few, but need to find them.
If this needs to be done quickly, I'd start with looking to see if sfk Swiss File Knife can't pull out the fields as filtered text and make for an easier ride. Setup a pipeline, wield it from GnuCOBOL.
Cheers,
Blue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Brian,
this would be very important and interesting.
When we post in this forum, we often hope to have the right information to avoid wasting time.
If someone already has indications (and above all working examples) and shares them on the web we can invest our time on other topics and make the whole GnuCOBOL project progress even more.
If there was any documentation for managing data in MS-Access it would be very sad if it was lost.
Similarly very useful would be to have documentation for accessing and managing data in MS-Excel and also in the corresponding spreadsheet and database formats for LibreOffice and OpenOffice.
I've done several web searches for GNUCOBOL and MS-ACCESS or EXCEL but find almost nothing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, there was once a full treatise written up on how to access Excel and Access data from OpenCOBOL, but I didn't snag the article out of the TikiWiki before Aoirthoir had to reset the hosting. Steve unlayered the docx zip and got at the inner XML. I think goes all the way back to 2015ish or before.
And yes, there should be more articles. Well, there are a few, but need to find them.
If this needs to be done quickly, I'd start with looking to see if sfk Swiss File Knife can't pull out the fields as filtered text and make for an easier ride. Setup a pipeline, wield it from GnuCOBOL.
One way is to save the excel sheet as an xml version. Start with a small one and then look thru the xml to see the structure.
Then read into cobol program and parse thru the file looking for the 'Cell' data.
CRUD it. Write it out new. Upload to pc, open as excel save as excel.
I seem to recall this is how they did it somewhere, even on the mainframe.
That is not directly updating the Excel document, but it is a hack that seemed to work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anyone tell me how I can read data from a table of an MS-ACCESS database within a GnuCOBOL program?
Maybe even without using embedded SQL statements of the type EXEC SQL xxxx END-EXEC.
Instead, perhaps using just COBOL statements like "CALL xxxxx.
On 13/10/2022 21:08, Eugenio Di Lorenzo wrote:
If it was me, I would export the table as a comma limited file and read
that in Cobol as a LS file where record size is larger than the max record.
I do that in my software flightlog program to import a file of technical
log operations for many differing a/c's to save type lots of flights etc.
Doodle.
There seems to be no guidance from anyone.
I think it's a topic that should be of good interest.
There are no experiences around ?
Yeah, there was once a full treatise written up on how to access Excel and Access data from OpenCOBOL, but I didn't snag the article out of the TikiWiki before Aoirthoir had to reset the hosting. Steve unlayered the docx zip and got at the inner XML. I think goes all the way back to 2015ish or before.
And yes, there should be more articles. Well, there are a few, but need to find them.
If this needs to be done quickly, I'd start with looking to see if
sfk
Swiss File Knife can't pull out the fields as filtered text and make for an easier ride. Setup a pipeline, wield it from GnuCOBOL.Cheers,
Blue
Hi Brian,
this would be very important and interesting.
When we post in this forum, we often hope to have the right information to avoid wasting time.
If someone already has indications (and above all working examples) and shares them on the web we can invest our time on other topics and make the whole GnuCOBOL project progress even more.
If there was any documentation for managing data in MS-Access it would be very sad if it was lost.
Similarly very useful would be to have documentation for accessing and managing data in MS-Excel and also in the corresponding spreadsheet and database formats for LibreOffice and OpenOffice.
I've done several web searches for GNUCOBOL and MS-ACCESS or EXCEL but find almost nothing.
Using ODBC you can CRUD tables on Access
Last edit: thomas 2023-03-11
This is not my area so I may be completely off base but isn't there
ODBC drivers that can be used with ACCESS?
On Sat, Mar 11, 2023 at 11:53 AM Brian Tiffin
btiffin@users.sourceforge.net wrote:
Hi,
I think, EXCEL (maybe ACCESS also) should work also with DDE:
https://en.wikipedia.org/wiki/Dynamic_Data_Exchange
Br.
László
One way is to save the excel sheet as an xml version. Start with a small one and then look thru the xml to see the structure.
Then read into cobol program and parse thru the file looking for the 'Cell' data.
CRUD it. Write it out new. Upload to pc, open as excel save as excel.
I seem to recall this is how they did it somewhere, even on the mainframe.
That is not directly updating the Excel document, but it is a hack that seemed to work.