View previous topic :: View next topic
|
Author |
Message |
parul rana
New User
Joined: 01 Aug 2006 Posts: 4 Location: india
|
|
|
|
what is the use of level number 88. how to use in program and how can we use it differently in diff programs. please explain with examples. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi Parul,
Level 88 variables are "condition names". They are used mostly to test conditions.
One frequent use of 88 variables is in file status codes.
For example,
01 INFILE-STATUS PIC 99.
88 INFILE-SUCCESSFUL VALUE 00.
88 INFILE-END-OF-FILE VALUE 10.
...
..
Now, after each operation, you can check for file status by following code...
IF INFILE-SUCCESSFUL
...
ELSE
...
END-IF.
If you would have not used 88 variables,
Your code could be something like this...
IF INFILE-STATUS = 0
...
ELSE
...
END-IF.
You can see that, the 88 variables makes code more readable and structured. Isn't it?
You can find more information about this in manuals.
Thanks,
Parikshit. |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Level no 88 is for condition names . any level number variable exept 66
and 88 can be CONDITION VARIABLE. When ever the value of condition variable is that contained in condition name condition becomes true
eg
01 CHAR PIC A.
88 VOV VALUES ARE 'A', 'E', 'I', 'O', 'U'.
ACCEPT CHAR
IF VOV
DISPLAY 'CHAR ENTERED IS VOVEL'.
Also if we set VOV to TRUE The value will be automatically inserted in to variable CHAR and the value in CHAR will be the first value of VOV ie A |
|
Back to top |
|
|
|