Accessing different Project info from existing project

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
ahmediftikhar
Participant
Posts: 22
Joined: Thu Jul 29, 2004 8:10 am

Accessing different Project info from existing project

Post by ahmediftikhar »

Hi

I need to access some project info from the existing project. Meaning, lets say, I'm querying for category information in UV as below..

SELECT CATEGORY FROM DS_JOBS WHERE NAME='JobName';

I need to get the same information for the job which is there in different project. How do I query the different project being there in the existing one?


Many thanks
Ahmed.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I'm not quite sure what you are looking for in this case. Each project has it's own DS_JOBS hashed file so you cannot directly query this file across several projects.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Oh yes you can! Just qualify the table name (DS_JOBS) with the schema name.

Code: Select all

SELECT CATEGORY FROM Project2.DS_JOBS WHERE NAME = 'OtherJob';
UniVerse/SQL (DataStage/SQL) is compliant with standards, so supports qualifying a table name with a schema name. Each project is a schema.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

8)

Nice one, Ray. Learn something all the time.
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Seconded... had no clue you can do that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ahmediftikhar
Participant
Posts: 22
Joined: Thu Jul 29, 2004 8:10 am

Post by ahmediftikhar »

Ray, No luck... I tried with the syntax u gave.

Any other clue.
rsaliah
Participant
Posts: 65
Joined: Thu Feb 27, 2003 8:59 am

Re: Accessing different Project info from existing project

Post by rsaliah »

Not sure what information you need but you may be able to get it by using the command line utility "dsjob". If it's specifically the category you need then this won't help, but there's plenty more useful info available...


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

Post by kduke »

Ray

It did not work for me either. Ds7.5.1A
Mamu Kim
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Me neither, but the docs state that it should work; I've tried a number of UV_SCHEMA definitions and decided to wait for Ray to post a response. I have 7.5.x as well.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Initial response is that it works in UniVerse/SQL. I will test using DataStage/SQL and let you know.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply