Page 1 of 1

Seperating the string

Posted: Wed Sep 27, 2006 8:17 am
by thatiprashant
Hi Guys.

I am working on mainframes and looking to split the colum info into two parts as i get the data like #kkkkkkkk# 19,trdgar place, USA
i need to seperate the field with address in one column and the other part in # # be in another columns... and they are not fixed width.

Any help is much appreciated.

Thanks
Prashant

Posted: Wed Sep 27, 2006 9:12 am
by keshav0307
try Field(%string%,%delimiter%,%occurrence%,[%number%]) function

Posted: Wed Sep 27, 2006 9:52 am
by thatiprashant
keshav0307 wrote:try Field(%string%,%delimiter%,%occurrence%,[%number%]) function
thanks keshav for ur reply...

actually it is not the number it always starts with after # # this data.

thanks

Posted: Wed Sep 27, 2006 9:53 am
by thatiprashant
keshav0307 wrote:try Field(%string%,%delimiter%,%occurrence%,[%number%]) function
thanks keshav for ur reply...

actually it is not the number it always starts with after # # this data.

thanks

Posted: Wed Sep 27, 2006 3:10 pm
by ray.wurlod
You are going to need to assemble the fields into a single field, so that a string such as the one in your original post occurs. Then apply the Field() function to that, returning everything after the second "#" character.

Code: Select all

Field(assembled_data, "#", 3, Count(assembled_data, "#") - 1)
If you get unusual "job parameter" errors, change "#" to some other character when creating the assembled_data string.