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



Cesar,

Maybe you could try the CLASS clause:

SPECIAL-NAMES.
               CLASS VALID-NUMBERS IS
                   "0123456789 ".

01  Test-OK               pic x(01) value space.
01  example-data.
    05  test-one          pic x(06) value  "B67890".
    05  test-two          pic x(06) value  " 399  ".

if test-one is VALID-NUMBERS
    move "Y"    to Test-OK
else
    move "N"    to Test-OK
end-if.

if test-two is VALID-NUMBERS
    move "Y"    to Test-OK
else
    move "N"    to Test-OK
end-if.

Terry

> -----Original Message-----
> From: cesaralt@viabcp.com [mailto:cesaralt@viabcp.com]
> Sent: Monday, July 29, 2002 2:50 AM
> To: cobol400-l@midrange.com
> Subject: Inspect ASCII Characters
>
>
> Hi,
> We have a master file (No data base) that it is updated via a
> file transfer from a PC Host System. Sometimes (and that's not
> our concern) when the transfer is ended, in the AS/400 file
> remains embeded some ASCII characters (or garbage) that makes
> some subfile COBOL programs to crash and finish anormally.
> (No problems with DFU and normal DISPLAY sentences).
> Is it possible to detect and inspect this characters and replace
> them?
> Besides I have to make a report with the bad records.
>
> Regards and thanks for any help.
> Cesar Altamirano.
>
>
>
>
>
>
>
>
>
>
>
>
> ----------------------------------------------------
> viaBCP del Banco de Crédito, contigo en Internet
> Visítanos en http://www.viabcp.com
> ----------------------------------------------------
>
> _______________________________________________
> This is the COBOL Programming on the iSeries/AS400
> (COBOL400-L) mailing list
> To post a message email: COBOL400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
> or email: COBOL400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/cobol400-l.
>


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.