QUERY UNIVERSE DATABASE

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

ramank1981
Participant
Posts: 10
Joined: Wed Dec 21, 2005 5:03 am

QUERY UNIVERSE DATABASE

Post by ramank1981 »

I need to generate report by querying metadata in UNIVERSE database....is there any way to query universe database?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can query UniVerse Databases with either the native query language INFORM or you can use standard SQL queries within the TCL environment. Note that DataStage is no longer UniVerse but they are clones and very similar. The IBM website offers all of the UniVerse documentation free of charge in PDF format for you to download.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you have genuine UniVerse (not DataStage) you can set up ODBC access to it.

I have also used an External Source stage to get data out of UniVerse into a parallel job. Construct a query that does not column wrap (perhaps using FMT to override the default field widths and setting the device width sufficiently wide). Wrap this in a uv, uvsh or dssh command as the command executed by the stage; its stdout will become the input link of the stage.

Example

Code: Select all

uv "LIST DS_JOBS ID.SUP NAME FMT '40L' JOBNO WITH NAME LIKE '1A0X'"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ramank1981
Participant
Posts: 10
Joined: Wed Dec 21, 2005 5:03 am

Post by ramank1981 »

I want to query Univers db of datastage, it is not external db, so is there any stage defined for quering Universe db?
Secondly can i treat this Universe Db as external and try to connect it using ODBC?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You use the Hashed file stage to access the Db directly, and you can access via ODBC with the dsn "localuv"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: QUERY UNIVERSE DATABASE

Post by ray.wurlod »

ramank1981 wrote:I need to generate report by querying metadata in UNIVERSE database....is there any way to query universe database?
Why do you need to do it that way?
Perfectly good tools are provided "out of the box".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ArndW wrote:You use the Hashed File stage to access the Db directly
In a PARALLEL job?!! :roll:

Can the Enterprise ODBC stage "see" the localuv DSN and, if so, can it make any sense of "DBMSTYPE = UNIVERSE" in uvodbc.config ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray - thanks for pointing that out, I saw hashed files and assumed that we were in the Server world and answered the question as posted (knowing that the answer wasn't going to help, since knowing which stages to use to query a database doesn't give you the tables required or the layout of columns in those tables...).

I will try the ODBC connectivity to Hashed files today in a PX job - I haven't attempted that before and you've piqued my curiosity.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't have access to DataStage this week - hence the question rather than the research.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dwblore
Charter Member
Charter Member
Posts: 40
Joined: Tue Mar 28, 2006 12:02 am

Post by dwblore »

Which are the tools available for quering on Universe Databse and for making reports out of Metadata?

Is there any mechanism to access Univers database(in both server or Parallel jobs).
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Yes, use a UV stage in a server job.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could build a server shared container containing a UV stage. Read the end of Chapter 2 of Parallel Job Developer's Guide for the restrictions on what you can do using this approach.

You could use an External Source (or External Target) stage, as noted above.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ramank1981
Participant
Posts: 10
Joined: Wed Dec 21, 2005 5:03 am

Post by ramank1981 »

Still i m not able to figure out which database nd which table i should query to get metadata information about all the jobs in project,using Universe Stage in a server job.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Already mentioned.
To get the informations about the jobs query DS_JOBS.
To get the metadate of this file use LIST DICT DS_JOBS.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
koolnitz
Participant
Posts: 138
Joined: Wed Sep 07, 2005 5:39 am

Post by koolnitz »

ArndW says:

The IBM website offers all of the UniVerse documentation free of charge in PDF format for you to download.
Can you please give us the URL from where we can download the mentioned PDF?

Thanks in advance!
Nitin Jain | India

If everything seems to be going well, you have obviously overlooked something.
Post Reply