Hi there,
Has anyone ever queried the ds repository using perl? If so, can you provide an example ?
Thanks,
Melquior
How to use perl to query info from DS repository
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The DataStage Repository is a database. Like any other database it must be queried using a query language (for example SQL) within its own environment.
You can wrap this in Perl or any other scripting language, but you still need to know how to construct the query.
You can wrap this in Perl or any other scripting language, but you still need to know how to construct the query.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The easiest way is to use the dssh or uv command in the project directory. This can take a double-quoted command (query) as its command line argument.
You may need to have set environment variables first by sourcing the dsenv script.
Wrap that in Perl, capture the output, and parse it.
You may need to have set environment variables first by sourcing the dsenv script.
Code: Select all
. $DSHOME/dsenv
$DSHOME/bin/dssh "SELECT NAME FMT '32L', CATEGORY FMT '32L' FROM DS_JOBS ORDER BY 1;"
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: