dsjob not showing the same status as Director

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
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

dsjob not showing the same status as Director

Post by richdhan »

Hi All,

Iam testing a re-startable sequencer job which has one job activity and a routine activity. In the job activity, the Execution action is - Reset if required, then run.

Iam running the re-startable sequencer job from the command line using dsjob.

When the sequencer aborts for the very first time the output from the command line is as follows

Code: Select all

Waiting for job...      
Finished waiting for job
Job Status      :  (3)  
                        
Status code = 3
When the sequencer aborts the next time onwards the output from the command line is as follows

Code: Select all

Error running job             
                              
Status code = -14 DSJE_TIMEOUT
Eventhough the command line shows the above status, the Director actually shows the right status where the sequencer job starts, resets the job within it and aborts again as the job within the sequencer aborts.

I have already searched the forum but the search results reveal that the Inactivity Timeout should be increased. But in my case it is a very simple job and it hardly takes seconds to report either success/failure.

I would like to know why dsjob is not showing the same status as the Director and what must be done to get the correct status of 3 instead of -14.

Thanks in advance.
Rich
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

ummmm, sounds like a bug to me.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

-14 is an error code from DSRunJob, not a job exit status. It indicates that some resource could not be obtained within the required time.

The job status of 3 is "Aborted". The reason is "timed out waiting for event" (the "event" may have been for the job to start, or to acquire some resource, or to connect to a data source, and so on).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Ray,

In the director the job does not time out waiting for a resource rather it runs and then aborts. Why is that "timed out waiting for event" not showing up in the director whereas it is being shown in the dsjob status.

It is a simple job and uses the following Datastage Basic code in the job control.

Code: Select all

* Open the File :If Success Move Else Abort
      OpenSeq paramFile To theFile Else
         Call DSLogFatal("Aborted --Cannot open ":paramFile, ProgramName)
      End
* Read the STUDY Parameter File
      ReadSeq FileLine From theFile
      On Error
         Call DSLogFatal("Cannot Read ":theFile :" status=":Status(), ProgramName)
      End
      Then
         Studykey=Field(FileLine,",",1)
         StudyNBR=Field(FileLine,",",2)
         StudyEffDt=Field(FileLine,",",3)
      End

* Close the File
      CloseSeq theFile
************Check the Value for Studykey***********
      if Studykey='' then
         Call DSLogInfo("Study Information is not written to the File - Studykey":Studykey:paramFile,ProgramName)
         Call DSLogFatal("Aborted --Cannot open ":paramFile, ProgramName)
      end
Is there any problem with the above code which causes a job status of -14? Pls let me know.

Thanks in advance.
Rich
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put some diagnostic DSLogInfo calls into the code to figure out whether any of it gets executed. I think you will find that it doesn't even get that far.

Copy the job control code from the job sequence and paste it onto the job control tab of a new server job, and add diagnostic calls in that also.

You need to do the detective work. The -14 code usually means that some resource can not be obtained within the desired time. It's not possible, without access to the machine, to determine exactly which resource.

You might also try clearing the job's status file and re-compiling. The status file (RT_STATUSnnn) is where the resource records are stored.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply