List out all the DS jobs using specific environment variable

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ramu1
Participant
Posts: 14
Joined: Mon May 12, 2008 12:47 am

List out all the DS jobs using specific environment variable

Post by ramu1 »

Hi Everyone,

How can we list all the DS jobs which were using a specific environment variable in a project?

We have thousands of DS jobs in our project and need to list all the jobs used by specific environment variable like #$SqlServerDSN#.

I took the latest copy of .dsx file and manually searching for the jobs. Is there any better approch to list out the all the jobs?

Can anyone please help me by your suggestion.

Thanks and regards,
Ramu
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

We can implement through unix script as below

1)Get the list of the jobs in project by using dsjob command
2)For each Job get the list of parameters by using dsjob command
3)Check whether specific environment variable is present or not in a job.
We need to pass proper parameters for dsjob command to implement the first and second step
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

yes that will give you the parameters defined in the job, whether used anywhere or not. Also you can find that out by querying datastage repository and also whether it is used inside any stage or not.

If to be done from DSX, I think Phil Hibbs posted a spreadsheet with macros to parse the dsx and give you the details in tabular format. You might want to check that out.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

Can any one please tell me where to query the Datastage Repository tables like DS_JOBS and DS_JOBOBJECTS for a particular Datastage project?
kmsekhar
Premium Member
Premium Member
Posts: 58
Joined: Fri Apr 16, 2010 12:58 pm
Location: Chn

Post by kmsekhar »

vamsi.4a6 wrote:Can any one please tell me where to query the Datastage Repository tables like DS_JOBS and DS_JOBOBJECTS for a particular Datastage project?
Administrator Client Component-> Projects Tab-> Command Button -> Here You need to query Repository Tables...
Another way is from DSEngine folder-->using dssh command connect to repostiry
Thanks,
Sekhar
kmsekhar
Premium Member
Premium Member
Posts: 58
Joined: Fri Apr 16, 2010 12:58 pm
Location: Chn

Post by kmsekhar »

priyadarshikunal wrote:If to be done from DSX, I think Phil Hibbs posted a spreadsheet with macros to parse the dsx and give you the details in tabular format. You might want to check that out.
viewtopic.php?t=144212&highlight=
Thanks,
Sekhar
Post Reply