Identifying Stages that Populate DB2 Tables

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Identifying Stages that Populate DB2 Tables

Post by fridge »

I am interested in writing some code that would run against a project and tell me which DS jobs update DB2 tables/fields. Looking at the help screens it looks like the function DSGetprojectInfo/Stage Info and DSJ.Joblist is a starting point. Is it possible to identify stages that load DB2 tables and from there extract the relevant table names and field attributes? Such Metadata would then be held out in a flat file and loaded into a DB2 table itself.

Any help would be greatly appreciated.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Re: Identifying Stages that Populate DB2 Tables

Post by ogmios »

The easiest would be to export your jobs to XML format and write a small parse in java or perl to extract your tables.

Ogmios
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You could also use MetaStage and the Reporting Assistant. Do a search there have been other posts on this.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you do write something, make sure it finds any ODBC stage that is writing to a DB2 DSN.

It's not good enough to assert that there aren't any; you can't prevent someone from creating one. Your utility must be able to handle it.

And then there's OLEDB...
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

As Kim suggests I would use the Reporting Assistant for this. Dump your project data into the reporting Access database, write a query against this database against the DSSTAGES table which can be filtered on StageType to give you the right stages and can show things like TargetFileName and DataSourceName so you can find out where specific tables are used.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Use my List all files and tables used by jobs in a dsx file . You can find it on the DataStage Tools page of www.anotheritco.com.

The input to the tools is a DataStage export file. Just export all job designs only.
Post Reply