Focal Point
Converting text to InitCap

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8061034842

September 24, 2007, 02:56 PM
<msam>
Converting text to InitCap
Hi All,
Is there a Function in WebFOCUs to convert the String to InitCap.
Eg: "CAR" to "Car" and "COUNTRY" to "Country"

Regards,
MSAM
September 24, 2007, 02:59 PM
Jason K.
there is in most databases, or you can create a function on your database to do it.

I'm not sure about webfocus, it's just another option.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
September 24, 2007, 03:12 PM
Leah
There is a function that converts words, I'm home so don't have the exact name, believe it is LCWORD


Leah
September 24, 2007, 03:13 PM
<msam>
Thanks for the Info Jason !!!
September 24, 2007, 03:14 PM
ET
I think you wnat to use the function lcword like this.

DEFINE FILE CAR
KOUNTRY/A10=LCWORD(10,COUNTRY,'A10');
END
TABLEF FILE CAR
PRINT COUNTRY KOUNTRY
END

COUNTRY KOUNTRY
------- -------
ENGLAND England
FRANCE France
ITALY Italy
JAPAN Japan
W GERMANY W Germany

good luck

et


FOCUS 7.6 MVS PDF,HTML,EXCEL
September 24, 2007, 03:16 PM
Francis Mariani
In WebFOCUS the function is called LCWORD.

The syntax:
LCWORD(length, string, outfield)

An example:
SYSTEMDESC/A40 = LCWORD(40, SYSTEM_DESC, 'A40');

Take a look at "Character Functions" in the Function Reference document.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 24, 2007, 04:01 PM
<msam>
Thank you All .It's working i,e LCWORD...

Regards,
MSAM
September 25, 2007, 08:42 AM
Jason K.
msam: sorry, I suppose since your original post even referenced the oracle (?) function InitCap, you probably already know that you can do this in the SQL world.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.