Hi all,
I have 4 jobs,which should run after one another in the sequence.
i decided to achieve it through job control.
Now my requirement is like:
when run the job control job..
if the first job in the job control Status ='Run failed' or Status ='Crashed'
then i need to create sequential file with the status,error-description,elapsed time for job included in it.
In the same sequential file will be created for all jobs in the sequence if they all fails.
Any help is, appreciated
Creating a text file through Job control code
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 47
- Joined: Wed Apr 18, 2007 4:49 am
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Write a routine which will write these details into your error file and pass the failed job name as parameter. In the routine fetch the job information with DSGetJobInfo. DSJ_JOBSTATUS and DSJ_JOBELAPSED will give you status and elapsed time. All the jobs which fails can call the same routine for error logging.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 47
- Joined: Wed Apr 18, 2007 4:49 am
JoshGeorge wrote:Write a routine which will write these details into your error file and pass the failed job name as parameter. In the routine fetch the job information with DSGetJobInfo. DSJ_JOBSTATUS and DSJ_JOBELAPSED will give you status and elapsed time. All the jobs which fails can call the same routine for error logging.
Hi JoshGeorge,
That was fine.
But actually i want my Text file to be created in a particular directory/filename. Now the point is where should i specify these filename and directory path stuff.I tried this one with the basic function DSMakejob & dsjobreport. But i was unable to create it to the particular location.Hope you got my point.
Thanks,
Deepak