DSJOB syntax for all jobs in a project

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
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

DSJOB syntax for all jobs in a project

Post by G.K.K »

hi All,

i want to view the log information for all the jobs in a single project at a time. i knew by using DSJOB command i can get it fro single job by giving project name and job name for the logsum option. but i want the syntax for all the jobs loginformation in a particular project at a time.

for example:
1. i have a project name called kamal in datastage.
2. i have 40 jobs in the project kamal
3. i want the log information for all the 40 jobs in a kamal
project using DSJOB syntax.
4. with single DSJOB command it has to get all the log
information for 40 jobs in the project kamal.


please help me, by sharing this knowledge.

Thanks & Regards,
kamal

---------------


up to now i have not recieved any replies,

please help me in solving this issue...


Thanks & regards
kamal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not possible. You'll need to loop through all of the jobs in the project, a call to 'dsjob' per job to fetch the job's log.
-craig

"You can never have too many knives" -- Logan Nine Fingers
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

how to write that loop.. pls say that ..if possible pls give the command for that

thanks
kamal
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The output from dsjob -ljobs kamal will be a list of jobs in the project. In a BAT file create a loop that iterates through this list, executing the command dsjob -logsum kamal $jobname for each jobname in the list. Redirect output appropriately to capture the output wherever you require it.

I am going to assume that you have sufficient skills to write a BAT file; or can hire the same.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cybustos
Premium Member
Premium Member
Posts: 2
Joined: Wed Apr 28, 2010 9:03 am
Location: Colombia

Post by cybustos »

you can use something like this (in a .sh file in unix):
_____________________________________________________________
. /opt/IBM/InformationServer/Server/DSEngine/dsenv
for job_name in `/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -ljobs ProjName | grep -v "Status code = 0"` ;
do echo job name: $job_name
/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -logdetail ProjName $job_name > $job_name.`date +%m`.`date +%d`.`date +%H`.`date +%M`.txt
done
_____________________________________________________________
Claudia Bustos Oghia
Post Reply