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



Thanks Gary, Chuck

The uploaded files are transactions reported by our customers using their
items (SKUs
and descriptions.)
We then map those SKUs to our own Catalog Numbers, hence the need to keep
the
extenal text descriptions with all those unprintable characters.
The data are written to "simple" DB files that is to say CCSID 424 (not
ASCII or UTF).

Since there are several text data fields in each record I would like to use
a single
XLATE for each text field .
I could define a procedure to loop through the text and to replace and
invoke it
for each field but EXLATE seems more elegant to me ...

Gad




message: 6
date: Mon, 4 Jun 2012 13:42:35 +0000
from: Gary Thompson <gthompson@xxxxxxxxxxx>
subject: RE: Unprint(display)able in Data files

Gad,
The first thought to come to my RPG/AS400 mind is
use RPG to loop through characters in the iSeries
files, replacing characters < X'40' with X'40'

The following assumes the iSeries files have been
converted to standard EBCDIC

rpg code:

* data file - program described
FPGMF1 UF F 512 DISK
* data file - program described needs I Specs
IPGMF1 NS 01
I 1 512 F1REC
must = PGMF1 reclen

D xBlank C X'40'
D chMax C Const(512)
must = PGMF1 reclen

D DS
D ch# 1 512A DIM(512)
must = PGMF1 reclen

D ch@ S 10I 0
index ch#

* Start: Loop to replace characters less than blank with blank
-----------
C For ch@ = 1 By 1 To chMax
C If ch#(ch@) < xBlank
C Eval ch#(ch@) = xBlank
C End
C EndFor

C Eval *INLR = *On
C RETURN

* End : Loop to replace characters less than blank with blank
-----------
-----Original Message-----
If the characters are truly "white noise", then why not just avoid
writing them in the first place, instead of trying to obfuscate them
after-the-fact; i.e. why undo something just done? What exactly are the
"simple DB files" that represent the myriad of described file formats;
i.e. how are they created? Those formats, other than "text fixed" seem
likely to be typical "stream" data, record or binary; what reason is
there to store the data in "DB files" instead of "Stream files"?

Regards, Chuck


------------------------------

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest 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.



End of MIDRANGE-L Digest, Vol 11, Issue 876
*******************************************


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.