• Subject: Re: Convert uppercase to mixed case
  • From: "Carsten Flensburg" <novasol@xxxxxxxxxxxx>
  • Date: Fri, 19 Nov 1999 20:00:53 +0100

Title: Convert uppercase to mixed case
Hi Dave,
 
Here's one way to do it:
 
D InpFld          s            256a   Inz( 'MR. SANTA CLAUS' )      
D ChrStr          s            257a   Varying                       
D ChrAry          s                   Like( InpFld ) Dim( 64 )      
D ChrFld          s                   Like( InpFld )                
D Blank           s              1a                                 
D Ix              s              5u 0                               
D Ic              s              5u 0                               
D Pb              s              5u 0                               
D Pe              s              5u 0                               
**                                                                  
D Hi              c                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'  
D Lo              c                   'abcdefghijklmnopqrstuvwxyz'  
**                                                                  
C                   Eval      ChrStr     =  %TrimR( InpFld ) + Blank
**                                                                  
C     Blank         Check     ChrStr        Pb                      
C                   DoW       %Found                                  
**                                                                    
C     Blank         Scan      ChrStr: Pb    Pe                        
C                   Eval      Ix         =  Ix + 1                    
C                   Eval      ChrAry(Ix) =  %SubSt( ChrStr: Pb: Pe-Pb )
**                                                                    
C     Blank         Check     ChrStr: Pe    Pb                        
C                   EndDo                                             
**                                                                    
C                   Clear                   ChrStr                    
**                                                                    
C                   Do        Ix            Ic                        
C     Hi:Lo         Xlate     ChrAry(Ic):2  ChrFld                    
C                   Eval      ChrStr     =  ChrStr + ' ' + %TrimR( ChrFld )
C                   EndDo                                             
**                                                                    
C                   Eval      InpFld     =  %SubSt( ChrStr: 2 ) 
**                             
C                   Return     
**                              
  
Best regards,
Carsten Flensburg    
----- Original Message -----
Sent: Friday, November 19, 1999 6:32 PM
Subject: Convert uppercase to mixed case

Does anyone have a generic routine (RPG) for converting uppercase to mixed case?  I'm looking to convert all our customer and vendor names and addresses from upper to mixed.

Thanks,
Dave


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].