Eliminate Non-Printable Characters in Extract File

Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Eliminate Non-Printable Characters in Extract File

Postby jhrBanker » Wed Nov 25, 2009 8:16 pm

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?
Posts: 1
Joined: Wed Nov 25, 2009 7:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Eliminate Non-Printable Characters in Extract File

Postby dick scherrer » Thu Nov 26, 2009 1:31 am

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.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to CA-Easytrieve


  • Related topics
    Last post