Re: Class Test for Valid Characters

From: Binyamin Dissen (postingid_at_dissensoftware.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 10:05:05 +0300

On Tue, 29 Jun 2004 16:58:12 -0500 "JerryMouse" <nospam@bisusa.com> wrote:

:>Wes Jester wrote:
:>> I have set up a class test as
:>> SPECIAL-NAMES.

:>> CLASS ValidChar IS 'A' THRU 'Z',
:>> '0' THRU '9'.

:>> I need to verify that the input contains only these characters. I
:>> used a
:>> full field name test and determined that errors were getting thru.

:>> IF InMaster IS ValidChar
:>> CONTINUE
:>> ELSE
:>> DISPLAY 'Error in Field'
:>> END-IF

:>> However, errors were showing up in the field.

:>> When I test each character, I find that the backslash "\", X'E0', is
:>> considered valid. HIGH_VALUEs, X 'FF' is also considered valid.

:>> Does anyone know why these characters are considered valid cahracter
:>> within the class test?

:>I don't think you can test a FIELD against a CLASS. Your test is probably
:>just testing the first character in the field.

You certainly can.

It is no different than NUMERIC or ALPHABETIC, which apply to an entire field.

--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel


Relevant Pages

  • Re: Class Test for Valid Characters
    ... :>I have set up a class test as ... :>CLASS ValidChar IS 'A' THRU 'Z', ... :>I need to verify that the input contains only these characters. ... X 'FF' is also considered valid. ...
    (comp.lang.cobol)
  • Re: Class Test for Valid Characters
    ... > I have set up a class test as ... > I need to verify that the input contains only these characters. ... X 'FF' is also considered valid. ... PERFORM VARYING INDX FROM 1 BY 1 UNTIL INDX> FIELD-LEN ...
    (comp.lang.cobol)
  • Re: Class Test for Valid Characters
    ... Wes ... > I have set up a class test as ... > I need to verify that the input contains only these characters. ... X 'FF' is also considered valid. ...
    (comp.lang.cobol)
  • Class Test for Valid Characters
    ... I have set up a class test as ... CLASS ValidChar IS 'A' THRU 'Z', ... I need to verify that the input contains only these characters. ... Does anyone know why these characters are considered valid cahracter within ...
    (comp.lang.cobol)