Page 1 of 1

dsjob not showing the same status as Director

Posted: Fri Oct 14, 2005 6:35 am
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

Posted: Fri Oct 14, 2005 6:55 am
by kcbland
ummmm, sounds like a bug to me.

Posted: Fri Oct 14, 2005 8:14 am
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).

Posted: Mon Oct 17, 2005 1:25 am
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

Posted: Mon Oct 17, 2005 4:16 pm
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.