|
From: <he...@ne...> - 2005-07-11 10:10:37
|
Hi Nikil, I compiled DB2 cobol programs with TC under windows, only. So I can't tell you, if it's working under Linux, too. You have to try for your own... :-) Maybe it's some kind easier, because you needn't deal with the Microsoft Vi= sual C library problems. The free application development client packages for DB2 on all supported p= lattforms can be downloaded at: http://www-306.ibm.com/software/data/db2/udb/support/downloadv8.html I used the Microfocus cobol examples in subdirectory SQLLIB\samples\cobol_mf. For a sample precompile procedure see=20 embprep.bat in the same directory. Good luck. Best regards Stefan ----- Original Nachricht ---- Von: nikil chakravarthy <nik...@ya...> An: Stefan Heublein <he...@ne...> Datum: 11.07.2005 07:18 Betreff: Re: [Tiny-cobol-users] Can i call DB2 database from tinyCOBOL > Hi Stefan Heublein, >=20 > Once again thanks for information. I am trying to use > redhat 8.0 along with DB2 7.2 installed on windows > machine. With respect to my configuration can you tell > me how i can proceed with compiling and running cobol > programs which are accessing DB2 data. > Can u tell me where can i download DB2 IBM application > development client package and Sample IBM COBOL > programs. Looking forward for response. >=20 > Thanks & Regards, > Nikil >=20 > --- Stefan Heublein <he...@ne...> wrote: >=20 > > Hi, > >=20 > > it's possible to compile and run the IBM supplied > > DB2 COBOL samples using TC > > on Windows. > >=20 > > First of all, you must compile the COBOL source > > which contains embedded SQL > > with the DB2 precompiler supplied by IBM (included > > in the free application > > development client package). The precompiler is > > capable of generating > > Microfocus COBOL compatible code. This leads to > > plain COBOL source (without > > embedded SQL), which has to be modified for > > compiling with TC: > >=20 > > - TC doesn't support literals as program identifiers > > - TC requires the STDCALL keyword for DB2 api calls > > (Microfocus COBOL: > > SPECIAL-NAMES. CALL-CONVENTION 74 IS DB2API. CALL > > DB2API "<api function>") > > - I ran into problems with the precompiler generated > > "by content" parameter > > passing to the DB2 api. Converting "by content" to > > "by reference" solved the > > problem. Later I found another solution for this > > problem. When aligning and > > enlarging the passed structure to word boundary (4 > > bytes), the "by content" > > parameter passing can remain unchanged... > >=20 > > Last, but not least, you have to link the TC > > compiled module to the DB2 api > > libs. These libs are intended for use with > > Microsoft's Visual C and have to > > be converted to Mingw usable libs before (see Mingw > > faqs). > >=20 > > Good luck! > >=20 > > I succeeded to compile and run a COBOL program > > containing embedded (static) > > SQL and accessing DB2 for z/OS (using DB2 Connect). > >=20 > > Best regards > > Stefan > > -----Urspr=FCngliche Nachricht----- > > Von: tin...@li... > > > [mailto:tin...@li...]Im > > Auftrag von > > --__--__-- > >=20 > > Message: 1 > > Date: Tue, 5 Jul 2005 21:59:35 -0700 (PDT) > > From: nikil chakravarthy <nik...@ya...> > > To: tiny-cobol-users > > <tin...@li...> > > Subject: [Tiny-cobol-users] Can i call DB2 database > > from tinyCOBOL > >=20 > > Hi All, > >=20 > > I am newbie for tinyCOBOL development. I am > > struggling > > with finding information about tinyCOBOL with DB2 > > database access. Can somebody let me know whether it > > is possible to connect to DB2 from tinyCOBOL and > > send > > me some URL's and resources. Your help is very much > > appreciated. Looking forward for positive response. > >=20 > > Thanks & Regards, > > Nikil > >=20 > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > >=20 > >=20 > > --__--__-- > >=20 > > Message: 2 > > Date: Wed, 06 Jul 2005 02:35:56 -0400 > > From: David Essex <de...@us...> > > Reply-To: tiny-cobol-users > > <tin...@li...> > > To: tiny-cobol-users > > <tin...@li...> > > Subject: Re: [Tiny-cobol-users] Can i call DB2 > > database from tinyCOBOL > >=20 > > nikil chakravarthy wrote: > >=20 > > > I am newbie for tinyCOBOL development. I am > > struggling > > > with finding information about tinyCOBOL with DB2 > > > database access. Can somebody let me know whether > > it > > > is possible to connect to DB2 from tinyCOBOL and > > send > > > me some URL's and resources. Your help is very > > much > > > appreciated. Looking forward for positive > > response. > >=20 > > TC does not have an SQL pre-processor, thus you can > > only access any SQL > > database using the native API, and not using > > embedded SQL. > >=20 > > If DB2 includes an SQL pre-processor for COBOL, and > > I think it does, the > > following may (or may not) work. > > Pass the embedded SQL COBOL program thru the DB2 SQL > > pre-processor for > > COBOL. And then using TC, compile it's output adding > > the appropriate DB2 > > library(s) in the link step. Machen Sie aus 14 Cent spielend bis zu 100 Euro! Die neue Gaming-Area von Arcor - =FCber 50 Onlinespiele im Angebot. http://www.arcor.de/rd/emf-gaming-1 |