Page 1 of 1

Chicken and egg problem with DSR_LICENSE

Posted: Thu Mar 27, 2003 3:04 am
by ogmios
I'm having the following problem: I would like to retrieve the names of all of the projects in my DataStage Server together with their path.

I can get this information if I execute "DSR_LICENSE" in uv when I'm located in a project directory. This gives me back a list containing all projects, the DataStage version and the path of the projects.

So far so good. The only problem I now have is that to execute DSR_LICENSE I have to be in a project directory, I can't execute the DSR_LICENSE while being in the main DataStage directory because then I get "Verb DSR_LICENSE is not in your VOC".

Is there a way to get a list of project and directories without first having to be in a project first?

Regards,
Ogmios

Posted: Thu Mar 27, 2003 5:08 am
by mihai
While in the ServerEngine directory, do
binuv "LIST UV.ACCOUNTS"
You'll need to process the output. Hope this puts you on the right track.


Mihai

_________________________
desk direct:+441908448571

Posted: Thu Mar 27, 2003 5:28 am
by ogmios
Thank you,

cd `cat /.dshome`
bin/uv "LIST UV.ACCOUNT" | cat

Does indeed provide parsable project information. Now I just have to figure out how make the column output wider (DataStage/UV has this annoying habit to split one field over multiple lines), but I will figure that one out.

Ogmios

Posted: Thu Mar 27, 2003 6:28 am
by mihai
I hope this post doesn't hit the forum twice...

You can also try
cd `/.dshome`
binuv "CT UV.ACCOUNT * -NO.PAGE" | grep "0011"

Kind regards,
Mihai

_________________________
desk direct:+441908448571

Posted: Thu Mar 27, 2003 5:11 pm
by ray.wurlod
The column wrap you are seeing results from the default display criteria specified in the file dictionary of UV.ACCOUNT. These can be overridden in your query.
Note, also, that two query languages are available, "native" (which is called RetrieVe) and SQL.
DataStage only uses three columns, called @ID, NAME and PATH. @ID is the name of the project, NAME contains a pipe-delimited string full of licensing stuff, and PATH is the location of the project directory.

SELECT @ID FMT '20L' COL.HDG 'Project Name', PATH FMT '40L'
FROM UV.ACCOUNT
WHERE @ID NOT IN ('UV','uv')
ORDER BY 1;

SORT UV.ACCOUNT @ID FMT "20L" COL.HDG "Project Name" PATH FMT "40L" ID.SUP WITH @ID CONV "MCU" NE "UV" HDR.SUP


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518