Getting category list in a project

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

Post Reply
tom
Participant
Posts: 46
Joined: Fri Oct 14, 2005 12:38 am

Getting category list in a project

Post by tom »

Hi folks,

Can anybody tell me how to get list of category names in a project from command prompt. I mean for list of projects "dsjob -lprojects" and for list of jobs "dsjob -ljobs". In the same way is there any option to get list of categories in a project.

Please suggest me

Thanks in advance.
Devlopers corner
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

Unfortunately there isn't a "dsjobs -lcategories" option. An easier solution, however, is to use a UV query on the repository:

Code: Select all

SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;
From your project directory you can execute it straight from the command line:

Code: Select all

uv "SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;"
HTH,
J.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you want just job categories, or routine, table definition and other categories as well? If the latter, simply execute similar commands on the other Repository tables and form the UNION. For example

Code: Select all

SELECT DISTINCT 'Jobs',CATEGORY FMT '60L' FROM DS_JOBS
UNION
SELECT DISTINCT 'Routines',CATEGORY FROM DS_ROUTINES;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tom
Participant
Posts: 46
Joined: Fri Oct 14, 2005 12:38 am

Post by tom »

Hi,

I tried uv ""SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;" from the project directory from command prompt. But i got "Command Not Found". Can u please suggest me
Devlopers corner
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You need to set your dsenv first. Search on how to execute dsenv file. Then run that command. Or simply log onto your DataStage Administrator and run the commad

Code: Select all

SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;
in the command area. Dont forget the trailing semicolon.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to set your PATH to include $DSHOME/bin or to specify the full pathname of the uv command.

After that, you may find that you have not executed the dsenv script, which will cause errors about libraries when you manage to execute the uv command.
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