Set Project to Compile before execute

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

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to figure out exactly where things go wrong. Add breadcrumbs... calls to DSLogInfo() after every step and see where the trail ends.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

sorry i posted my original before i fixed it

this is what i put in the job control and the project just started but wouldnt run

hJob1 = DSAttachJob("AuxTime",DSJ.ERRFATAL)
If NOT(hJob1) Then
Call DSLogFatal("Job Failed: AuxTime","Job")
Abort
End
ErrCode = DSRunJob(hJob1, DSJ.RUNNORMAL)
Status = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

this is the error i am getting
JobControl (fatal error from DSAttachJob): Job control fatal error (0)
(DSCloseJob) Cannot refer to own job handle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your problem is right there in the error message, a job cannot attach to itself. If you really need to do that, skip the attach and use DSJ.ME as the job handle.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

yeah but when i do that i get this warning
AuxTime..JobControl (DSPrepareJob): Cannot refer to own job handle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course. Why would you need to reset a running job? This is something one job would do for another, not for itself. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

so basically there is no way to force a project to automatically recompile before running

I guess i will do reserch maybe i will have to run a dos command that compiles the job then run one that runs the job
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, we've been discussing the way to reset a job. However, that's what your job control should be doing before it runs the job as the job can't do it to itself. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply