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



Related to this: Since the incoming text is not formatted for our system, I am checking every character, looking for a word break. That works fine. But, my co-worker was not satisfied with my concept of testing for a character less than x'40'. He created a file with a single character record, and put some simple characters in it. One was x'15'. He wrote a simple RPG IV program to read the record, and, if a character less than x'40' was encountered, to change to a x'40. I ran the little program in debug. It definitely is passing the if test. But, he also included output to a spool file. With a\good characters ahead of the x'15' and good behind, it seemed reasonable that a line would print showing a change had been made, or that the DSPSPLF would indicate something. But, spool file does not show anything ut "good" characters. No messages indicating something was suppressed in the spool file. I thought that RPG IV was helping, as Windows does, so suggested he try RPG III.
Same result.

Does this make any sense? Right now, it doesn't to me. This takes me back to when I worked with a Pr1me computer. It was simply not possible to ever enter a LF code. Anything else could be entered from a keyboard and stored in a file but that specific character.

John McKee

-----Original message-----
From: Vern Hamberg vhamberg@xxxxxxxxxxx
Date: Thu, 22 Sep 2011 14:44:38 -0500
To: Midrange Systems Technical Discussion midrange-l@xxxxxxxxxxxx
Subject: Re: Scan for a character less than X'40

John

I replied a little too fast - I see you want to do just a spot check or
something - not a particular less-than-a-space thing. Will have to think
some more - hope others get you an answer.

Vern

On 9/22/2011 10:24 AM, John McKee wrote:
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
--
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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.