Hi,
i am in need of unix command which can give us all job names and annotation in the job of a category.
say i have three job in the folder /test/prjct1
j1ext
j2tfm
j3load
if i pass argument to unix command as /test/prjct1 , i should get job names and annotation given in that job.
Thx
Sudhir
to get job names of a category through unix command
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 11
- Joined: Fri Sep 05, 2008 4:20 am
- Location: chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 11
- Joined: Fri Sep 05, 2008 4:20 am
- Location: chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Usually categories are delimited by backslash, so you might need either to specify the argument with backslashes or, within your script, translate forward slashes to backslashes. For example
The command has to be executed while attached to a project directory. Therefore you need to provide the name of a project or, preferably, the pathname of the project directory as an additional command line argument.
If the DSEngine bin directory is not in your PATH then you will need the full pathname of the dssh executable. The query is probably the easiest part.
Error and argument checking has been omitted for clarity.
Code: Select all
category=$1
catpath=`echo $category | tr \/ \\`
Code: Select all
projectdir=$2
cd $projectdir
Code: Select all
export DSHOME=`cat /.dshome`
${DSHOME}/bin/dssh "SELECT NAME FMT '60L' FROM DS_JOBS WHERE CATEGORY = '$catpath';"
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.
a batch file with the below can help to get just the Job name in the category...
but i am sure the experts gave you the way to get the annotation given in that job
but i am sure the experts gave you the way to get the annotation given in that job
Code: Select all
@echo off
SETLOCAL
SET Host=
SET /p Host=Type host and press Enter:
SET User=
SET /p User=Type User and press Enter:
SET PW=
SET /p PW=Type Password and press Enter:
SET project=
SET /p project=Type Project Name and press Enter:
SET folder=
SET /p folder=Type folder path and press Enter:
SET DsSearch=C:\Progra~1\Ascential\DataStage7.5.2\dssearch.exe
SET JobList=JobList.txt
%DsSearch% -server %Host% -user %User% -password %PW% -ljobs -matches -sub -c %folder% %project% >> %JobList%
ENDLOCAL
Accept that some days you're the pigeon and some days you're the statue.
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
The command bellow doesnt work.
%DsSearch% -server %Host% -user %User% -password %PW% -ljobs -matches -sub -c %folder% %project% >> %JobList%
If a cut the part: "-matches -sub -c %folder%" it works fine.
It says:
"Valid primary command options are: -ljobs
Status code = -9999 DSJE_DSSEARCH_ERROR"
Any idea?
Tks!
%DsSearch% -server %Host% -user %User% -password %PW% -ljobs -matches -sub -c %folder% %project% >> %JobList%
If a cut the part: "-matches -sub -c %folder%" it works fine.
It says:
"Valid primary command options are: -ljobs
Status code = -9999 DSJE_DSSEARCH_ERROR"
Any idea?
Tks!
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil