Page 1 of 1

Accessing different Project info from existing project

Posted: Wed Nov 16, 2005 9:03 am
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.

Posted: Wed Nov 16, 2005 11:25 am
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.

Posted: Wed Nov 16, 2005 3:23 pm
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.

Posted: Wed Nov 16, 2005 4:39 pm
by kduke
8)

Nice one, Ray. Learn something all the time.

Posted: Wed Nov 16, 2005 6:45 pm
by chulett
Seconded... had no clue you can do that.

Posted: Thu Nov 17, 2005 4:14 am
by ahmediftikhar
Ray, No luck... I tried with the syntax u gave.

Any other clue.

Re: Accessing different Project info from existing project

Posted: Thu Nov 17, 2005 5:56 am
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.

Posted: Thu Nov 17, 2005 6:52 am
by kduke
Ray

It did not work for me either. Ds7.5.1A

Posted: Thu Nov 17, 2005 7:29 am
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.

Posted: Thu Nov 17, 2005 9:40 am
by ray.wurlod
Initial response is that it works in UniVerse/SQL. I will test using DataStage/SQL and let you know.