parcing in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

parcing in datastage

Post 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
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

parcing text

Post 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.
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

parcing text

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply