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
Post
by aasaif » Fri Feb 20, 2009 8:29 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Feb 20, 2009 8:31 am
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 » Fri Feb 20, 2009 8:38 am
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 » Fri Feb 20, 2009 8:48 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Feb 20, 2009 8:55 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Feb 20, 2009 8:56 am
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 » Fri Feb 20, 2009 9:39 am
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 » Fri Feb 20, 2009 10:07 am
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 » Fri Feb 20, 2009 10:07 am
so it my job control i would put something like this
DUMMY = DSPrepareJob("NameofJob")
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Feb 20, 2009 10:18 am
It would be more like "JobHandle=DSPrepareJob(JobHandle)"
aasaif
Participant
Posts: 98 Joined: Fri Sep 19, 2008 9:12 am
Post
by aasaif » Fri Feb 20, 2009 10:20 am
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 » Fri Feb 20, 2009 1:17 pm
i am getting the following error
Invalid job handle <Missing or NULL>
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Feb 20, 2009 3:48 pm
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 » Mon Feb 23, 2009 8:30 am
Job1 = DSAttachJob("AuxTimeFactLoad", DSJ.ERRORNONE)
Job1=DSPrepareJob(Job1)
Error
Invalid job handle 0