[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Name Format Validation



Hi Sandra,
   Here's a "quick" routine that will convert names to "PeopleSoft"
format...

Assuming the variable $name contains 'SMITH,JOE R'...

do ULcase-Format ($name)

$name will now contain... 'Smith,Joe R'

Actually, this isn't really a PeopleSoft 'Name' formatter... I use it
for various requirements... addresses for example...

'NEW YORK'         converts to 'New York'...
'123 SOUTH STREET' converts to '123 South Street'...
'12 N.LAKE ST.'    converts to '12 N.Lake St.'

It simply forces any character to uppercase that follows a blank, comma
or period (add additional symbols if needed)... The primary use for this
routine is converting Mainframe data to PeopleSoft...

Here's the routine...

!**********************************************************************
!*       Upper/Lower Case Formatting                                  *
!**********************************************************************

begin-procedure ULcase-Format(:$ULstring)

let $ULdata      = $ULstring

lowercase $ULdata

let #ULlen       = length($ULdata)
let $ULstring    = ''
let #pos         = 1

let $ULprev      = ' '

while #pos      <= #ULlen

   let $ULchar   = substr($ULdata, #pos, 1)

   if  instr(' ,.',$ULprev,1) > 0
       uppercase $ULchar
   end-if

   let $ULstring = $ULstring || $ULchar
   let $ULprev   = $ULchar
   let #pos      = #pos + 1

end-while

end-procedure

!**********************************************************************

This routine is simple but effective...

                                           -Tony DeLia



Hope, Sandra wrote:
>
> Is there a way to capture the existing PeopleSoft Name format validation
> within an SQR so that data being converted or data already converted (via
> SQR) goes through the PS name format test ?
>
> Thanks All.
>
> Sandra Hope
> DynCorp
> hopes@dyncorp.com
> New Phone:   (703) 264-8674
>
> RESYSTEMIZATION
> PeopleSoft
>
> Sandra Hope
> DynCorp
> hopes@dyncorp.com
> New Phone:   (703) 264-8674
>
> RESYSTEMIZATION
> PeopleSoft

--
Tony DeLia
AnswerThink Consulting Group
PeopleSoft Solutions Practice - Delphi Partners
tdelia@erols.com