parse arg parms name = N_FIX_NAME( parms ) say name exit /* */ /* Returns a string with all words in lower-case but the first character of each word in upper-case. If input has a comma, the prior text is assumed to be a 'last name' and is shifted to the end of the string. . ----------------------------------------------------------------- */ N_FIX_NAME: /*@ */ address TSO arg namedata if Pos( ',',namedata ) > 0 then do parse var namedata ln ',' fn namedata = fn ln /* change order */ end shifted = "" do Words( namedata ) parse var namedata word namedata low = Translate( word,, "abcdefghijklmnopqrstuvwxyz",, "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) word = Left( word,1 )Substr( low,2 ) shifted = Space( shifted word, 1) end /* namedata */ return shifted /*@ N_FIX_NAME */