log summary past a date

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

mystuff
Premium Member
Premium Member
Posts: 200
Joined: Wed Apr 11, 2007 2:06 pm

Post by mystuff »

Thanks to all for their feedbacks.

Using the feed backs from everyone. I wanted to do it this.

I want to obtain summarized logs since the last run (I don't want to have a seperate file to maintain the id, would like to implement everything in this script or calling a datastage job to send the recent id).

I wrote a small skeleton structure to do this task. Please let me know if I am falling into any pit.

Code: Select all

newestid = xxx (from dsjob -logdetail PROJECT JOB)
var_toggle=0

while line LINE
do
  $(echo "$LINE" | grep -qe [^$newestid]) && var_toggle=1
  if var_toggle -eq 1
     echo $LINE
  fi
done << `dsjob -logsum PROJECT JOB`
In the above code I am searching for the last run id at the beginning of the the. So any information after that I will write them to the output.

Am I neglecting anything over here?
Post Reply