×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Alan,

Besides Rob's excellent suggestion (processing stream files directly from
RPG), assuming you have a BadChar-->GoodChar table already defined, Why not
simply use RPG’s XLATE? It could be something like (not exact code):

//----------------------------
// Define "holders" for %Xlate
D FromChar S 064 Varying
D ToChar S 064 Varying
//
Clear FromChar;
Clear ToChar;

// Build your translation strings
DoU %Eof;
Read BADHEXCHR;
IF not %eof;
FromChar = FromChar + BHCCHAR;
ToChar = ToChar + BHCREPL;
ENDIF;
ENDDO;

DoU %Eof;
Read File-to-be-translated;
IF %not eof;
Field = %XLATE(FromChar : ToChar : Field ;
ENDIF;
ENDDO ;

Just an idea...

//----------------------------

Regards,

Luis


Luis Rodriguez


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