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



Another thought: use the %xlate function in rpg to convert 0123456789 to 9999999999. This will preserve the hyphens and simulate the numeric phone numbers. Of course Pennsylvania 6-5000 may present a problem!

Wayne McAlpine wrote:

Why don't you just define a logigal over the file and omit the phone number field? Why fill it with bogus numbers? Just tell your partner that your policies don't permit release of phone numbers.

Jim Franz wrote:

since no one else has posted a rpg solution....
 rpg update of every record in file
exuse the psuedo code & indicators
scan for dash '-'
                z-add 1   x                                          =
      '-'        scan   text:x            pos1                    20
 20             eval  x = pos + 1
** scan for next dash in same line
20   '-'        scan    text:x            pos2                    20
20    pos2   sub    pos1              diff
** xxx-xxx-xxx - dashes 4 bytes apart
20     diff    ifeq      4
** get start of number
          pos1  sub     3                start
                    eval    %subst(text:start:12) = '945-111-2222'
                    update
                    endif

jim

----- Original Message ----- From: "Sean Porterfield" <sporter@xxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Friday, March 12, 2004 2:15 PM
Subject: RE: Replacing characters




At 11:24 AM 3/12/2004 -0500, Mark Allen wrote:


for privacy reasons I need to change all the phone #'s to "fictitous"
numbers i.e. change 706-678-9565 to 945-224-4848 or such.  The
phone numbersstart in a various # of places in the file (i.e. some
might start in position 33 others 55, 87 etc.) I've been racking
my brain for a quick and dirty way to this without having to
manually edit the file.


From: Vern Hamberg


Another idea is grep, in QShell.



Try sed rather than grep.


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing


list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





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.