473,786 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 PREP ... PACKAGE USING ... without implicit binding


Hi,

I've a problem:

I compile modules of embedded SQL (for a dynamic lib) on multiple
platforms (AIX,Linux,Wind ows). They are compiled from the same
source code. To be able to provide all platforms at the same time
on ONE database (server), I want different package names -
e.g. module1.sqc should produce packages AMOD1, LMOD1, and WMOD1.
So I tried the following db2 call for preparing:
DB2 PREP module1.sqc BINDFILE USING amod1.bnd PACKAGE USING amod1 [...]

It does all I want AND a little bit more: On DB2 V7 it binds the
newly created package implicitly! And that is a nightmare, because
I sometimes just compile the module, to be sure, that it is still
compilable on all platforms, after a changed a bit on one platform.

It there any way to name the package as I want/need, without binding it
in the same step???

Thanks for your help,
J. Luebbers

--
Jochen Lübbers lu******@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
"Who desire to give up freedom in order to gain security
will loose both in the end." (Benjamin Franklin)
Nov 12 '05
17 7063
Jochen Luebbers wrote:
Knut Stolze <st****@de.ibm. com> wrote:
First, what's the problem with the implicit binding?

I want to be able to create (by now) up to three packages for the three
different platforms (AIX, Linux, and Windows) with the same database.
These packages should be usable at the same time with this database.
They are created from the same (or nearly the same) source code, but
in every case, they are created from the same source file.
I want to avoid a mechanism, that renames the source file just
before precompiling it. But at the same time I want to have unique
packages (to satisfy the above points).

So I tried a the command:
DB2 PREP module1.sqc BINDFILE USING amod1.bnd PACKAGE USING amod1

So far it did everything I wanted.
This module is part of a dynamic link library. I installed the lib, and
the programs used it - fine.

I went further in development and recompiled the module again -
and got failures from the users of the lib - because by DB2 PREP ... had
implicitly done the binding, thereby cutting of the lib with a -818
message.
Of course, it was my fault, not to read the docu carefully enough, that
I would have known about this.

I am told by the DBA, that the two database servers I develop for
are not DRDA servers (one on AIX, one on Linux). So the LEVEL option,
you pointed to, could not be used.


Two questions here:

(1) What has the LEVEL option to do with DRDA? The manual doesn't give any
such restriction:
http://publib.boulder.ibm.com/infoce...e/r0001964.htm

(2) I'm surprised about the statement that AIX and Linux should not use DRDA
as a protocol to communicate between client and DB server. Where does this
idea stem from originally?

(Maybe that's related to V7, I'm not sure.)

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #11
Knut Stolze <st****@de.ibm. com> wrote:

Two questions here:

(1) What has the LEVEL option to do with DRDA? Ups, my manual tells so. It is from a DB2 documentation CD - installed
locally - file "sqln0082.h tm"
(/usr/lpp/db2_07_01/doc/en_US/html/db2n0/sqln0082.htm on the AIX box)

The manual doesn't give any such restriction:
http://publib.boulder.ibm.com/infoce...e/r0001964.htm You're right, the documentation on the web does not know about
limitations of the LEVEL option, sorry, I just was reading my local
documentation. Is the web documentation (fully) valid for V7 of DB2?

(2) I'm surprised about the statement that AIX and Linux should not use DRDA
as a protocol to communicate between client and DB server. Where does this
idea stem from originally? A college of mine, how has to do the job of the DBA - but maybe it's not
correct.
(Maybe that's related to V7, I'm not sure.)


Any way, I'll try the LEVEL option this week (regardless of version and
DRDA (or not)) and will give feedback this week or in the beginning of
next week.

And again: Thanks for your help and hints.

J. Luebbers
--
Jochen Lübbers lu******@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
"Who desire to give up freedom in order to gain security
will loose both in the end." (Benjamin Franklin)
Nov 12 '05 #12
The LEVEL option - suggested from Knut Stolze <st****@de.ibm. com> -
works on my system - thanks for this hint.

But it is not really the solution, I'm looking for. Why?
1. I want an automatic generation of the LEVEL, because I tend to
forget to change it manualy, if necessary. Now if shifted the
problem only to an other part of the development system (Makefile).
2. I still can not compile code "just for fun" - better saying for
simple testing - without binding in the same step. If I change the
LEVEL, because I changed a lot in the test code, the normal user
gets an -818 error, if I do not change it the code will also not
run any more, because I *did the bind* with an unpassable bindfile.

So, is there really no way, to name the package without binding at the
same time? Hello developers of IBM, here my wish, would that be a nice
feature for the next fixpack/release?

Greetings from an xsnowy display
Jochen Luebbers.
--
Jochen Lübbers lu******@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
"Who desire to give up freedom in order to gain security
will loose both in the end." (Benjamin Franklin)
Nov 12 '05 #13
Jochen Luebbers wrote:
The LEVEL option - suggested from Knut Stolze <st****@de.ibm. com> -
works on my system - thanks for this hint.

But it is not really the solution, I'm looking for. Why?
1. I want an automatic generation of the LEVEL, because I tend to
forget to change it manualy, if necessary. Now if shifted the
problem only to an other part of the development system (Makefile).
You could use the "db2bfd" executable ane verify that nothing relevant has
changed:

db2bfd -b sqllib/bnd/gseExport.bnd

This will dump some information of the bind file. Now you can check if
numHVars, numStmt or some other property of the bind file changed due to
your modifications. If that's the case, then you need a new LEVEL because
the packages changed and your customers have to rebind anyways. Otherwise,
the previous bind file is still in sync with your code and you don't have
to rebind.
2. I still can not compile code "just for fun" - better saying for
simple testing - without binding in the same step. If I change the
LEVEL, because I changed a lot in the test code, the normal user
gets an -818 error, if I do not change it the code will also not
run any more, because I *did the bind* with an unpassable bindfile.
What it comes down to is the decision when you have to change the LEVEL. If
you change it, you tell DB2 that this is virtually a new package and, of
course, DB2 won't run it for an old program. If you don't change it but
you did modify the SQL statements in the package, then things are also
screwed up.
So, is there really no way, to name the package without binding at the
same time? Hello developers of IBM, here my wish, would that be a nice
feature for the next fixpack/release?


I still don't understand why avoiding an implicit bind would help you there.
You have to manage your versions of the code is such a way that the
versions of the corresponding bind files/packages matches. That's all.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #14
Knut Stolze <st****@de.ibm. com> wrote:
I still don't understand why avoiding an implicit bind would help you
there.

Because I've to develop on a production system. So, if I want to build
a new - maybe trial - version, I've to wait, until all other had gone.

What I dislike, is, that just *building* the new version, can kick off
the other users, only because I want to give the package a specific
name, and not just the first 8 chars of the .sqc file name (which,
for some historic reason all start with lzg_ what makes the effective
part only 4 chars long/short).

You're right, I'll never be able to use two versions of the same package
at the same time. But I just want to be able to recompile my code, even
if the package has changed a lot, and I need (re-)compilings of the code
(because I've sometimes mistakes in my code :-) ).

And because we're a very small company, I've no development system
for my own.

Thank you for having patience with me.

J. Luebbers
--
Jochen Lübbers lu******@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
"Who desire to give up freedom in order to gain security
will loose both in the end." (Benjamin Franklin)
Nov 12 '05 #15
In article <ub************ @tux.tde-online.de>, Jochen Luebbers
(lu******@tde-online.de) says...
You're right, I'll never be able to use two versions of the same package
at the same time. But I just want to be able to recompile my code, even
if the package has changed a lot, and I need (re-)compilings of the code
(because I've sometimes mistakes in my code :-) ).

And because we're a very small company, I've no development system
for my own.

If you create a database with the same tables without or with a small
amount of data you can compile against it without disturbing the
production users. After that you can use the generated bind files to
bind with the needed options against the production db.
All you have to do is keep the table definitions in both db's in
sync.
Nov 12 '05 #16
Jochen Luebbers wrote:
Knut Stolze <st****@de.ibm. com> wrote:
I still don't understand why avoiding an implicit bind would help you
there. Because I've to develop on a production system. So, if I want to build
a new - maybe trial - version, I've to wait, until all other had gone.


That's an interesting way to do development...
What I dislike, is, that just *building* the new version, can kick off
the other users, only because I want to give the package a specific
name, and not just the first 8 chars of the .sqc file name (which,
for some historic reason all start with lzg_ what makes the effective
part only 4 chars long/short).
I think we discussed this already in detail - you can choose your own
package name.
You're right, I'll never be able to use two versions of the same package
at the same time. But I just want to be able to recompile my code, even
if the package has changed a lot, and I need (re-)compilings of the code
(because I've sometimes mistakes in my code :-) ).

And because we're a very small company, I've no development system
for my own.


Why don't you install the Personal Developer Edition? Or use, as Gert
suggested, a separate database. You activate that database before your
build process starts and deactivate it afterwards. When it is deactivated,
it doesn't consume any resources (except a bit of disk space).
Furthermore, you can do your development stuff without having to wait
"until all others have gone".

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #17
Knut Stolze <st****@de.ibm. com> wrote:

Why don't you install the Personal Developer Edition? Can the two DB2 system coexist at the same time on the same system?
Or use, as Gert suggested, a separate database.

That sounds good, sorry, I might have been a little bit blind...

J. Luebbers
--
Jochen Lübbers lu******@tde-online.de
Software Development Group I TDE - Tele Data Electronic GmbH
"Who desire to give up freedom in order to gain security
will loose both in the end." (Benjamin Franklin)
Nov 12 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2382
by: Analyst | last post by:
I'm trying to figure out how, from the Visual C++ GUI, to run a precompiler on my .SQC files, and create the corresponding .C files. I know about the DB2 command window, and how to do a DB2 PREP from there. That's not the information I'm looking for. I have a workspace set up in Developer Studio where some of the projects have ..SQC files, and others don't. I want to be able to build the whole workspace from the GUI. I don't want to...
17
4229
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset Set rs = Me.RecordsetClone rs.Find "=" & lngContractID If Not rs.EOF Then Me.Bookmark = rs.Bookmark I must site the Heisenberb Uncertainty Principal here, as it
21
3053
by: CBFalconer | last post by:
I released this under GPL some time ago, (2003-May) and have been advertising it occasionally here, where it seemed applicable. I have received no bug reports. I have just gotten around to writing a usage manual for it, which follows. I would like some opinions on it. Please don't quote the whole thing back at me, a short excerpt followed by your pithy commentary will do nicely. I am off for an operation Monday, so I won't be...
8
1832
by: Rich | last post by:
Hello, If I leave Option Strict Off I can use the following syntax to read data from a Lotus Notes application (a NotesViewEntry object represents a row of data from a Lotus Notes View - like a record in a sql Server view) .... Dim entry As Domino.NotesViewEntry Dim obj As Object str1 = entry.ColumnValues(0)
0
877
by: lakashya | last post by:
iam going to study for mcse , ccna and ocp in my next couple of month and i was looking for sites with package deals .... i came across hotcerts.com . anyone knows how good is their $85 all exams package and is it worth it ???? . looking for ur responses
1
6736
by: Laurence | last post by:
Hi folks, In the middle of page 231 on the book "Administration Guide - Implementation" stated - "In addition to these package privileges, the BINDADD database privilege allows users to create new packages or rebind an existing package in the database." Previously, I think that the BIND package privilege is required for binding an existing package in the database, and the BINDADD database privilege is only for new package. Now, I'm...
0
6746
by: Vijay | last post by:
Prep Courses for International Certifications, CSTE & CSQA & ISEB & ISTQB &Business Analyst & SOA Certifications in HYDERABAD. After receiving overwhelming response to our last 50+ batches, SPECTRAMIND SOLUTIONS now announces a new batch of Prep Courses for CSQA & CSTE& ISEB & ISTQB & Business Analyst & SOA so as to prepare you thoroughly for the most prestigious certification exams conducted by International organizations. We...
1
1976
by: gsgskms | last post by:
our code is written in C++ (unix) with SQL for connecting to db2 DB. we have dev (d30), systest(m30) schemas on same db (db2u). we need a solution to build once and use it on dev & systest environments. please suggest me some thing. we are totally stuck. we are using: db2 prep bindfile using abc.bnd qualifier d30 collection d30_col db2 bind abc.bnd qualifier d30 collection d30_col.
6
5685
by: crack.the.hack | last post by:
Hi All, If I am changing the database machine, what should I do not to prep bind the sqc files everytime. Because I need to build my application everytime the database is changed? Is there any way, to do prep bind with "defined timestamp" or something which does not require any prep - binding even when the
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.