Page 2 of 2

Re: VALUE Clause!!

PostPosted: Fri Oct 22, 2010 2:37 pm
by bhumireddy564
how can i use the condition code 88 effectively

Re: VALUE Clause!!

PostPosted: Fri Oct 22, 2010 3:15 pm
by Robert Sample
88 condition variables help reduce complexity of comparisons. For example, use
15  WS-IN-STATE PIC X(02).
    88  SOUTHERN-STATE VALUE 'GA', 'TN', 'FL', 'SC', 'NC', 'VA', 'AL', 'MS', 'TX', 'LA', 'AR'.
which allows you to use
IF  SOUTHERN-STATE
instead of
IF  WS-IN-STATE = 'GA' OR 'TN' OR 'FL' OR 'SC' OR 'NC' OR 'VA' OR 'AL' OR 'MS' OR 'TX' OR 'LA' OR 'AR'