How to do initial cap for every letter

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
BMSK
Participant
Posts: 41
Joined: Wed Feb 06, 2008 7:00 am
Location: Bangalore

How to do initial cap for every letter

Post by BMSK »

Hi All,

I have input lik this "i have pen and i am ussing for writing books". this should be converted into " I Have Pen and I Am Using for Writing Books".

I want to convert into every begin letter into Captial letter except the word like and, for, or, a , is, these should be small letter.

How can achive this.

i had don using Basic transformer CAPITALS(DSLink103.PHRASEOLOGY) using this function. but it cinvert every begining word into captial.

thank you all
bmsk.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's what it does, every word. All I can think of is to do a series of EReplace() calls afterwards, setting ' And ' back to ' and ', etc. Hopefully someone has a better idea.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Write your own custom routine.

As soon as Craig mentions "and" as an exception you will realise that you need more exceptions, such as "or", "etc." and so on. The list of exceptions is much more easily handled by a custom routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Plus you'll notice that the "and" I mentioned was actually " and " - the spaces are there on purpose. Not a trivial task, regardless.
-craig

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