Page 1 of 1

parcing in datastage

Posted: Mon May 08, 2006 1:57 pm
by sainath
Hi
I have a MSC text column and i have to to parscing based on following conditions.

1.search for ( ) and then data in ( ) have intch code,PNO,text.if found populate this data in seperate columns .

can you tell how i can do in datastage.
thks

Posted: Mon May 08, 2006 2:31 pm
by kcbland
Sounds like you need to write a DS Function that will do your specific string parsing. Useful DS BASIC string functions are INDEX, FIELD, SUBSTR, LEFT, RIGHT, and COUNT.

parcing text

Posted: Mon May 08, 2006 6:41 pm
by sainath
Hi
I dont have any delimitors between each feild in order to use the
DS functions.
can any one please share your idea for problem solving.
thks
sai



I have a MSC text column and i have to to parscing based on following conditions.

1.search for ( ) and then data in ( ) have intch code,PNO,text.if found populate this data in seperate columns .

can you tell how i can do in datastage.
thks



kcbland wrote:Sounds like you need to write a DS Function that will do your specific string parsing. Useful DS BASIC string functions are INDEX, FIELD, SUBSTR, LEFT, RIGHT, and COUNT.

parcing text

Posted: Mon May 08, 2006 6:42 pm
by sainath
Hi
I dont have any delimitors between each feild in order to use the
DS functions.
can any one please share your idea for problem solving.
thks
sai



I have a MSC text column and i have to to parscing based on following conditions.

1.search for ( ) and then data in ( ) have intch code,PNO,text.if found populate this data in seperate columns .

can you tell how i can do in datastage.
thks



kcbland wrote:Sounds like you need to write a DS Function that will do your specific string parsing. Useful DS BASIC string functions are INDEX, FIELD, SUBSTR, LEFT, RIGHT, and COUNT.

Posted: Tue May 09, 2006 4:55 am
by ray.wurlod
Doesn't matter. You can extract the contents of the parentheses with Field(Field(TheString, "(", 2, 1), ")", 1, 1) - possibly having used the Index() function in an If statement to determine whether there are parentheses.