Job Log

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

Post Reply
deepbanerji
Participant
Posts: 14
Joined: Fri Sep 03, 2004 2:50 pm
Location: NJ

Job Log

Post by deepbanerji »

Hi,
I have around 10 server jobs sequenced in a sequencer. The main sequencer job will run through autosys daily. I need all the Aborted Jobs Log and all the warning to be emailed to the Production supervisor. Could anybody please advise me on this.

Thanks,
Deep
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you look at the options that the UNIX command "dsjob" gives you I think it would be best to incorporate the checking for aborted/incomplete jobs and e-mailing of job logs in a UNIX shell script.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
As metioned in the last post, you should use Unix dsjob command
You cna write a small shell script which will invoke UNix dsjob command.
Pass the parameter like -report to this command.
Capture the out of the dsjob comand to a file.
Use grep command to search for lines with status code <> 0.

To the calling shell script, you will need to pass the name of all the jobs you want to look for.


Ketfos
DaleK
Premium Member
Premium Member
Posts: 68
Joined: Fri Jun 27, 2003 8:33 am
Location: Orlando

Post by DaleK »

Are the log entries really nessecary?

The reason I as is if you are using a sequence job, you can add a notification stage to each of the jobs and set the trigger to send an email if the job finishes with an abort or warning. In the subject you can use
Job #Job_Activity_0.$JobName# finished with a status of #Job_Activity_0.$JobStatus#
Plus in the body you can include the final stats for the job. However, it will not include all of the log entries for that run.

If the first action for the person troubleshooting a problem is to log into the director then why take the time to write a fancy little script to capture that info.

If you must have the Log entries, then I guess I would try to use the execute command to run the script with the dsjob command in it, and can use the same trigger logic as above. I believe in the parameters for that stage you can use #Job_Activity_0.$JobName#, so you can develop a reusable script.

hope this helps
Post Reply