Focal Point
Converting input variable to upper case?

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

February 02, 2007, 09:25 AM
mark66
Converting input variable to upper case?
Hi all,

This should hopefully be a real easy one, but at the moment I don’t know how to do it.

We receive report selection criteria into our reports from htm screens. When the user inputs characters as lower case the report does not find the data as everything in our database is in upper case.

I have found the UPCASE command, but this is for converting database data to upper. I need covert a program variable to upper, before querying the database with it.

Thanks

Mark.


WebFocus 765. iSeries v5r4
February 02, 2007, 09:45 AM
mgrackin
You can use UPCASE for what you need to do:


-SET &INPUTVAR = UPCASE(&INPUTVAR.LENGTH,&INPUTVAR,'A&INPUTVAR.LENGTH');


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
February 02, 2007, 10:40 AM
mark66
Perfect! Thanks Mickey Smiler

I didn't realise the .LENGTH function was available.


WebFocus 765. iSeries v5r4
February 02, 2007, 10:52 AM
TexasStingray
Another option is to use javascript and convert it to upper case. This way the user will realize that it should be upper case.

Scott




Scott

with one wee caveat

-SET &MYNAME = 'SUSANNAH   ';
-*this gives you 11
-TYPE &MYNAME.LENGTH
-*but this gives you 8
-SET &ALEN = ARGLEN( &MYNAME.LENGTH , &MYNAME , 'I2');
-TYPE &ALEN

ARGLEN is a tighter function, and will measure without the trailing spaces.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID