converting lower case to upper case of first character

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
srini27
Participant
Posts: 7
Joined: Thu May 09, 2013 10:22 am

converting lower case to upper case of first character

Post by srini27 »

HI,

I am using DS 8.7 Parallel version. I have a requirement like this.

my source is,

FirstName|Middlename|Lastname
john james|david|mcallister john
james|john|mcallister james

I want out put like below.

FirstName|Middlename|Lastname
John James|David|Mcallister John
James|John|Mcallister James

Starting character in every word should be in UPPER case.

Please help me out on this.

Thanks
Srinivas
Srinivas
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

This can be done by using either CAPITALS function or OCONV({Instring},'MCN') in a "Basic Transformer".
mobashshar
Participant
Posts: 91
Joined: Wed Apr 20, 2005 7:59 pm
Location: U.S.

Post by mobashshar »

What have you tried so far?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This can be done by using either CAPITALS transform or OConv(InLink.TheString,"MCT") in a "BASIC Transformer" stage.

In a parallel Transformer stage you could loop through the words in the string and capitalize them individually using

Code: Select all

Upcase(lvTheWord[1,1]):lvTheWord[2,Len(lvTheWord)-1]
where lvTheWord is a loop variable containing

Code: Select all

Field(InLink.TheString, " ", @ITERATION, 1)
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