back porting from DB2 UDB V8 Unix to DB2 v7.2 on zOS

Posted on 2004-11-17
Last Modified: 2011-09-20

We performing backporting of one of our applications from
DB2 UDB V8 Unix to DB2 v7.2 on zOS.

Can somebody say, if the following queries make sense on
DB2 v7.2 on zOS? At least several of syscat views we are
using seems not to be available on DB2 7.2 on zOS.

There is a full list of queries we need:

1) select schemaname from syscat.schemata order by schemaname

2) select tbl.tabname, tbl.tabschema, 'BASE TABLE', tbs.tbspace
from syscat.tables tbl, syscat.tablespaces tbs
where type = 'T' and tbl.tbspaceid = tbs.tbspaceid and tbl.tabschema = :user
order by tbl.tabname"

3) select colno, colname, typename, length
from syscat.columns
where tabname = :table and tabschema = :user
order by colon

4) select constname, tabschema, tabname, definer, refkeyname,
reftabschema, reftabname, deleterule, updaterule, fk_colnames, pk_colnames
from syscat.references where tabname = :table and tabschema = :user

5) ALTER TABLE ownerName.tableName ADD CONSTRAINT Constname
FOREIGN KEY Fk_colnames REFERENCES Reftabschema.Reftabname

6) ALTER TABLE ownerName.tableName DROP FOREIGN KEY FK_Constname;


Question by:davidgor
    LVL 13

    Expert Comment

    i think you have to query the sysibm tables in zOS

    Author Comment


    It's nice comment :-) but what tables do I need?

    In addition, on Unix we have used syscat views which are views for
    sysibm tables.
    LVL 13

    Accepted Solution

    this link explains all the catalog tables in Z os:

    in unix windows, the catalog table setup is different, the syscat views are available, but you can still query the sysibm tables


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now