Status of a Job

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

Status of a Job

Post by admin »

I need to be able to check the status of a DataStage job from a VB program. Specifically, I need to check to see if a certain job is running before loading some information into a file that would cause to job to get angry.

Can anyone tell me what file and record(s) I would look at in the project account to see that kind of thing?

Regards,

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

Post by admin »

This really is something you should be asking the support centre.

The short answer is that its in the RT_STATUSnn file (table), where nn is the job number associated with the job (mappings are in the DS_JOBS file (table)).

The longer answer is that you need to know the wave number with which the job is currently executing. Its all very messy.

It may be easier to use a Command object to execute an operating system command such as DOS /C "dsjob -jobinfo projectname jobname" and parse its output. Use "SH -c" rather than "DOS /C" for UNIX servers.

-----Original Message-----
From: Moderator [mailto:moderator@oliver.com]
Sent: Thursday, 12 April 2001 08:55
To: informix-datastage@oliver.com
Subject: Status of a Job


I need to be able to check the status of a DataStage job from a VB program. Specifically, I need to check to see if a certain job is running before loading some information into a file that would cause to job to get angry.

Can anyone tell me what file and record(s) I would look at in the project account to see that kind of thing?

Regards,

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

Post by admin »

You might want to try adding vmdsrpos.dll as a reference in your project.
You could then check the status of the last event in the log for the job you are executing (aborted, running, reset, never run...). This could be called within a timer object. You can do this by attaching to the log using log.attach, getting the last event from Log.GetDetails, and the status from ExecJob.GetStatus.

Regards,
Mark


-----Original Message-----
From: Moderator [mailto:moderator@oliver.com]
Sent: Wednesday, April 11, 2001 6:55 PM
To: informix-datastage@oliver.com
Subject: Status of a Job


I need to be able to check the status of a DataStage job from a VB program. Specifically, I need to check to see if a certain job is running before loading some information into a file that would cause to job to get angry.

Can anyone tell me what file and record(s) I would look at in the project account to see that kind of thing?

Regards,

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

Post by admin »

Wednesday, April 11, 2001, 6:12:35 PM, you wrote:

> This really is something you should be asking the support centre.

Your opinion, not mine. I wanted to chat with my fellow DataStage users first to see if someone else had solved this. Thats what the list is here for. It was a question of technique, not a support issue.


> job is currently executing. Its all very messy.

Eek. Sounds messy.


> It may be easier to use a Command object to execute an operating
> system command such as DOS /C "dsjob -jobinfo projectname jobname"
> and parse its output.

Duh! Why didnt I think of the simple solution?

Thanks, Ray. I appreciate it.

Regards,

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

Post by admin »

Thanks, Mark.

In this case, Rays solution of simply shelling a dsjob command and looking for a Job Status of RUNNING is just what I needed. (Im still embarrassed I didnt think of it. Oh, well. Wont be the last time, Im sure :-)

Regards,

Clif


Thursday, April 12, 2001, 8:10:00 AM, you wrote:

> You might want to try adding vmdsrpos.dll as a reference in your
> project.
Locked