DB2 PREP ... PACKAGE USING ...没有隐式绑定 [英] DB2 PREP ... PACKAGE USING ... without implicit binding

查看:115
本文介绍了DB2 PREP ... PACKAGE USING ...没有隐式绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






我有一个问题:


编译嵌入式SQL的模块(对于动态库)在多个
平台(AIX,Linux,Windows)上。它们是从相同的

源代码编译而来的。为了能够在一个数据库(服务器)上同时提供所有平台

,我想要不同的包名 -

,例如: module1.sqc应该生成包AMOD1,LMOD1和WMOD1。

所以我尝试了以下db2调用来准备:

DB2 PREP module1.sqc BINDFILE使用amod1.bnd PACKAGE使用amod1 [...]


它可以满足我的需求和更多:在DB2 V7上它隐含地绑定了新创建的包的

!这是一场噩梦,因为

我有时只是编译模块,可以肯定的是,它仍然可以在所有平台上进行编译,只需更改一下平台。


有没有办法按照我想要/需要命名包装,而不是绑定它

同一步骤???


感谢您的帮助,

J. Luebbers


-

JochenLübbers lu ****** @ tde-online.de

软件开发组I TDE - Tele Data Electronic GmbH

谁愿意为了获得安全而放弃自由

最终会放弃。 (本杰明富兰克林)

解决方案

Jochen Luebbers写道:



我有一个问题:

我在多个平台(AIX,Linux,Windows)上编译嵌入式SQL模块(用于动态库)。它们是用相同的源代码编译的。为了能够在一个数据库(服务器)上同时提供所有平台,我想要不同的包名称 -
module1.sqc应该生成包AMOD1,LMOD1和WMOD1。
所以我尝试了以下db2调用来准备:
DB2 PREP module1.sqc BINDFILE使用amod1.bnd包使用amod1
[。 ..]

它完全符合我的要求和更多:在DB2 V7上,它隐含地绑定了新创建的包!这是一场噩梦,因为我有时只是编译模块,可以肯定的是,在一个平台上做了一些改变之后,它仍然可以在所有平台上进行编译。
???




我不喜欢知道这是否对你有所帮助,但要看一下precompile命令的LEVEL选项(V8

也有VERSION选项)。这样,DB2就不会使用包的时间戳来验证包与你的源代码是否同步



-

Knut Stolze

信息集成

IBM德国/耶拿大学


Knut Stolze< st **** @ de.ibm.com>写道:

有没有办法按照我想要/需要命名包,而不用绑定它
在同一步骤???



我不知道这是否对你有帮助,但是看一下precompile命令的LEVEL选项(V8
也有一个VERSION选项)。这样,DB2就不会使用包的时间戳来验证包是否与源代码同步。



$ b $嗯,这听起来不错,我会看,如果这对我有用。

感谢您的提示。


J. Luebbers

-

JochenLübbers lu ****** @ tde-online。 de

软件开发组I TDE - Tele Data Electronic GmbH

谁愿意放弃自由以获得安全

最终会松动。 (本杰明富兰克林)


现在看看LEVEL选项了。但不幸的是,DRDA服务器只支持

:-(


但我需要不同的软件包名称,以避免平台冲突。

最后的工作(对于德国读者:Würgherum!)将在执行DB2 PREP之前重命名SQC文件,但那是

not我想做什么。


像DB2这样的优秀数据库真的没有正常解决方案这样的问题吗?


再次感谢所有提示和帮助,

J. Luebbers

-

JochenLübbers lu ****** @ tde-online.de

软件开发组I TDE - 远程数据电子有限公司

谁愿意为了获得安全而放弃自由

最终会放弃。(本杰明富兰克林)


Hi,

I''ve a problem:

I compile modules of embedded SQL (for a dynamic lib) on multiple
platforms (AIX,Linux,Windows). 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)

解决方案

Jochen Luebbers wrote:


Hi,

I''ve a problem:

I compile modules of embedded SQL (for a dynamic lib) on multiple
platforms (AIX,Linux,Windows). 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???



I don''t know if this would help you but have a look at the LEVEL option (V8
also has a VERSION option) of the precompile command. That way, DB2 won''t
use the timestamp of the package to verify that the package is in sync with
your source code.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


Knut Stolze <st****@de.ibm.com> wrote:

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



I don''t know if this would help you but have a look at the LEVEL option (V8
also has a VERSION option) of the precompile command. That way, DB2 won''t
use the timestamp of the package to verify that the package is in sync with
your source code.



Hmm, that sounds good, I will see, if that will work for me.
Thanks for your hint.

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)


Now a have had a look at the LEVEL option. But unfortunately it is only
supported by DRDA servers :-(

But I need the different package names, to avoid platform conflicts.
The very last work around (for German readers: Würgherum!) would be
to rename the SQC file just before doing the DB2 PREP, but that is
not what I would like to do.

Has such a fine database like DB2 really no "normal" solution for
a problem like this?

Thanks again for all hints and 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)


这篇关于DB2 PREP ... PACKAGE USING ...没有隐式绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆