Hi Friends
I have one if else logic, can share with me how to implement below condition in data stage.
if 1st character of okcucl = 5 then 020
else two first character of okcucl = 65 then 030 else 001
if else logic
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
Assuming you mean in a parallel transformer:
Code: Select all
If Left(InLink.okcucl,1) = '5' Then '020'
Else If Left(InLink.okcucl, 2) = '65' Then '030'
Else '001'
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Hi,jhmckeever wrote:Assuming you mean in a parallel transformer:
Code: Select all
If Left(InLink.okcucl,1) = '5' Then '020' Else If Left(InLink.okcucl, 2) = '65' Then '030' Else '001'
When I tried this logic, not given sufficient result It's giving wrong
I need below kind of data, Please send proper logic
5612 ------020612
6589 --------03089
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
John's response was a COMPLETE ANSWER to your question, which only sought a three-character string.
We at DSXchange are not in the business of supplying a complete solution (though a number of people here are in that business, but only for money).
How about you give some thought to how YOU might go about it (apart from requesting/demanding that someone else solves your problems)?
You have now changed the question.deesh wrote:if 1st character of okcucl = 5 then 020
else two first character of okcucl = 65 then 030 else 001
We at DSXchange are not in the business of supplying a complete solution (though a number of people here are in that business, but only for money).
How about you give some thought to how YOU might go about it (apart from requesting/demanding that someone else solves your problems)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 15
- Joined: Thu May 07, 2009 9:50 pm