Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DDL file usage

2 views
Skip to first unread message

shorti

unread,
Nov 30, 2009, 1:41:03 PM11/30/09
to
Running DB2 V9.5 UDB on AIX

I was wondering if there was a way to add directives to the DB2 DDL
files? Specifically, I am looking for something similar to the C
directives ifdef/ifndef where I can say

"if criteria_1 then use UPDATE DB CFG....100, otherwise use UPDATE DB
CFG....200".

I know I can use different DDL files in the calling script but I was
hoping to keep all my DB2 configs in one file to avoid confusion in
the future. Any suggestions?

Ian

unread,
Nov 30, 2009, 2:04:19 PM11/30/09
to

DB2 9.7 added a lot of SQL PL features so you do have more control
to do this.

With older versions, you're much better off doing this via a scripting
language (ksh/bash/perl/etc).


Good luck,

Serge Rielau

unread,
Nov 30, 2009, 2:27:41 PM11/30/09
to
Ian wrote:
> shorti wrote:
>> Running DB2 V9.5 UDB on AIX
>>
>> I was wondering if there was a way to add directives to the DB2 DDL
>> files? Specifically, I am looking for something similar to the C
>> directives ifdef/ifndef where I can say
>>
>> "if criteria_1 then use UPDATE DB CFG....100, otherwise use UPDATE DB
>> CFG....200".
>>
>> I know I can use different DDL files in the calling script but I was
>> hoping to keep all my DB2 configs in one file to avoid confusion in
>> the future. Any suggestions?
>
> DB2 9.7 added a lot of SQL PL features so you do have more control
> to do this.
DB2 9.7 FP1 has "conditional compilation"
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.config.doc/doc/r0056390.html
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.ref.doc/doc/c0056403.html

Cheers
Serge
--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

0 new messages