Page 1 of 1

DSJOB syntax for all jobs in a project

Posted: Sun Nov 16, 2008 11:25 pm
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

Posted: Mon Nov 17, 2008 1:21 am
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.

Posted: Mon Nov 17, 2008 1:47 am
by G.K.K
how to write that loop.. pls say that ..if possible pls give the command for that

thanks
kamal

Posted: Mon Nov 17, 2008 2:15 am
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.

Posted: Thu Jun 03, 2010 2:06 pm
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
_____________________________________________________________