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.
Getting category list in a project
Moderators: chulett, rschirm, roy
Getting category list in a project
Devlopers corner
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
Unfortunately there isn't a "dsjobs -lcategories" option. An easier solution, however, is to use a UV query on the repository:
From your project directory you can execute it straight from the command line:
HTH,
J.
Code: Select all
SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;
Code: Select all
uv "SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;"
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>
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>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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
in the command area. Dont forget the trailing semicolon.
Code: Select all
SELECT DISTINCT CATEGORY FMT 60 FROM DS_JOBS;
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.