Constraint 0=1

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
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

Constraint 0=1

Post by ranga1970 »

Folks,
this is first time i am working for production support, I did develop lot of projects, so sorry for bombadring with stupid question, here is my todays question

in the constraint I find 0=1 and this is link is used to do bulk load using ORABULK, can some tell me what does this mean

thanks
ranga
RRCHINTALA
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

This can never evaluate to TRUE, so this constraint is equivalent to @FALSE. If it's connected to a ORABULK stage, chances are the data file being used is generated by a second output link.

Because the ORABULK stage has HUGE overhead, a trick a lot of customers were told to use is to let DataStage generate the control file, but not the data file. A second link would output the data file. An after-job routine would actually execute sqlldr and either dynamically update the control file to use the other file instead of the empty one the ORABULK stage generated, or blow away that file and either symbolic link to the real one or rename the real one to what the control file uses.

Either way, the purpose is to bypass the ORABULK stage generating the actual data file to load.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: Constraint 0=1

Post by PhilHibbs »

ranga1970 wrote: ...in the constraint I find 0=1...
I just use a constraint of 0 to disable output from a stag for testing purposes. I often have this as one or more job parameters, e.g. "Create_CSV" and "Create_IDoc" defaulting to 1 and 0 at the project level. When the project goes live, the defaults are swapped.
Phil Hibbs | Capgemini
Technical Consultant
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Another example of how a simple annotation in a job could make life so much easier. I think whenever you do something unconventional in a job you should put an annotation on the job canvas.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

vmcburney wrote:Another example of how a simple annotation in a job could make life so much easier. I think whenever you do something unconventional in a job you should put an annotation on the job canvas.
I wouldn't describe using a comparison or a zero value in a boolean condition to be "unconventional".
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

All Vince meant was that the 'conventional' DataStage constraint would use @FALSE to shut down a link. Much less confusing for peoples not intimately familiar with 0 and 1 and which is true and which is false. :wink:

Or at least that's my mind reading attempt for the morning.
-craig

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