RE:Hard Code Value

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
m_siddu2000
Participant
Posts: 19
Joined: Tue Aug 01, 2006 1:37 am
Location: Hyderabad

RE:Hard Code Value

Post by m_siddu2000 »

Iam having a Source column name as N/A.I want to enter a hard coded value ab04 in the target column by name p_code.
How do i this?
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

in the mapping by putting the hard code value, for that column
m_siddu2000
Participant
Posts: 19
Joined: Tue Aug 01, 2006 1:37 am
Location: Hyderabad

Post by m_siddu2000 »

keshav0307 wrote:in the mapping by putting the hard code value, for that column

Iam unable to do that in the lookup stage?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

You can not do the hardcoding using lookup stage. Use transformer for that.
Regards,
S. Kirtikumar.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In the Lookup stage you can return the lookup key. You can not assign (derive) values in output columns. Downstream, in a Modify or Transformer stage, test whether that returned key is null; if so, your lookup failed, otherwise your lookup succeeded. Of course, if your Lookup stage has a rejects link, you will only get the successful ones downstream on the main flow. Replace the null with your selected value. For example, in a Modify stage:

Code: Select all

outcol:string[4]=handle_null(keycol,"ab04")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply