DSD.GetStatus - Improper data type

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
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

DSD.GetStatus - Improper data type

Post by TBartfai »

Hi,

I tried to search on my error, but I have not found any regarding answers.
It is a sequencer job, what was working fine. But from today it is giving the following message in the relevant file in &PH& dir:

Code: Select all

Program "DSD.GetStatus": Line 25, Improper data type.


And the status of the sequencer remains Running.

I have checked the RT_BP file, but it could not help.
It aborts after calling the first job in the sequencer. This job is finishing successfully all the time.

I think this is the relevant code pieclet:

Code: Select all

L$V0S93$FINISHED:
   job$V0S93$status = DSGetJobInfo(h$V0S93, DSJ.JOBSTATUS)
   job$V0S93$userstatus = DSGetJobInfo(h$V0S93, DSJ.USERSTATUS)
   summary$<1,-1> = Time$$:Convert(@VM, " ", DSMakeMsg("DSTAGE_JSG_M_0063\%1 (JOB %2) finished, status=%3[E]", "GetRequest_Types":@FM:jb$V0S93:@FM:job$V0S93$status))
   IdV0S93%%Result2%%1 = job$V0S93$userstatus
   IdV0S93%%Result1%%2 = job$V0S93$status
   IdV0S93%%Name%%3 = jb$V0S93
   rpt$V0S93 = DSMakeJobReport(h$V0S93, 1, "CRLF")
   dummy$ = DSDetachJob(h$V0S93)
   If b$Abandoning Then GoTo L$WAITFORJOB
   If (IdV0S93%%Result1%%2 <> DSJS.RUNOK) Then GoSub L$V0S142$START
   GoTo L$V0S95$START
L$V0S93$RETURN$2:
   If (IdV0S93%%Result1%%2 <> DSJS.RUNFAILED) Then GoTo L$V0S122$START
L$V0S93$RETURN$3:
   GoTo L$WAITFORJOB

L$WAITFORJOB:
   If handle$list = "" Then GoTo L$FINISH
   handle$ = DSWaitForJob(handle$list)
   If handle$ = 0 Then handle$ = handle$list<1>
   Locate handle$ In handle$list Setting index$ Then
      id$ = id$list<index$>
      Del id$list<index$>; Del handle$list<index$>
      b$Abandoning = abort$list<index$>; Del abort$list<index$>
      loop$context = context$list<index$>; Del context$list<index$>
      Del jobnames$list<index$>
      Begin Case
      Case id$ = "V0S93"
         GoTo L$V0S93$FINISHED
      Case id$ = "V0S100"
         GoTo L$V0S100$FINISHED
      Case id$ = "V0S105"
         GoTo L$V0S105$FINISHED
      Case id$ = "V0S161"
         GoTo L$V0S161$FINISHED
      Case id$ = "V0S162"
         GoTo L$V0S162$FINISHED
      Case id$ = "V30S0"
         GoTo L$V30S0$FINISHED
      End Case
   End
* Error if fall though
   handle$list = ""
   err$source = "@Coordinator"; err$number = -1
   msg$ = DSMakeMsg("DSTAGE_JSG_M_0008\Error calling DSWaitForJob(), code=%1[E]", handle$)
   msg$id = "@Coordinator"; GoTo L$ERROR
Any help and idea would be very appreciated.

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

Post by ArndW »

Tamas,

a quick look at the DSD.GetStatus routine shows that it is accessing the file variable (the job's status file). The error message means that this file has not been "opened" or that somehow else the file pointer has been invalidated. This file pointer is set as a function of the DSAttachJob() call; so my assumption is that, in your code snippet, the h$V0S93 handle is incorrect.

The code generated is most likely correct, as it did work for you before; but something else around your job must have changed. Was the job's last run "OK" or did it have an aborted status that was reset from the sequencer?
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

Post by TBartfai »

ArndW wrote: The code generated is most likely correct, as it did work for you before; but something else around your job must have changed. Was the job's last run "OK" or did it have an aborted status that was reset from the sequencer?
First of all thanks for your quick reply.
I could not find any aborted runs. I also tried to delete the job and the caller sequencer job, and re-import them. I also tried to restart the datastage server.
None of them helped :(

The job itself is very simple: reading rows from a sequential file, and concatenating strings from one of the columns. Then it passes the string as a userstatus. For successful compilation it has an output file as well, but because of the constraint it is not putting data there (1=2 , and also the output file name is /dev/null).
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you still have the problem if you make your sequence call only the one job and do nothing else?
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

Post by TBartfai »

ArndW wrote:Do you still have the problem if you make your sequence call only the one job and do nothing else?
I deleted everything, only 1 stage remained, the calling of the job.
It is finished successfully, but with the following strange info:

Code: Select all

IF9MIF_LTRC_SEQ_CollectionLetter..JobControl (DSWaitForJob): Job IF9MIF_LTRC_GetRequestTypes.GetRequestTypes has finished, status = 99 (Not running)
When I go to the job in DS Director, I can see the job name without any status (neither running, aboted nor other statuses). I can see the job name with the invocation id I am using with finished status, but when trying to see the log it gives:

Code: Select all

Log view not available - No job selected
But I am able to see the logs when selecting on the job with no status.
gpatton
Premium Member
Premium Member
Posts: 47
Joined: Mon Jan 05, 2004 8:21 am

Post by gpatton »

You state that you are using an invocation id to run the sequencer.

Do all the jobs that the sequncer calls have "Allow multiple Instance" turned on?

Did you call them using the invocation id?

After you reimported the jobs did you validate them with the correct invocation id?
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

Post by TBartfai »

gpatton wrote:You state that you are using an invocation id to run the sequencer.

Do all the jobs that the sequncer calls have "Allow multiple Instance" turned on?

Did you call them using the invocation id?

After you reimported the jobs did you validate them with the correct invocation id?
Hi,

The sequencer is not called by multiple instance, only the job.
The "Allow ..." is turned on, and I call the job with the invocation id.
I tried to reimport again, but clicking on validate nothing happens.
I also tried to rename the job and run it, but it acts the same.
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

Re: DSD.GetStatus - Improper data type

Post by TBartfai »

The problem is with one of the stage variables:

Code: Select all

IF9DSR.UtilitySetUserStatus(svAccumulator)
This routine's code is the following:

Code: Select all

$INCLUDE DSINCLUDE JOBCONTROL.H

Call DSSetUserStatus(Arg1)


Ans=0
Without the abovementioned variables everything goes fine.
TBartfai
Premium Member
Premium Member
Posts: 15
Joined: Wed Jul 28, 2004 5:26 am

Re: DSD.GetStatus - Improper data type

Post by TBartfai »

I finally find the solution. In the big amount of the data input we had an empty field.

This caused the job to pass null value to the DSSetUserStatus function.

Thanks for your ideas and help!
Post Reply