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



Suppose the field name for your phone number is OLDPH, then the code might be 
like this

                   Z-ADD         1                I               10
                  MOVE         *BLANKS    NEWPH   8
I                 DOWLE       8
1                SUBST        OLDPH:I    CH           1
CH             IFNE            '-'
NEWPH    CAT             CH:0           NEWPH
                  ENDIF
                  ADD             1                 I
                  ENDDO

In ILE it will be


D pos                s              1s 0 inz(1)
D newph           s              8a   inz(*blanks)
D oldph             s              8a   inz('123-4567')
D ch                 s              1a   inz(*blanks)
C                   DOW       POS <= 8
C                   EVAL      CH = %SUBST(OLDPH:POS:1)
C                   IF            ch <> '-'
C     newph   CAT        ch:0          newph
C                   endif
C                   eval      pos = pos + 1
C                   enddo


Hope it helps.
Amitava




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.