Page 1 of 1

Getting List of job names from script.

Posted: Thu Jan 18, 2007 1:14 am
by tom
hi,

Can anybody tell me how can I get the list of job names. I am writing a shell script. I need to display list of job names in a particular project when the script is executed.

Please suggest me.

Thanks in advance.

Posted: Thu Jan 18, 2007 4:59 am
by kumar_s
Hi Tom,
It has been discussed lot many times. There are several ways of doing it.

Code: Select all

dsjob -ljobs  <project> - from command prompt.
SELECT NAME FROM DS_JOBS WHERE NAME NOT LIKE '\\%' - from TCL prompt.

Posted: Thu Jan 18, 2007 5:00 am
by jhmckeever
Use the following command:

Code: Select all

dsjob -ljobs <project>
You might find the other options useful (Type dsjob with no parameters for a list)

HTH
J.

Posted: Thu Jan 18, 2007 7:56 am
by DSguru2B
If you are writing a script then the simplest way is to go for dsjob -ljobs option and redirect them to a text file. That file will then contail all your job names for that particular project.

Posted: Fri Jan 19, 2007 6:46 am
by tom
Thanks folks for your timely help.

Posted: Fri Jan 19, 2007 7:44 am
by chulett
If your topic is Resolved, please mark it as such. Thanks!