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



Neil,

That approach will work though there are some assumptions being made.
Some that come to mind are:

    1. EBCDIC base
    2. The user is only interested in the Latin alphabetic a-z (that is,
       don't plan on using the product outside of Latin-1 based
       environments)
    3. SNM has been pre-validated to NOT have hex values in the ranges
       x'8A' - x'8F', x'9A' - x'9F', x'AA' - x'AF', x'BA' - x'BF' or
       values at x'80', x'90', x'A0', and x'B0' (that is, there is a
       "whole bunch" of graphic characters that are going to be
       changed such as the international currency symbol at x'9F'
       (assuming CCSID 37) to x'DF' (Latin small letter y with diaeresis)
       or x'BB' (left square bracket in CCSID 37) to x'FB' (superscript
       3)).  The actual characters mangled will, of course, vary from
       CCSID to CCSID.
    4. Probably some other things...

But for raw speed, your "nasty" approach is hard to beat (especially if IX
is odd length packed :-)) if the above assumptions are held true.

Bruce

>
>Here's a nasty bit of RPGII code to convert to upper case that I just
>thought I'd post because I had nothing better to do and thought it would
>be fun to be attacked by all the RPG purists in the world !     :-)
>
>C**
>C** Ensure that Surname prints in CAPITAL letters.
>C**
>C                     DO   18        IX
>C                     BITON'1'       SNM,IX
>C                     END
>
>Neil Palmer                                AS/400~~~~~
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@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 ...

Follow-Ups:

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.