×
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.
What is interesting is that I never received Robs reply - so Rob - appreciated - NOT ignoring you
We already have a procedure in place to handle this - and that would mean writing an RPG program for this file to use that procedure
I was just hoping that someone could see something I could use in an SQL statement, that I could insert into my clle program, but ity looks like I will need to bite the bullet on this
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Luis Rodriguez
Sent: Wednesday, March 02, 2016 8:54 AM
To: Midrange Systems Technical Discussion
Subject: Re: Removing "BAD" characters from a file
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 ...
RE: Removing "BAD" characters from a file, (continued)
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.