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



John,

Try using the TRANSLATE built in function in SQL. Enumerate all the possible characters below x'40' translated to x'40'. Compare the text after TRANSLATE against the original text to locate the text with invalid characters. Update that original text after passing it through TRANSLATE to remove those invalid characters.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Thursday, September 22, 2011 11:25 AM
To: Midrange Systems Technical Discussion
Subject: Scan for a character less than X'40

Is there a way to scan a text field in a file for an embedded character less than an EBCDIC blank? We retrieve text from vendors and post this to accounts. I am going to modify the code to convert incoming characters less than a space to a space. But, that doesn't address the potential of other embedded characters already in the file. I can see how to write an RPG program that would check each character, but wondered if SQL could be used - just to see if any others are present. After more than three years of doing this, we got hit with TWO x'15' embedded characters. I did not realize that characters less than x'40' were not allowed. Receiving CPF5192 has taught be otherwise. I just was looking for a (relatively) quick way to determine if other invalid characters have been written to the file and those accounts just have not been displayed yet.

I thought about using query, but I am not looking for a specific character - just one less than x'40 if it exists at all.

John McKee

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.