stage variable 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
sush26283
Participant
Posts: 68
Joined: Thu May 20, 2010 11:55 am

stage variable help

Post by sush26283 »

Hi am pretty new with datastage and working on parallel extender 7x..
am having problem with setting up the stage variable and beeded some help with the code.

i need to select the first position of abc_def= C from the incoming link and i used the following function Left("C",1)link.abc_def but it says SYNTAX ERROR

also i need to set the stage variable for count of records where abc_def = I and xyz_mno = EM

can anyone please help me with it..
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Use this to check whether first character is C

Code: Select all

link.abc_def[1,1] = 'C'
Use aggregator to count on abc_def and xyz_mno

If you can give sample input and expected output, we can help you better
You are the creator of your destiny - Swami Vivekananda
sush26283
Participant
Posts: 68
Joined: Thu May 20, 2010 11:55 am

Post by sush26283 »

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

Post by chulett »

If you want to see the correct syntax for your previous effort:

Code: Select all

Left(link.abc_def,1) = 'C'
That could be done as part of an if-then-else construct or left as-is to set a boolean value in a stage variable or constraint.
-craig

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