× 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.



I have run this for a long time so I'm not sure what state it's
in....but it should be a good start. 


Thanks,
Tommy Holden


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: Wednesday, August 30, 2006 2:53 PM
To: Midrange Systems Technical Discussion
Subject: Converting names & street names

Afternoon all,
we hold our customer name and address in upper case. We want to create
letters to these customers, but we want to convert the name and address
to
mixed case, so that the name looks like

SMITH             converts to       Smith
which is fairly straight forward, however,
O'DONELL    converts to       O'Donell
MCGUYVER    converts to McGuyver
plus others could provide problems.
My question is :-
does anyone have/know of a routine and/or 3rd party vendor that would
handle the conversion of names and addresses from upper case to mixed
case?

Thanks in advance



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx

     * define Constants...
     DUPPER            c                   CONST('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
     Dlower            c                   const('abcdefghijklmnopqrstuvwxyz')

     * define arrays...
     d                 ds
     d workchar                1    500
     d char                           1    dim(500) overlay(workchar)
     d                 ds
     DSpcChars                 1     26    inz('`~!@#$%¢&*()_-=+|\;:/?.,><')
     d SpecialChars                   1    dim(26) overlay(SpcChars)
     *
     C     *entry        plist
     C                   parm                    charstring      500
     c                   movel(p)  charstring    workchar

0156 ?* Convert Characters Upper/Lower Case For Printer...
0156 * Clear the Element Pointer...
     c                   z-add     1             elem              3 0
     c     lower:UPPER   xlate     workchar      workchar
0156 * Process All The Characters...
     c                   dou       elem = 500
0156 * Increment The Pointer...
     c                   add       1             elem
0156 * Leave The Conversion Loop...
     c                   if        elem = 500
     c                   leave
     c                   endif
0156 * If This Character is Blank Then Skip Over The Next Letter...
     c                   if        char(elem) = ' '
     c                   add       1             cntr              2 0
0156 * If More Than 3 Blanks in a Row Leave Loop...
     c                   if        cntr > 3
     c                   leave
     c                   endif
0156 *----> Skip To the Next Character...
     c                   add       1             elem
     c                   iter
     c                   endif
0156 * If This Character is Not a Letter Then Skip Over The Next Letter...
     c     char(elem)    lookup    SpecialChars                           73
     c
     c                   if        char(elem) < 'A'
     c                             and char(elem) > 'Z'
     c                             OR *in73
     c                   add       1             elem
     c                   if        char(elem) = ' '
     c                   add       1             elem
     c                   endif
     c                   iter
     c                   endif
0156 * Convert The Upper case to Lower Case...
     c                   z-add     0             cntr
     c     UPPER:lower   xlate     char(elem)    char(elem)
     c                   enddo
     c                   z-add     0             cntr
     c                   movel(p)  workchar      charstring
     c                   eval      *inlr = *on
     c                   return

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.