Hi ALL

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
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Hi ALL

Post by pradeep_nov18 »

If Source is having

A(I/P) b(o/p)
123.14A123 123.14A
4563.67A34 4563.67A
1A45322111 1A

'A' can be any where in source.please let me know how to achieve this.

Can anyone help me on this?thanks in advance for your reply!
pradeep.v
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

find the position of A and read 1 to that position.

one option is to use

Field(%string%,%delimiter%,%occurrence%,[%number%])
shaonli
Participant
Posts: 80
Joined: Tue Nov 28, 2006 6:52 am

Post by shaonli »

You can achieve this by using Index function which finds starting character position of substring.
Target=Inputcol[1,Index[Inputcol,'A',1]].
Please try this

Thanks
Shaonli
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Hi

Post by pradeep_nov18 »

keshav0307 wrote:find the position of A and read 1 to that position.

one option is to use

Field(%string%,%delimiter%,%occurrence%,[%number%])
Hi Keshav

Field(in.col,,1,) in Number can have any value and delimiter wat we have to give please can you Elaborate since there is no delimiter and number cannot be predicted
pradeep.v
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Thanks

Post by pradeep_nov18 »

shaonli wrote:You can achieve this by using Index function which finds starting character position of substring.
Target=Inputcol[1,Index[Inputcol,'A',1]].
Please try this

It should work

Thanks Shaolni


Thanks
Shaonli
pradeep.v
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

A is the delimiter
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Thanks

Post by pradeep_nov18 »

keshav0307 wrote:A is the delimiter

thanks keshav number should be 1 right.
pradeep.v
Post Reply