Skip to Content

powerdesigner db2 z/Os dbms cannot handle variables


We are using powerdesigner 16.6.9 and while trying to create alter scripts we use something like :

opt.ReverseSchema =xxxxxx 'schema user object

opt.ReverseCatalog = xxxxx 'db name string

model.ModifyDatabase generationObjects 'generationObjects is a selection which has table and tablespace objects.

in our extension. when we open database trace and run our script, while in dbms sqlListQuery for tablespace is :

"select dbname, name, case when type = 'O' then 'lob' else '' end from sysibm.systablespace where implicit='N' [and dbname=%.q:CATALOG%] order by name"

we see it like [and dbname=%.q:CATALOG%] is not there, and it tries to reverse all of the tablespaces in our systems.

how can we set %.q:CATALOG% variable in our script?

moreover, when i add [and dbname=%.q:SCHEMA%] to our tablespace sqllist query, again it is not shown in the trace, however I can see the variable when I use it in table sqllist query.


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Jan 14 at 12:28 AM

    Variable in DBMS such as CATALOG and SCHEMA is set in Powerdesigner engine.

    You cannot use them outside DBMS file.

    You must hard code database name and schema name in your code.

    Add comment
    10|10000 characters needed characters exceeded