Viewing logs outside of datastage director

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
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Viewing logs outside of datastage director

Post by aartlett »

This is a simple tool I wrote a while ago to view a job log without director. As the remote access I have to use is dial up, going into director can be ... tiresome.

I call the file dslogs.ksh. Usage is
dslogs.ksh [jobname] [projectname] > [outputfile]

Redirection of output is not strictly necessary, just easier. This especially good when the jobs output a large log.

This is a UNIX app, should be fairly easy to rewrite as a dos cmd for windows users though.

Here's the code:

JOBNAME=$1
PROJECT=$2


integer startrec=`dsjob -logsum -type STARTED ${PROJECT} ${JOBNAME}|tail -4|grep STARTED|awk '{print $1}'|head -1`
integer endrec=`dsjob -logsum -type STARTED ${PROJECT} ${JOBNAME}|tail -4|grep STARTED|awk '{print $1}'|tail -1`

integer i=${startrec}

echo "logs for ${JOBNAME} of ${PROJECT} from record ${startrec} to ${endrec}"

while ((i <= ${endrec} ));
do
command="dsjob -logdetail ${PROJECT} ${JOBNAME} ${i}"
# echo ${command}
${command}
((i = i + 1 ))
done
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course, if you have DataStage 7.5 or later, you can have Director on your PDA.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

ray.wurlod wrote:Of course, if you have DataStage 7.5 or later, you can have Director on your PDA.
Still doesn't help if you have only dialup for remote access to your site. But PDA access could be fun:)
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
Post Reply