Interview Helper
Translate Page To German Tranlate Page To Spanish Translate Page To French Translate Page To Italian Translate Page To Japanese Translate Page To Korean Translate Page To Portuguese Translate Page To Chinese
  Number Times Read : 46      
  Go To Article# :  1 2 3 4 5 6  
Categories

Campus Interviews (99)
Career Helper (6)
Certification Dumps (9)
Code Samples (8)
Competitive Exams (49)
Interview Questions (349)
Walkin Interviews (20)
 
Stats
Total Articles: 566
Total Authors: 120
Total Downloads: 92870


Newest Member
Gagan Deep Sharma
 


   

Cobol Interview Questions 3

By : Nisha Sahni    29 or more times read
Submitted 2008-08-29 12:05:19 [Valid RSS feed]



21.What are the different forms of EVALUATE statement?


EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS


WHEN A=B AND C=D WHEN 100 ALSO '00'


imperative stmt imperative stmt


WHEN (D+X)/Y = 4 WHEN -305 ALSO '32'


imperative stmt imperative stmt


WHEN OTHER WHEN OTHER


imperative stmt imperative stmt


END-EVALUATE END-EVALUATE


EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE


WHEN 100 ALSO TRUE WHEN 100 ALSO A=B


imperative stmt imperative stmt


WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)


imperative stmt imperative stmt


END-EVALUATE END-EVALUATE


22.How do you come out of an EVALUATE statement?


After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the EVALUATE statement. There is no need of any extra code.


23.In an EVALUATE statement, can I give a complex condition on a when clause?


Yes.


24.What is a scope terminator? Give examples.


Scope terminator is used to mark the end of a verb e.g. EVALUATE, END-EVALUATE; IF, END-IF.


25.How do you do in-line PERFORM?


PERFORM ... ...


END PERFORM


26.When would you use in-line perform?


When the body of the perform will not be used in other paragraphs. If the body of the perform is a generic type of code (used from various other places in the program), it would be better to put the code in a separate para and use PERFORM paraname rather than in-line perform.


27. What is the difference between CONTINUE & NEXT SENTENCE ?


CONTINUE is like a null statement (do nothing) , while NEXT SENTENCE transfers control to the next sentence (!!) (A sentence is terminated by a period)


28.What does EXIT do ?


Does nothing ! If used, must be the only sentence within a paragraph.


29.Can I redefine an X(100) field with a field of X(200)?


Yes. Redefines just causes both fields to start at the same location. For example:


01 WS-TOP PIC X(1)


01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).


If you MOVE '12' to WS-TOP-RED,


DISPLAY WS-TOP will show 1 while


DISPLAY WS-TOP-RED will show 12.


30.Can I redefine an X(200) field with a field of X(100) ?


Yes.



Author Resource:-
Article From Interview Helper
New Members
select
Sign up
select
learn more
Affiliate Sign in
Affiliate Sign In
 
Nav Menu
Home
Login
Submit Articles
Submission Guidelines
Top Articles
Link Directory
About Us
Contact Us
Privacy Policy
RSS Feeds

Actions
Print This Article
Add To Favorites

 
Sponsors

 

 

All Rights Reserved Interview Helper