Please help

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
AMedina
Participant
Posts: 1
Joined: Fri Apr 27, 2007 12:19 pm

Please help

Post by AMedina »

My variable is not working.
parameter coming in pErrorFlag = Y
variable: If '#pErrorFlag#' = 'Y' then 1 else 0
Constraint: vError = 1 abort 1 row
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Remove the single quotes from around the variable, i.e.

Code: Select all

If #pErrorFlag# = 'Y' then 1 else 0


p.s. Welcome to DSXChange, but please use more meaningful subject lines in the future.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And you don't need to explicitly set the 1 or 0, the expression will evaluate to that automagically:

Code: Select all

#pErrorFlag# = 'Y'

Is all you need.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

ANother point, if "pErrorFlag" is a job parameter then you dont even need to surround it with hashes within a transformer. Just use is as is. So no quotes and no hashes.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply