Job wont Stop

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Job wont Stop

Post by admin »

I want to check information on a job and email a warning if there was a problem (i.e.: too many rejects). DSWaitForJob(JobHandle) only works if a DSRunJob has been issued; it does not work for the current job. I tried using a loop waiting for the job to complete:

Loop While DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)=DSJS.RUNNING Repeat
* examine the job
...


In Director the job still shows a status of Running even though I issued the Stop command. Does anyone know how to kill this
job>

Thanks,


Kenny
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Try the "Cleanup Resources" command in Director.
Just be careful to only kill the job that you want killed.

If there are no processes or locks for the job, then its already stopped. If it still appears as "running", then you have to use the "Clear Status File" command. I usually re-compile a job after clearing its status.

Anthony





"Salstrom, Kenneth" on 04/16/2001 03:48:59 PM

Please respond to informix-datastage@oliver.com

To: "DataStage List (E-mail)"
cc:
Subject: Job wont Stop


I want to check information on a job and email a warning if there was a problem (i.e.: too many rejects). DSWaitForJob(JobHandle) only works if a DSRunJob has been issued; it does not work for the current job. I tried using a loop waiting for the job to complete:

Loop While DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)=DSJS.RUNNING Repeat
* examine the job
...


In Director the job still shows a status of Running even though I issued the Stop command. Does anyone know how to kill this
job>

Thanks,


Kenny
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Anthony,

Thanks, that did it. I figured out what is wrong with my loop; its running within the job its waiting to complete so of course the job never ends. I thought the Job Control sort of ran separately from the part of the job with the stages.

Thanks,

Kenny



-----Original Message-----
From: akerschen@harland.net [mailto:akerschen@harland.net]
Sent: Monday, April 16, 2001 4:05 PM
To: informix-datastage@oliver.com
Subject: Re: Job wont Stop



Try the "Cleanup Resources" command in Director.
Just be careful to only kill the job that you want killed.

If there are no processes or locks for the job, then its already stopped. If it still appears as "running", then you have to use the "Clear Status File" command. I usually re-compile a job after clearing its status.

Anthony





"Salstrom, Kenneth" on 04/16/2001 03:48:59 PM

Please respond to informix-datastage@oliver.com

To: "DataStage List (E-mail)"
cc:
Subject: Job wont Stop


I want to check information on a job and email a warning if there was a problem (i.e.: too many rejects). DSWaitForJob(JobHandle) only works if a DSRunJob has been issued; it does not work for the current job. I tried using a loop waiting for the job to complete:

Loop While DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)=DSJS.RUNNING Repeat
* examine the job
...


In Director the job still shows a status of Running even though I issued the Stop command. Does anyone know how to kill this
job>

Thanks,


Kenny
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Sometimes (hopefully rarely) a jobs status remains Running even though all of its stages have finished. This is caused by a child process (one that runs an active stage) signalling its parent that it has finished, but the signal getting lost in the O/S. In this case the following may help.

Use the Monitor in Director to determine that the stages have all finished. The process ID of each active stage is obtained in the Monitors detail view (double click on a stage name).

Allow enough time for any after-job subroutine to finish.

Use O/S tools (ps in UNIX, Task Manager in WinNT) to ensure that the job is no longer consuming resources (if its executing an after-job subroutine it will be - in this case check for infinite loops in the after-job subroutine code).

Then, if the job is not consuming resources, use "Clear Status File" in Director to reinstate a "runnable" state for the job.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Try using DS.TOOLS in Universe. There is an option to logout a process.

Hope this helps.

Rob

-----Original Message-----
From: Salstrom, Kenneth [mailto:Kenneth.Salstrom@msnyuhealth.org]
Sent: Monday, April 16, 2001 3:49 PM
To: DataStage List (E-mail)
Subject: Job wont Stop

I want to check information on a job and email a warning if there was a problem (i.e.: too many rejects). DSWaitForJob(JobHandle) only works if a DSRunJob has been issued; it does not work for the current job. I tried using a loop waiting for the job to complete:

Loop While DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)=DSJS.RUNNING Repeat
* examine the job
...


In Director the job still shows a status of Running even though I issued the Stop command. Does anyone know how to kill this
job>

Thanks,


Kenny
Locked