Getting List of job names from script.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
tom
Participant
Posts: 46
Joined: Fri Oct 14, 2005 12:38 am

Getting List of job names from script.

Post 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.
Devlopers corner
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post 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.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
tom
Participant
Posts: 46
Joined: Fri Oct 14, 2005 12:38 am

Post by tom »

Thanks folks for your timely help.
Devlopers corner
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If your topic is Resolved, please mark it as such. Thanks!
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply