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

aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Set Project to Compile before execute

Post by aasaif »

I was wondering in the server edition is there a setting you can set so it automatically compiles before running the job. The problem i have is a run a job through an executable and sometimes the job fails it seems i have to recompile the job in order to rerun it
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, you don't. You need to Reset the job, not recompile it. :?
-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 »

Is there anyway to do set the project to reset after run or do i have to run a comand before my execute
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There are two ways commonly used:
a) start the job through a sequence which call the job and is set to automatically reset the job.
b) reset manually using the "dsjob -mode reset"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You want to reset before the next run, not immediately after the failed run - you lose diagnostic information if you do the latter.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh, and off the top of my head:

c) DSPrepareJob() in your own job control code.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

And remember that DSPrepareJob() will return a different job handle if it actually does reset the job.
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

so it my job control i would put something like this

DUMMY = DSPrepareJob("NameofJob")
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

so it my job control i would put something like this

DUMMY = DSPrepareJob("NameofJob")
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Why are we in times before sequencers were introduced ? :roll:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It would be more like "JobHandle=DSPrepareJob(JobHandle)"
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

going foward i will use job sequences however these jobs were done a while back and hoping there is quick and simple way out of it
aasaif
Participant
Posts: 98
Joined: Fri Sep 19, 2008 9:12 am

Post by aasaif »

i am getting the following error
Invalid job handle <Missing or NULL>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'd need to 'attach' to the job first to establish the handle. How about posting the relevant chunk of your job control code?
-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 »

Job1 = DSAttachJob("AuxTimeFactLoad", DSJ.ERRORNONE)
Job1=DSPrepareJob(Job1)

Error
Invalid job handle 0
Post Reply