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



It looks good
I am presently looking into this
Trying to see if a table can be created from a physical file, that way I can try and keep the table and file in sync

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of paultherrien
Sent: Wednesday, March 02, 2016 9:42 AM
To: Midrange Systems Technical Discussion; Tim Bronski
Subject: Re: Removing "BAD" characters from a file

+1
I have never used this, but this seems like an excellent option. Let the system do what the system is already doing.

On March 2, 2016 at 9:18 AM Tim Bronski <tim.bronski@xxxxxxxxx> wrote:


Another option (if you want to keep the CPYFRMSTMF in place and not
write a pgm) is to create a translation table and specify that on the
CPY. To do this use CRTTBL TBL(yourlib/YOURTABLE) SRCFILE(*PROMPT)
BASETBL(QEBCDIC). This will give you a prompt where you can specify
which characters get mapped to what. You could make all non printables
= blank x40.
Then on the CPYFRMSTMF use CVTDTA(*TBL) and specify your new table name.

On 3/2/2016 3:01 PM, Alan Shore wrote:
Hi Luis
Thanks for your reply

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

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill

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


--
Need sFTP or PGP? Download your native sFTP or OpenPGP solutions here:
www.arpeggiosoftware.com
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related questions.
Paul Therrien
Andeco Software, LLC
paultherrien@xxxxxxxxxxxxxxxxxx
--
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.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

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