I want a script to view the complete log information of data stage job from UNIX IBM AIX.

Hi,

I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment.

Can you please help me out by give the script.

Thanks in advance...

We can help you to write a script on your own and for that we need your exact requirement, sample inputs and output required.

We just can't write a script for you :slight_smile:

I found the solution for display the log info by use the following command

dsjob -logdetail <project name> <job name> >> log.txt

shows full log of the job and writing the log file as we directed.

But same thing i want a script for multiple jobs to check the complete log detail and job status.

dsjob -jobinfo <project name> <job name> >> log1.txt

Since i am new to unix shell script I started learing script.

Thanks in advance

---------- Post updated at 04:24 AM ---------- Previous update was at 04:23 AM ----------

If you are making that command to execute for multiple jobs it will be great for me..

How many jobs do you have in your list?

total we have 10 sequnce jobs.

---------- Post updated 01-04-13 at 01:13 AM ---------- Previous update was 01-03-13 at 08:35 AM ----------

I want only aborted jobs status from those 10 sequncers...

@victory:

So, does this command

dsjob -jobinfo <project name> <job name> >> log1.txt

gives you the job status alone? or the full details? Can you please post some example output of that command as well? I don't think this is hard to get it done for 10 jobs :slight_smile:

#!/bin/ksh
echo `touch /home/afuarc2/$i.jobstatus.txt`
for i in INT_SEQ_MST_PLM_RMS_SKU_PACK_000 INT_SEQ_MST_PIM_LEG_ORG_DIV_REG_000 

do
   `dsjob -logdetail SMART $EachLine >>  `
done > /home/afuarc2/JobList.txt 

I have prepared the above script to get the log files in home directory.
But I want those files to my mail id.

I tried echo <subject> | mail -v <mail id> .

how to add this command to my script to get the log to my mail id.

---------- Post updated at 06:44 AM ---------- Previous update was at 06:43 AM ----------

can you please help me out.

consider this one
joblist - file with all the job names

#/bin/sh
echo "Script starting"
cat /PATH/joblist | while read JOB
do
dsjob -logdetail SMART $JOB > $JOB.log
done

Regarding the mail thing, we will have to know what all do you have installed. For example, mail | mailx | sendexchage | mutt and so on..

Please let us know what do you have installed in your system!