Re: Class Test for Valid Characters

From: Lueko Willms (l.willms_at_jpberlin.de)
Date: 06/30/04


Date: 30 Jun 2004 10:08:00 GMT


. Am 29.06.04
schrieb wes.jester@lmco.com (Wes Jester)
    auf /COMP/LANG/COBOL
     in 7f2ed50e.0406291213.4a6eefb0@posting.google.com
  ueber Class Test for Valid Characters

WJ> CLASS ValidChar IS 'A' THRU 'Z',
WJ> '0' THRU '9'.
WJ>
WJ> I need to verify that the input contains only these characters. I
WJ> used a full field name test and determined that errors were getting
WJ> thru.
WJ>
WJ> IF InMaster IS ValidChar

    Sort of "why simply, if it can be done with complications?", eh?

    There is no need to specify your own class.

    Standard COBOL allows you to write:

    IF InMaster IS ALPHABETIC-UPPER or NUMERIC THEN

       ---- do something about it ...

yours,
Lüko Willms http://www.mlwerke.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --

"Kein Land kann seine Probleme in dieser globalisierten Welt allein
auf sich gestellt lösen. Entweder wir retten uns alle zusammen oder
wir gehen zusammen unter. Heute mehr denn je gilt das Wort von José
Martí: Das Vaterland ist die ganze Menschheit."
               - Fidel Castro, Caracas (Veneuzuela), 3. Februar 1999