How can i extract value from a string?

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
bharathappriyan
Participant
Posts: 47
Joined: Fri Sep 23, 2005 6:01 pm

How can i extract value from a string?

Post by bharathappriyan »

Hi,

I want parse the data between CommentBody></CommentBody> in a string. It can be more than one.

Ex: One record has below value.

<CommentHeader>Header1<CommentDate>2013-01-27-14.10.56.000000
</CommentDate><StageNbr>10</StageNbr></CommentHeader><CommentBody></CommentBody><CommentHeader>Header2 <CommentDate>2013-01-29-08.57.55.000000</CommentDate><StageNbr>10</StageNbr></CommentHeader><CommentBody>Data2</CommentBody><CommentHeader>Header2 <CommentDate>2013-01-28-15.49.57.000000
</CommentDate><StageNbr>10</StageNbr></CommentHeader><CommentBody>Data2_1</CommentBody>

Thanks,
Bharathappriyan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Define for us exactly what you mean by "parse the data". Something other than normal XML parsing? Examples are good, too.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply