In which situation condition 88 variable used,give example?

Showing Answers 1 - 4 of 4 Answers

Rajkumar

  • Oct 7th, 2006
 

Wherever a condition can occur, such as in an IF statement or an EVALUATE or a PERFORM..UNTIL, a Condition Name (Level 88) may be used.for ex.02 AgeInYears PIC 9(3). 88 Child VALUE 0 THRU 12. 88 Teenager VALUE 13 THRU 19. 88 Adult VALUE 21 THRU 999. 88 Voter VALUE 18 THRU 999.

jani

  • Oct 9th, 2006
 

whenever u find single variable with multiple conditions u can go for 88 level number.ex. marks 0 to 34 fail, 35 to 49 third class, 50 to 59 second class, 60 to 69 first class, 70 and above distinction. can be codded using 88 level no. as w-s section. 88 fail value 0 thru 34. 88 third value 35 thru 49. 88 second value 50 thru 59. 88 first value 60 thru 69. 88 distinction value 70 thru 100. 88 notvalid value 100 and above.

  Was this answer useful?  Yes

Max

  • Oct 17th, 2006
 

Level-88 describes condition-names.When the string's values are foreseeable and it's long or unreadable and the string would be used in many places, you could use level-88 string to make the evaluate process more easier and understandable.

For example: for the variable string "ws-sex", there should be two condition, one is "M" for "male", the other is "F" for "female". we can define that

05 ws-sex             pic x(01).

    88 ws-sex-male  value "M".

    88 ws-sex-female value "F".

It is clear that the sentence "set ws-sex-male to true " is much understandable than "move "M" to ws-sex".

It is more obvious when the condition is more.

IRINA K

  • Mar 24th, 2007
 

You can use a level 88 to set up condition names that can be used to simplify
IF and UNTIL tests.
Level 88 is a special level number used to improve the readability of COBOL
programs and to improve IF tests.
A level 88 looks like a level under another variable, but it's not.
It does not have a PICTURE, but it does have a value.
A level 88 is always associated with another variable and is a condition name
for that variable.


Here is an example:


002500002600 01 YES-NO PIC X.002700 88 ANSWER-IS-YES VALUE "Y".002800


Both of the following conditions test whether YES-NO is equal to "Y":003700


IF YES-NO = "Y"003700 IF ANSWER-IS-YES


The condition name at line 002700 is another way of saying YES-NO = "Y" and
can be used in IF and UNTIL conditions.
A level 88 condition name can be used for an alphanumeric or numeric variable.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions