How to run UV commands from Unix
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
How to run UV commands from Unix
uvsh is used to run UV queries (Please correct if wrong)
Well i am getting the following error
==> uvsh
DataStage Command Language 7.5
Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
bin logged on: Wed Dec 16 03:37:41 2009
>SELECT * FROM DS_JOBS WHERE NAME LIKE 'djpLODDailyApNum'
Retrieve: syntax error. Unexpected sentence without filename. Token was "".
Scanned command was SELECT * FROM 'DS_JOBS' WHERE 'NAME' LIKE 'djpLODDailyApNum'
Please Advice
Well i am getting the following error
==> uvsh
DataStage Command Language 7.5
Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
bin logged on: Wed Dec 16 03:37:41 2009
>SELECT * FROM DS_JOBS WHERE NAME LIKE 'djpLODDailyApNum'
Retrieve: syntax error. Unexpected sentence without filename. Token was "".
Scanned command was SELECT * FROM 'DS_JOBS' WHERE 'NAME' LIKE 'djpLODDailyApNum'
Please Advice
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
oooops............
was checking that in the development environment not sure why i did not get the error you mentioned. In other environment i am facing this
$ uvsh
This directory is not set up for DataStage.
Would you like to set it up (Y/N)?
so could you please share how to run the above UV query from unix
was checking that in the development environment not sure why i did not get the error you mentioned. In other environment i am facing this
$ uvsh
This directory is not set up for DataStage.
Would you like to set it up (Y/N)?
so could you please share how to run the above UV query from unix
Because someone already screwed up and said "Yes" in dev.
Always answer that question "no", it means you're in the wrong place. Always launch "uvsh" or "dssh" from one of two places - $DSHOME or inside a project directory. For the latter you're good to go, for the former you'll need to LOGTO your project name before you issue any sql.
Always answer that question "no", it means you're in the wrong place. Always launch "uvsh" or "dssh" from one of two places - $DSHOME or inside a project directory. For the latter you're good to go, for the former you'll need to LOGTO your project name before you issue any sql.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Now it seems i made a small Advance. wanted to run "select * from DS_JOBS"
1) Entered into the $DSHOME
2) Sourced the dsenv file
3) Ran $DSHOME/bin/uvsh "select * from DS_JOBS;"
Got the result :
vhrldct05:/opt/tools/ds/Ascential/DataStage/DSEngine/bin
==> $DSHOME/bin/uvsh "select * from DS_JOBS;"
DataStage/SQL: Table "DS_JOBS" does not exist.
Now I am confused......
1) Entered into the $DSHOME
2) Sourced the dsenv file
3) Ran $DSHOME/bin/uvsh "select * from DS_JOBS;"
Got the result :
vhrldct05:/opt/tools/ds/Ascential/DataStage/DSEngine/bin
==> $DSHOME/bin/uvsh "select * from DS_JOBS;"
DataStage/SQL: Table "DS_JOBS" does not exist.
Now I am confused......
That's because you are sitting in the Engine directory rather than a Project. Add a step "2.5" where you cd to the Project directory you want to check. Note you could also try adding a "LOGTO <ProjectName>" command to the beginning of the commands you run in Step 3.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do stop thinking of it as UniVerse. DataStage ceased being UniVerse in version 6.0. Prefer dssh as the command to enter the DataStage shell.
Otherwise the story is the same. But if you ever work in a site where UniVerse and DataStage are both installed, the difference is critical. And they ARE different.
Otherwise the story is the same. But if you ever work in a site where UniVerse and DataStage are both installed, the difference is critical. And they ARE different.
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.
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
There is another problem with your command. the "SELECT" verb also exists with the DataStage query language and DS detects the different flavours (DS syntax or SQL syntax) by looking for a ";" terminator in the command, if that is not present then it is assuming the standard DataStage syntax. If you add a semicolon then the command might work.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This:
will give you a list of the projects from the command line, or you can see the list of projects and paths from the administrator client.
Code: Select all
$DSHOME/bin/dssh "LIST UV.ACCOUNT @ID PATH ID.SUP"
will give you a list of the projects from the command line, or you can see the list of projects and paths from the administrator client.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>