find the number of delimiters in the row

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
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

find the number of delimiters in the row

Post by dodda »

hello

i have one requirement where i need to read the first record from the file and count the number of delimters (;) in the row.

ex:
input file first record
123;456;789;234;567;456

then i need that record and count the number of delimters (;).

the count should be 5.

is there a way that i can achive this in the datastage job
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Re: find the number of delimiters in the row

Post by Kryt0n »

dodda wrote:hello

is there a way that i can achive this in the datastage job
Indeed there is... have a read of the String Functions help page
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: find the number of delimiters in the row

Post by gateleys »

Code: Select all

DCount()
gateleys
Post Reply