GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 80 of 162    Print  
In which situation condition 88 variable used,give example?

  
Total Answers and Comments: 4 Last Update: March 24, 2007     Asked by: namash 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 07, 2006 05:49:02   #1  
Rajkumar        

RE: In which situation condition 88 variable used,give...
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.
 
Is this answer useful? Yes | No
October 09, 2006 03:21:40   #2  
jani        

RE: In which situation condition 88 variable used,give...
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.
 
Is this answer useful? Yes | No
October 17, 2006 03:43:08   #3  
Max        

RE: In which situation condition 88 variable used,give...

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.


 
Is this answer useful? Yes | No
March 24, 2007 14:54:02   #4  
IRINA K        

RE: In which situation condition 88 variable used,give...

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.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape