Job is showing running status after exit

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
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Job is showing running status after exit

Post by Das »

Hi,

I have one issue as follows.In Datastage control jobs i have written a code as below inside a while loop.

If count > 3 then
Call Dslogwarn("Failure");
exit
end if

While i am running the job the count become >3 and the job is giving the Call Dslogwarn("Failure") message in director log .Normaly it shoud exit and job should stop .But it still showing status "running " in director .what is the reason for that.



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

Post by ArndW »

Issuing a call to DSLogWarn() does not trigger a job failure, that's what DSLogFatal() is used for.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

It will just give a Warning with "Failure" as message in it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Post by Das »

ArndW wrote:Issuing a call to DSLogWarn() does not trigger a job failure, that's what DSLogFatal() is used for. ...
OK..But i think when it finds the exit it will exit from the loop..and continue with the statements outside the loop...
After exicuting that eithr it will abort or finish ?But here it showing "Running"Status infinately..?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What is your while condition?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

When you execute DSLogFatal() it does not return; the program immediately terminates. It is good practice to code in a loop exit, but it is not required. When DSLogFatal() is called by DS/BASIC code when not running as part of a job, i.e. when being tested in a user written routine, it will return to the caller, which is why I always code as though program control returns to the caller.
Post Reply