× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<027c01bf32c0$69975be0$0250a8c0@NOVASOL.DK>
Subject: Re: Convert uppercase to mixed case
Date: Sat, 20 Nov 1999 16:29:50 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
         boundary="----=_NextPart_000_038D_01BF3374.7806D5C0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Sender: owner-midrange-l@midrange.com
Precedence: bulk
Reply-To: MIDRANGE-L@midrange.com
Errors-To: list-errors@midrange.com
X-List-Name: Midrange Systems Mailing List (MIDRANGE-L@midrange.com)

This is a multi-part message in MIME format.

------=_NextPart_000_038D_01BF3374.7806D5C0
Content-Type: text/plain;
         charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Convert uppercase to mixed caseDave,

I've added a couple of missing lines - this way it should actually =
work!:
   D InpFld          s            256a   Inz( 'MR. SANTA CLAUS' )      =20
   D ChrStr          s            257a   Varying                       =20
   D ChrAry          s                   Like( InpFld ) Dim( 64 )      =20
   D ChrFld          s                   Like( InpFld )                =20
   D Blank           s              1a                                 =20
   D Ix              s              5u 0                               =20
   D Ic              s              5u 0                               =20
   D Pb              s              5u 0                               =20
   D Pe              s              5u 0                               =20
   **                                                                  =20
   D Hi              c                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'  =20
   D Lo              c                   'abcdefghijklmnopqrstuvwxyz'
   **
   C                   If        InpFld     <> *Blanks
   C                   Eval      ChrStr     =3D  %TrimR( InpFld ) + Blank
   C                   Eval      Ix         =3D  0
   **                                                                  =20
   C     Blank         Check     ChrStr        Pb                      =20
   C                   DoW       %Found                                   =

   **                                                                     =

   C     Blank         Scan      ChrStr: Pb    Pe                         =

   C                   Eval      Ix         =3D  Ix + 1                   =
  =20
   C                   Eval      ChrAry(Ix) =3D  %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     =3D  ChrStr + ' ' + %TrimR( =
ChrFld )
   C                   EndDo                                              =

   **                                                                     =

   C                   Eval      InpFld     =3D  %SubSt( ChrStr: 2 )
   C                   EndIf=20
   **                             =20
   C                   Return     =20
   **                             =20
    =20
   Best regards,
   Carsten Flensburg    =20
     ----- Original Message -----=20
     From: Leland, David=20
     To: 'MIDRANGE-L@midrange.com'=20
     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,=20
     Dave=20


------=_NextPart_000_038D_01BF3374.7806D5C0
Content-Type: text/html;
         charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Dave,

I've added a couple of missing lines - this = way it=20 should actually work!:
>D=20 InpFld         =20 s           =20 256a   Inz( 'MR. SANTA CLAUS' = 
>)      =20
>D ChrStr         =20 s           =20 257a  =20 = 
>Varying           =              =
>D ChrAry         =20 = s            =       =20 Like( InpFld ) Dim( 64 
>)
>D=20 ChrFld         =20 = s            =       =20 Like( InpFld=20 = 
>)            =     =20
>D = Blank          =20 = s            =  =20 = 1a            = 
>;            =          =20
>D=20 = Ix            = ; =20 = s            =  =20 5u=20 = 
>0            =             &=
>nbsp;      =20
>D=20 = Ic            = ; =20 = s            =  =20 5u=20 = 
>0            =             &=
>nbsp;      =20
>D=20 = Pb            = ; =20 = s            =  =20 5u=20 = 
>0            =             &=
>nbsp;      =20
>D=20 = Pe            = ; =20 = s            =  =20 5u=20 = 
>0            =             &=
>nbsp;      =20 =
>**           &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;      =20
>D=20 = Hi            = ; =20 = c            =       =20 
>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>D=20 = Lo            = ; =20 = c            =       =20 
>'abcdefghijklmnopqrstuvwxyz'
>**
>C          &nb=
>sp;        If   &n=
>bsp;    InpFld     <> = *Blanks
>C          &nb=
>sp;       =20 Eval      ChrStr     = =3D =20 %TrimR( InpFld ) + Blank
>C          &nb=
>sp;       =20 Eval     =20 Ix         =3D  = 0
>**          &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;            =        =20
>C    =20 Blank        =20 Check     = ChrStr       =20 = Pb            = 
>;          =20
>C         &n=
>bsp;        =20 DoW      =20 = %Found           &=
>nbsp;           &n=
>bsp;          =20 =
>**           &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;        =20
>C    =20 Blank        =20 Scan      ChrStr: Pb   =20 = Pe            = 
>;            = =20 =
>C           &n=
>bsp;      =20 Eval     =20 Ix         =3D  Ix +=20 = 
>1            =         =20 =
>C           &n=
>bsp;      =20 Eval      ChrAry(Ix) =3D  %SubSt( = ChrStr: Pb:=20 Pe-Pb=20 = )
>**           =             &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;        =20
>C    =20 Blank        =20 Check     ChrStr: Pe   =20 = Pb            = 
>;            = =20 =
>C           &n=
>bsp;      =20 = EndDo           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;         =20 =
>**           &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;        =20 =
>C           &n=
>bsp;      =20 = Clear           &n=
>bsp;      =20 = ChrStr           &=
>nbsp;        =20 =
>**           &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;        =20 =
>C           &n=
>bsp;      =20 Do       =20 Ix           =20 = Ic            = 
>;            = =20
>C    =20 Hi:Lo        =20 Xlate     ChrAry(Ic):2 =20 = ChrFld           &=
>nbsp;        =20 =
>C           &n=
>bsp;      =20 Eval      ChrStr     = =3D =20 ChrStr + ' ' + %TrimR( 
>ChrFld=20 = )
>C           &=
>nbsp;      =20 = EndDo           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;         =20 =
>**           &=
>nbsp;           &n=
>bsp;           &nb=
>sp;           &nbs=
>p;            = ;        =20 =
>C           &n=
>bsp;      =20 Eval      InpFld     = =3D =20 %SubSt( ChrStr: 2 )
>C         &n=
>bsp;        =20 EndIf
>**         &=
>nbsp;           &n=
>bsp;       =20 =
>C           &n=
>bsp;      =20 Return     =20 =
>**           &=
>nbsp;           &n=
>bsp;
>
>Best regards,
>Carsten Flensburg    =20
>----- Original Message -----
>Leland,=20 David
>To: <3d.htm>'MIDRANGE<3d.htm>-L@midrange.com'
>Sent: Friday, November 19, = 1999 6:32=20 PM
>Subject: Convert uppercase to = mixed=20 case
>
>Does anyone have a generic routine (RPG) for = converting=20 uppercase to 
>mixed case?  I'm looking to convert all our = customer and=20 vendor names 
>and addresses from upper to mixed.
>
>Thanks,
>Dave=20
>
>
>
------=_NextPart_000_038D_01BF3374.7806D5C0--



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.