OpenCOBOL Forum Index OpenCOBOL
DB2 Express-C using Windows 7 | Register To Post |
| Threaded | Oldest First | Previous Topic | Next Topic | Bottom |
| Poster | Thread |
|---|---|
| btiffin | Posted on: 2012/3/2 10:11 |
Home away from home ![]() ![]() Joined: 2008/6/7 From: CANADA Posts: 1196 |
Re: DB2 Express-C using Windows 7 off topic
The one-click easy install forum.peoplecards.ca seems to be suffering the same symptoms that plagued opencobol.org for a while (and why new registrations are still blocked). I'm on an entry level shared server on Dreamhost. Something on the shared server (my guess being, accumulated spam) is tripping the SQL engine watchdog / eating all performance. So, the last two entries are not cross posted. I'm going to look into it / pester Dreamhost / redo on a server I know has cyles. forum.peoplecards.ca has less than 1000 db entries so, I'm guessing, it's another site on the box causing the grief. Or, it's time to officially move the forum part of opencobol.org while the new site is developed. It's in the works, but finding and synchronizing time with the principals is proving difficult. Might just assume go, and go. Brian |
| human | Posted on: 2012/2/29 11:16 |
Home away from home ![]() ![]() Joined: 2007/5/15 From: GERMANY Posts: 1416 |
Re: DB2 Express-C using Windows 7 Franklin is right for both problems, but I guess the solution for 2. won't work as the lib won't be found/used as it is an MSC library (try this at least, maybe I'm wrong).
If it doesn't work you have three choices: 1. run cygwin setup and try to find DB2 express packages there, if available, install them 2. get sources for compiling the library within Cygwin via ./configure + make + make install (this is the manual way of 1., but I'm not positive this will be possible as I did not found a source tarball at DB2 Express download page) 3. Don't use Cygwin for OpenCOBOL but a MSC-package (if you don't knwo how to compile OC with MSC on your own, use a package of http://www.kiska.net/opencobol/1.1/ (I highly suggest NOT to use the binaries from newer snapshots but these from 2009). human |
| Franklin | Posted on: 2012/2/29 9:03 |
Not too shy to talk ![]() ![]() Joined: 2006/6/22 From: Hamburg, Germany Posts: 35 |
Re: DB2 Express-C using Windows 7 Hi,
i havn't tried using Cygwin and DB2 but it looks like 2 problems to me. 1. The -I C:\PROGRA~2\IBM\SQLLIB\lib seems to be interpreted without the backslashes. Try using normal slashes "C:/PROGRA~2/IBM/SQLLIB/lib" or user double backslashes "C:\\PROGRA~2\\IBM\\SQLLIB\\lib" 2. You will need to include the db2api.lib in some way, try using "-l db2api". I hope this will help you. Regards, Franklin |
| btiffin | Posted on: 2012/2/29 6:52 |
Home away from home ![]() ![]() Joined: 2008/6/7 From: CANADA Posts: 1196 |
Re: DB2 Express-C using Windows 7 Hello Human,
Thanks for the welcome. I have Visual Studio 2010 Express installed but not using it. I'm not a C/C++ person so can you give me a pointer on how to compile the Cygwin libraries please? My biggest problem is that I'm a mainframe dinosaur, hence the desire to use COBOL! Due to work it will probably be next weekend before I get to sort out this. iain cross posted by btiffin for iainw from forum.peoplecards.ca |
| human | Posted on: 2012/2/5 21:04 |
Home away from home ![]() ![]() Joined: 2007/5/15 From: GERMANY Posts: 1416 |
Re: DB2 Express-C using Windows 7 Hi and Welcome at opencobol.org (via peoplecards).
I think the problem roots in different compiling tools. Either use the DB-Express Win binaries (with Microsoft Visual C [Express]) or compile the libraries from unix sources within Cygwin. human |
| btiffin | Posted on: 2012/2/4 17:37 |
Home away from home ![]() ![]() Joined: 2008/6/7 From: CANADA Posts: 1196 |
DB2 Express-C using Windows 7 from iainw on forum.peoplecards.ca, with one edit to put in code blocks
Hello, I'm having problem with a program compiling an OpenCOBOL 1.1 program which uses DB2 Express-C in a Windows 7 environment. Following the advice on the forum I have updated libcob.h, adding: #ifdef DB2SQL #include <sqlaprep.h> #endif Have the following system variables: COB_LIBRARY_PATH = C:\OC\pgms COBCPY = C:\OC\pgms INCLUDE = C:\PROGRA~2\IBM\SQLLIB\INCLUDE;C:\PROGRA~2\IBM\SQLLIB\LIB LIB = ;C:\PROGRA~2\IBM\SQLLIB\LIB LINK = C:\Cobol\lib\db2api.lib PATH is set up to included all required OC and DB2 programs etc. Using the DB2 Express-C line command processor (DOS window), connected to the sample database and precomiled the program: (1) connect to sample (2) prep C:\OC\pgms\db2test2.sqb bindfile using C:\OC\pgms\db2test2.bnd target ANSI_COBOL In Cgywin tried to compile the program, commans used = cobc -v -x -I C:\PROGRA~2\IBM\SQLLIB\lib -fixed -fstatic -D DB2SQL db2test2.cbl Get the following: Can anyone suggest what I need to do to get a clean compile please? Regards, iain |
| Threaded | Oldest First | Previous Topic | Next Topic | Top |
| Register To Post | |







