QTP Converting surnames : SMITH-HENDERSON to Smith-Henderson

Seamus Browne Seamus.Browne@partage.org
Tue, 14 Dec 2004 18:28:35 +0100


Hi all,
Thanks for the info on Quiz and the 256 char limit on page width.
The problem solved is now using QTP, as suggested here yesterday.

Today's pb is about surnames aka "family names".
All our surnames are in block capitals.
SMITH 
JONES
GALBRAITH
Etc.

I would like to get them into this kind of style 
Smith 
Jones
Galbraith
Aka "Initialised"

I can manage that myself using UPSHIFT on the first letter and downshift
on the rest.

But records which have combined surnames such as 
	SMITH-HENDERSON
	WITHERBY-JONES 
	HUDSON MCGINTY
	UGADA BUGADA
are giving me  headache.

Some records have these combined surnames with hyphens, others just with
spaces.

How can I get QTP to transform 
	SMITH-HENDERSON
	WITHERBY-JONES 
	HUDSON MCGINTY
	UGADA BUGADA
into 
	Smith-Henderson
	Witherby-Jones 
	Hudson McGinty
	Ugada Bugada   ????

And where in my current prog would I do the replacing ?
Here's the (snipped) prog as it is.

------------------------------
Can cle
Set def

:purge  lclient
:purge  lclientq

acc clients
set process limit 200;000

temp TBL-NUM INT SIZ 2 
Item TBL-NUM        = 9

Temp TBL     CHAR *  1 
Item TB    = CHAR(TBL-NUM)[2:1]

Temp    a-Client-num    varchar * 8  
Item    a-Client-num  = trunc(asc(Client-num ,6)) + trunc(tbl)

Temp    a-Client-Surname varchar * 34
item    a-Client-Surname = trunc(Client-Surname) + trunc(tbl)
...

Temp packet varchar * 760  
Item packet   =                            &,

  trunc(a-Client-num              +        &,
        a-Client-Surname          +        &,
....
       )        

subfile lclient   portable keep            &,
include packet 

go

:print lclientq

----------------------------------------

TIA

Scottie Hannigan.