Hello,
I'm failing at this:- gcc -I/usr/include/mysql -c cobmysqlapi.c
I don;t see the mysql file when I look in usr/include/ folders ?
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$ gcc -I/usr/include/mysql -c cobmysqlapi.c
gcc: error: cobmysqlapi.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$
I run mysql from terminal like this:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$ mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 39
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
The packages I see installed are (see attachment):-
I cannot see a package just called mysql?
Am I misisng a program or package I need from somewhere?
I found mysql folder here on my system:- /etc/mysql
So tried that in the gcc command:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc -I/etc/mysql -c cobmysqlapi.c
but it still cannot find the .h file?
cobmysqlapi.c:27:26: fatal error: mysql.h: No such file or directory
compilation terminated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Having installed the MySQL server did you also install the client
libraries and sources ?
See my early response to you some weeks? ago.
Vince
On 19/02/17 14:48, Rob Heath wrote:
I found mysql folder here on my system:- /etc/mysql
So tried that in the gcc command:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
gcc -I/etc/mysql -c cobmysqlapi.c
but it still cannot find the .h file?
cobmysqlapi.c:27:26: fatal error: mysql.h: No such file or directory
compilation terminated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have added as many packages as I can see with mysql in them.
Then I tried:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc -I/usr/include/mysql -c cobmysqlapi.c
This returned-
cobmysqlapi.c: In function ‘MySQL_fetch_record’:
cobmysqlapi.c:324:7: warning: format not a string literal and no format arguments [-Wformat-security]
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
I'm assuming a warning is not fatal so from here I tried c return
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ c
c: command not found
but in above I have:-
c cobmysqlapi.c cobol-dir.png dbpre.c PCTB003B PCTB003B.param~ PCTB003B.sh PGCTBBAT README.TXT
capi cobmysqlapi.o cPCTB003B dbpre-lower-folder.png PCTB003B.param PCTB003B.scb pctb3-pic.png PGCTBBATWS SQLCA
Can you nudge me a bit further please?
rgds
rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because typing c at command line didn;t do anything.
I ran the commands in the c file seperately and got:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc dbpre.c -odbpre -O5 -ggdb
dbpre.c: In function ‘main’:
dbpre.c:1729:14: warning: ' ' flag used with ‘%s’ gnu_printf format [-Wformat]
dbpre.c:1734:14: warning: ' ' flag used with ‘%s’ gnu_printf format [-Wformat]
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ sudo cp dbpre /usr/local/bin [sudo] password for rob:
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So I then followed:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ dbpre --help
dbpre V 0.3 2014-06-02
dbpre [options] progname
Options
-h, --help - this message
-v, --version - print version of dbpre
-I - specify path for copybooks, e.g -I/tmp/copybooks/
-ts - tab stop, tabs will be expanded to nnn spaces, e.g. -ts=3
Developed by the_piper@web.de
For more infos see here: http://pipersopencoboltoolbox.blogspot.de/
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
I will now go and try the sample program you have given.
Many many Thank yous for your patience so far.
rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The c file which is a command file but some what crude should work and it should be run at a command prompt in terminal or similar.
The user as with all work should be done as your normal user and NOT as root.
I seem to recall you are in the UK, if so email me at vbcoen at gmail dot com
and I will send you my landline #
Vince
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
BIG Thanks to Vince for kindly giving of his time.
I have managed to get it running (with Vince's help).
So finally I go to this directory:-
/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre
I then compile PVTB003B by running this script that I makred as executable
cPCTB003B
After running this I go into mysql and build this table in database testdb :-
mysql> describe example_table;
+--------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+----------+------+-----+---------+-------+
| field1 | char(20) | NO | | NULL | |
| field2 | char(16) | NO | | NULL | |
| field3 | char(32) | NO | | NULL | |
+--------+----------+------+-----+---------+-------+
3 rows in set (0.00 sec)
I then execute program PVTB003B from dbpre folder with this command:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ ./PCTB003B
It runs no error messages and outputs End....: 2017-02-19 23:25:28
Looking at the example_table after run in mysql I see:-
mysql> select * from example_table;
+---------------+--------+--------+
| field1 | field2 | field3 |
+---------------+--------+--------+
| UpdatedValue1 | Value2 | Value3 |
| 00000002 | Value2 | Value3 |
| UpdatedValue3 | Value2 | Value3 |
| 00000004 | Value2 | Value3 |
| 00000005 | Value2 | Value3 |
| 00000006 | Value2 | Value3 |
| 00000007 | Value2 | Value3 |
| 00000008 | Value2 | Value3 |
| 00000009 | Value2 | Value3 |
| 00000010 | Value2 | Value3 |
+---------------+--------+--------+
So I think big claps for everyone's kind help.
I can attempt to use sql from cobol under ubuntu now.
Thank you ;-)))))
Vince, I will try and think about the more modern version and PCTB4 param stuff later.
I think I need to read stuff about root as well.
Thank you for all your time.
Regards and many thanks
rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to use DBPRe on my windows system but have neither the skill nor knowledge of Linux/Unix to achieve the result. Has anyone compiled the DBPre program on windows and would be willing to guide me to achieving that result?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since i've been exchanging emails with Alan since a few days or weeks, i found somehow a solution.
First fun fact: cobmysqlapi.c does not compile under Windows with dev-cpp, because it uses syslog.h (and its functions) for debugging/error reporting issues.
So i have to do a few changes to cobmysqlapi.c, and that brings me to fact #2.
I don't know which or where is the actual version of cobmysqlapi.c?
The one i've been working with tonight is:
**
* Version 007--Changes to work together with GnuCobol either 1.xx and 2.xx
* 05/18/2014--The_Piper@web.de 20140518
**
the one, which is in my dbpre project.
Are there other versions of cobmysqlapi.c which ppl use?
And since i am going to update the dbpre project at Sourceforge, are there any workarounds ppl use with dbpre, which should be added to the project?
And if this all works, we will have a dbpre.exe for windows with a working cobmysqlapi :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, there isnt except except that i don't know what Arnold's package is
Arnold took the responsibility to create the official mingw-based binary packages (I did this up to GC1.1 and am still happy that he does this now).
You find the packages at https://arnoldtrembley.com/GnuCOBOL.htm#binaries for example https://arnoldtrembley.com/GC31-rc1-G-BDB-rename-7z-to-exe.7z - download, unpack wherever you like (if you don't have 7zip installed just rename to .exe for a self-extracting archive) and double click on set_env.cmd to start a new cmd-window with everything setup for common GnuCOBOL use,, including GCC.
BTW @piper1: the @ sf-mensch was correct, leading to a notification, the @ + Simon will notify the user named that way
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the JC code base I have version 38 which heads show the following :
/* cob-mysql Version 3.2 18/May/2014 *//* Copyright (C) sanpontze. All Rights Reserved *//* cobmysqlapi versions 3.6 - 3.7, copyright. The_Piper, GPL v3 *//* *//* cobmysqlapi Version 3.8 *//* Copyright (c) Vincent Coen, under GPL v3 2017 - 2018 *//* Use with library sources from mysql-connector-c via mysql.com and * other source locations *//***********************************************************************Version003--ChangedtocorrectlymaptoCOBOLdatatypes.*05/07/2009--MarcRodriguez*Version004--ChangedtocorrectlyplaceNULLsintonumerictypes.*1225978--SandyDoss*07/01/2009--MarcRodriguez*Version005--AddednewMySQLcalltofetchentirerowselected*using"select *".Alsofixedpotentialbugin*MySQL_fetch_rowthatcomparesnumberofpassed*parameters(inclusiveofWS-MYSQL-RESULT)against*numberoffieldsreturningfromMySQLselect.*1331073--JimCurrey*12/16/2009--PeteMcThompson**Version006--Changestoworktogetherwiththeprecompiler*Addedcommit()androllback()functions*Addedread_params()*04/18/2012--The_Piper@web.de**Version007--ChangestoworktogetherwithGnuCoboleither1.xxand2.xx*05/18/2014--The_Piper@web.de20140518**Version3.8--Changedversionstyleton.yy*Addedmysql_sqlstatetogettheANSI&ODBCstandarderrorcodes*Avaluethatbeginswith"00"means“noerror.”*Avalueof"HY000"means“generalerror.”*ThisvalueisusedforthoseMySQLerrorsthathavenotyet*beenassignedmore-specificSQLSTATEcodes.*Why?becausewritingadupkeydoesnotcreateanerrorwithin*SQL-ERRandforSQL_STATEitdoes(23000)therecouldbeother*examplesofsuch:*Afulllistofthesecodescanbefoundin:*/usr/include/mysql/sql_state.hassumingyouhaveinstalled*mysql-connector-c-6.1.6-src.tar.gz(.rpmor.zipetc)*Latestversionswillalwaysbeavailablehere:*03Jan2017--VincentCoen-ApplewoodComputers{170103}*[http://www.applewood.linkpc.net/files/ ]*thengotodirectory*MySQL-Pre-Compilers/JC-Versions/nightly/*Version3.8A--Updatedurlhereasaddresshassmallchange*[http://www.applewood.linkpc.net/files/ ]*v3.8iscorrected.
As you can see from above notes for v3.8 it adds extra functionality which I use within my CAS accounting system to give extra feedback for errors / warnings during execution etc.
This along with a script to build it as cobmysqlapi38.sh
Contains only - -
Thanks @vcoen, found your version, and if no one else has concerns or suggestions, i'm going to add my changes to it and upload it to my sf dbpre project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
LOL, and a hint about the naming conventions of my shell scripts :P
Usually my development environment has 3 shell scripts:
v c t
v - vi the scource code to edit it
c - compile the source code
t - test, run the binary
But since i've put all files in only one directory, its a little bit messy with only v c t.
So i named the compile scripts c<progname> like cPCTB003B and should have done it too with other scripts.</progname>
But since i am now working on dbpre again, i will change that and provide hopefully a better solution, like putting source code into directories and such.
Shit happens :P
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
LOL, and a hint about the naming conventions of my shell scripts :P
Usually my development environment has 3 shell scripts:
v c t
v - vi the scource code to edit it
c - compile the source code
t - test, run the binary
But since i've put all files in only one directory, its a little bit
messy with only v c t.
So i named the compile scripts c<progname> like cPCTB003B and should
have done it too with other scripts.</progname>
But since i am now working on dbpre again, i will change that and
provide hopefully a better solution, like putting source code into
directories and such.
Are you now supporting sources in FREE format ?
Vince
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm failing at this:- gcc -I/usr/include/mysql -c cobmysqlapi.c
I don;t see the mysql file when I look in usr/include/ folders ?
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$ gcc -I/usr/include/mysql -c cobmysqlapi.c
gcc: error: cobmysqlapi.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$
I run mysql from terminal like this:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0$ mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 39
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
The packages I see installed are (see attachment):-
I cannot see a package just called mysql?
Am I misisng a program or package I need from somewhere?
regards
rob
I found mysql folder here on my system:- /etc/mysql
So tried that in the gcc command:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc -I/etc/mysql -c cobmysqlapi.c
but it still cannot find the .h file?
cobmysqlapi.c:27:26: fatal error: mysql.h: No such file or directory
compilation terminated.
Having installed the MySQL server did you also install the client
libraries and sources ?
See my early response to you some weeks? ago.
Vince
On 19/02/17 14:48, Rob Heath wrote:
View and moderate all "Help getting started" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I have added as many packages as I can see with mysql in them.
Then I tried:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc -I/usr/include/mysql -c cobmysqlapi.c
This returned-
cobmysqlapi.c: In function ‘MySQL_fetch_record’:
cobmysqlapi.c:324:7: warning: format not a string literal and no format arguments [-Wformat-security]
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
I'm assuming a warning is not fatal so from here I tried c return
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ c
c: command not found
but in above I have:-
c cobmysqlapi.c cobol-dir.png dbpre.c PCTB003B PCTB003B.param~ PCTB003B.sh PGCTBBAT README.TXT
capi cobmysqlapi.o cPCTB003B dbpre-lower-folder.png PCTB003B.param PCTB003B.scb pctb3-pic.png PGCTBBATWS SQLCA
Can you nudge me a bit further please?
rgds
rob
Because typing c at command line didn;t do anything.
I ran the commands in the c file seperately and got:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ gcc dbpre.c -odbpre -O5 -ggdb
dbpre.c: In function ‘main’:
dbpre.c:1729:14: warning: ' ' flag used with ‘%s’ gnu_printf format [-Wformat]
dbpre.c:1734:14: warning: ' ' flag used with ‘%s’ gnu_printf format [-Wformat]
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ sudo cp dbpre /usr/local/bin
[sudo] password for rob:
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
So I then followed:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ dbpre --help
dbpre V 0.3 2014-06-02
dbpre [options] progname
Options
-h, --help - this message
-v, --version - print version of dbpre
-I - specify path for copybooks, e.g -I/tmp/copybooks/
-ts - tab stop, tabs will be expanded to nnn spaces, e.g. -ts=3
Developed by the_piper@web.de
For more infos see here: http://pipersopencoboltoolbox.blogspot.de/
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$
I will now go and try the sample program you have given.
Many many Thank yous for your patience so far.
rob
Last mail disappeared so trying again :
The c file which is a command file but some what crude should work and it should be run at a command prompt in terminal or similar.
The user as with all work should be done as your normal user and NOT as root.
I seem to recall you are in the UK, if so email me at vbcoen at gmail dot com
and I will send you my landline #
Vince
BIG Thanks to Vince for kindly giving of his time.
I have managed to get it running (with Vince's help).
So finally I go to this directory:-
/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre
I then compile PVTB003B by running this script that I makred as executable
cPCTB003B
After running this I go into mysql and build this table in database testdb :-
mysql> describe example_table;
+--------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+----------+------+-----+---------+-------+
| field1 | char(20) | NO | | NULL | |
| field2 | char(16) | NO | | NULL | |
| field3 | char(32) | NO | | NULL | |
+--------+----------+------+-----+---------+-------+
3 rows in set (0.00 sec)
I then execute program PVTB003B from dbpre folder with this command:-
rob@rob-desktop:~/Programs/COBOL/COBSQLSTUFF/open-cobol-code-1417-branches-gnu-cobol-2.0/gnu-cobol-2.0/dbpre$ ./PCTB003B
It runs no error messages and outputs End....: 2017-02-19 23:25:28
Looking at the example_table after run in mysql I see:-
mysql> select * from example_table;
+---------------+--------+--------+
| field1 | field2 | field3 |
+---------------+--------+--------+
| UpdatedValue1 | Value2 | Value3 |
| 00000002 | Value2 | Value3 |
| UpdatedValue3 | Value2 | Value3 |
| 00000004 | Value2 | Value3 |
| 00000005 | Value2 | Value3 |
| 00000006 | Value2 | Value3 |
| 00000007 | Value2 | Value3 |
| 00000008 | Value2 | Value3 |
| 00000009 | Value2 | Value3 |
| 00000010 | Value2 | Value3 |
+---------------+--------+--------+
So I think big claps for everyone's kind help.
I can attempt to use sql from cobol under ubuntu now.
Thank you ;-)))))
Vince, I will try and think about the more modern version and PCTB4 param stuff later.
I think I need to read stuff about root as well.
Thank you for all your time.
Regards and many thanks
rob
I'd like to use DBPRe on my windows system but have neither the skill nor knowledge of Linux/Unix to achieve the result. Has anyone compiled the DBPre program on windows and would be willing to guide me to achieving that result?
Dears.
what do i have to do to make dbpre work in a windows environment?
Celso henrique
Follow the detailed instructions (in README.TXT) and build it having downloaded the sources for dbpre19 and installed the mysqld connector package.
This assuming you have already installed Mysql or Mariadb.
Then run it.
As I said above, the problem for me is how to compile the C++ program DBPre on a windows system.
As I stated follow the instructions and run the scripts / batch files in
order.
So run :
capi - to compile the C api into an object file
c - script to compile dbpre using gcc
See README.TXT for more information and testing processes..
This assumes you have installed : -
gcc
MySql or mariadb
the above connector package which includes the headers etc.
GnuCobol
run capi and after that is run ok then run c
Yes he names his scripts very oddly.
The above assumes you have fully installed the windows version of
gnucobol say from Arnold.
On 28/06/2020 04:38, Alan Honeyman wrote:
BUMP
Since i've been exchanging emails with Alan since a few days or weeks, i found somehow a solution.
First fun fact: cobmysqlapi.c does not compile under Windows with dev-cpp, because it uses syslog.h (and its functions) for debugging/error reporting issues.
So i have to do a few changes to cobmysqlapi.c, and that brings me to fact #2.
I don't know which or where is the actual version of cobmysqlapi.c?
The one i've been working with tonight is:
**
* Version 007--Changes to work together with GnuCobol either 1.xx and 2.xx
* 05/18/2014--The_Piper@web.de 20140518
**
the one, which is in my dbpre project.
Are there other versions of cobmysqlapi.c which ppl use?
And since i am going to update the dbpre project at Sourceforge, are there any workarounds ppl use with dbpre, which should be added to the project?
And if this all works, we will have a dbpre.exe for windows with a working cobmysqlapi :)
Piper, great work and thank you!
Alan.
Last edit: Simon Sobisch 2020-08-20
Is there any reason to use dev-cpp instead of:
@Simon
No, there isnt except that i don't know what Arnold's package is. All i used to compile cobmysqlapi was gcc.exe.
Last edit: The_Piper 2020-08-20
Arnold took the responsibility to create the official mingw-based binary packages (I did this up to GC1.1 and am still happy that he does this now).
You find the packages at https://arnoldtrembley.com/GnuCOBOL.htm#binaries for example https://arnoldtrembley.com/GC31-rc1-G-BDB-rename-7z-to-exe.7z - download, unpack wherever you like (if you don't have 7zip installed just rename to .exe for a self-extracting archive) and double click on set_env.cmd to start a new cmd-window with everything setup for common GnuCOBOL use,, including GCC.
BTW @piper1: the @ sf-mensch was correct, leading to a notification, the @ + Simon will notify the user named that way
Regarding version of the API lib :
In the JC code base I have version 38 which heads show the following :
As you can see from above notes for v3.8 it adds extra functionality which I use within my CAS accounting system to give extra feedback for errors / warnings during execution etc.
This along with a script to build it as cobmysqlapi38.sh
Contains only - -
Thanks @vcoen, found your version, and if no one else has concerns or suggestions, i'm going to add my changes to it and upload it to my sf dbpre project.
When you have finished documented and tesed it please send me a copy so I can update versions here, pls use vbcoen <at> gmail.com</at>
Ta
@vcoen
Will do, it's already working with dbpre under Linux, with some minor changes/additions.
Most important change was, a function in your cobmysqlapi.c was gone, get_cobol_version() and some defines for it.
But nothing which should affect your changes.
Going to work on that Windows related stuff, replacement for syslog.h, tomorrow or so.
Oh, just an idea:
Would it make sense to have a single place where "the official" cobmysqlapi.c is stored, maybe in the repository under tools?
And @sf-mensch
maybe add dbpre too to the tools in the repository?
On 21/08/2020 02:00, The_Piper wrote:
Vince
LOL, and a hint about the naming conventions of my shell scripts :P
Usually my development environment has 3 shell scripts:
v c t
v - vi the scource code to edit it
c - compile the source code
t - test, run the binary
But since i've put all files in only one directory, its a little bit messy with only v c t.
So i named the compile scripts c<progname> like cPCTB003B and should have done it too with other scripts.</progname>
But since i am now working on dbpre again, i will change that and provide hopefully a better solution, like putting source code into directories and such.
Shit happens :P
On 21/08/2020 02:15, The_Piper wrote:
Are you now supporting sources in FREE format ?
Vince