IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is the use of level number 88


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
parul rana

New User


Joined: 01 Aug 2006
Posts: 4
Location: india

PostPosted: Tue Aug 29, 2006 11:42 am
Reply with quote

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
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Aug 29, 2006 11:54 am
Reply with quote

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.icon_smile.gif

Thanks,
Parikshit.
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 127
Location: kerala,india

PostPosted: Tue Aug 29, 2006 1:28 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top