How can I get the full /path/project list?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
How can I get the full /path/project list?
It looks like UV.account stores this info. I can see the projects and paths when I do a strings on this file. Is there any other place that is more readable to get this information? Is there a command that can be run to get this information? I can run dsjob -lprojects, but this only lists the projects. I tried to use dsjob -projectinfo <project name>, but this too only lists the name of the project and not the path.
Thanks.
Thanks.
DS.TOOLS from any project TCL prompt will get you this information. Do you want programmatic access? If so, READ it out of UV.ACCOUNT and parse, or use the DSExecute API to execute the TCL command to SELECT the file. You can always use the unix command line read to access the file from a shell script.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
cd $DSHOME && . ./dsenv && bin/uv "SELECT @ID, PATH FMT '60L' FROM UV.ACCOUNT WHERE @ID NOT IN ('UV', 'uv') AND @ID NOT LIKE 'HS.%';" > /tmp/projects
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.
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
With your help Ray I ended up with the following code to get the projects.
Code: Select all
#!/bin/ksh
## SOURCE ENVIRONMENT
. ~/.dsadm
## CHANGE TO Directory Containing the VOC
cd $DSHOME
## GET PROJECT LIST INTO ARRAY
set -A MY_ARRAY $(dssh "SELECT PATH FMT '60L' \
FROM UV.ACCOUNT \
WHERE @ID NOT IN ('UV', 'uv', 'DS', 'ds') \
AND @ID NOT LIKE 'HS.%';" \
| awk '{print $1}' \
| grep '/')
## LOOP COUNTER
typeset -i COUNT=0
## SIZE OF ARRAY
typeset -i ARRCNT=${#MY_ARRAY[*]}
## DISPLAY ARRAY ELEMENTS
while (( $COUNT < $ARRCNT ))
do
print "${MY_ARRAY[${COUNT}]}"
(( COUNT = $COUNT + 1 ))
done
exit 0
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Did you mean or does your dsadm script execute dsenv?
Code: Select all
## SOURCE ENVIRONMENT
. ~/.dsadm
. $DSHOME/dsenv
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.
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
Not dssh.exe on UNIX, just plain dssh - and you probably want to specify exactly the fields from UV_SCHEMA (or UV_ACCOUNT) that you want in the output - for example, you are probably not interested in the numeric ID of the owner or creator.
I prefer to give SQL syntax, even though I am fully aware that there is another query language available, because most folks are more familiar with SQL.
Not dssh.exe on UNIX, just plain dssh - and you probably want to specify exactly the fields from UV_SCHEMA (or UV_ACCOUNT) that you want in the output - for example, you are probably not interested in the numeric ID of the owner or creator.
I prefer to give SQL syntax, even though I am fully aware that there is another query language available, because most folks are more familiar with SQL.
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.