dynamic query

IBM's flagship relational database management system

dynamic query

Postby kristene » Tue Feb 17, 2009 10:33 pm


Is it posibble to write dynamic queries in a COBOL-DB2-CICS program?
I have written a COBOL program which creates a databse tablespace,table and index. But I want to take the table name from the user through a CICS (BMS) map and create the table with that user-defined name.
Posts: 2
Joined: Tue Feb 17, 2009 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: dynamic query

Postby dick scherrer » Wed Feb 18, 2009 1:55 am


Could you make this a "logical" table rather than a "real" table? I suspect that if 5 users create "the table" all of the tables would have the same definition, just a different "table name" (under the current scheme). You might add a new column to be the high-order part of the primary key that would be the "logical table name" and when the user enters this, use it to differentiate between user's tables.

Whether a real table is created or a logical table is identified, how will this be used by the system? What would be the purge criteria or would these just accumulate forever?

What business requirement is this meant to provide?
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to DB2


  • Related topics
    Last post