How can i acheive this in Datastage?
for (i=0,n=0,i<9,i++)
{
n+=(10-i)* x.charat(i)
}
If anyone help me on this it is very helpfull for me.
Thanks in advance
how can i acheive this code in Datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
What have you tried ?
What value you expect to be derived using the mentioned logic ?
Is that the full logic or something that must happen for each row ?
FYI, we can call external routine from DataStage.
To achieve your output, you can use a row generator for i and stage variable for n.
Alternatively deduce your output and stick it as text values.
What value you expect to be derived using the mentioned logic ?
Is that the full logic or something that must happen for each row ?
FYI, we can call external routine from DataStage.
To achieve your output, you can use a row generator for i and stage variable for n.
Alternatively deduce your output and stick it as text values.
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
thank you srinivasanSainath.Srinivasan wrote:What have you tried ?
What value you expect to be derived using the mentioned logic ?
Is that the full logic or something that must happen for each row ?
FYI, we can call external routine fro ...
actually i want to implement that for loop in the datastage
once i got the 'n' value,i will concatenate that value with 'x'.
so please help me on this
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
9 * x.charat[1,1] + 8 * x.charat[2,1] + 7 * x.charat[3,1] + 6 * x.charat[4,1] + 5 * x.charat[5,1] + 4 * x.charat[6,1] + 3 * x.charat[7,1] + 2 * x.charat[8,1] + x.charat[9,1]
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.