Page 1 of 1

Eliminate Non-Printable Characters in Extract File

PostPosted: Wed Nov 25, 2009 8:16 pm
by jhrBanker
I run an EZ job daily which creates an extract file containing over 4 million records, which I then import into an Access db. I created VBA code in the Access db that easily does the import everyday (the code formats a couple of fields during the import). Problem is I'm running into records that have invalid ascii characters, and it's causing the process to stop importing when the first such record is encountered. The invalid characters are always in the same field. All other fields are okay. Is there some way in EZ to test each character in the field first and replace any invalid non-printable character (ASCII <032 or >126) with a space?

Re: Eliminate Non-Printable Characters in Extract File

PostPosted: Thu Nov 26, 2009 1:31 am
by dick scherrer
Hello and welcome to the forum,

Create an array in the Easytrieve code that contains the translation of each value to the needed value.

I suspect that these values should not be simply made spaces. You need to determine why these fields have unexpected values. On reason for this is because the fields contain packed-decimal or binary data. If you post the extract file definition and sow a few of these values (using HEX ON), someone may be able to provide some help.