Category Archives: IBM Mainframe Interview Questions

Can I redefine an X(200) field with a field of X(100) ? | IBM Mainframe Questions

Yes.

Posted in IBM Mainframe Interview Questions | Leave a comment

Can I redefine an X(100) field with a field of X(200)? | IBM Mainframe Questions

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 … Continue reading

Posted in IBM Mainframe Interview Questions | Leave a comment

What does EXIT do ? | IBM Mainframe Questions

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

Posted in IBM Mainframe Interview Questions | Leave a comment

What is the difference between CONTINUE & NEXT SENTENCE ? | IBM Mainframe Questions

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

Posted in IBM Mainframe Interview Questions | Leave a comment

When would you use in-line perform? | IBM Mainframe Questions

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 … Continue reading

Posted in IBM Mainframe Interview Questions | Leave a comment

How do you do in-line PERFORM? | IBM Mainframe Questions

PERFORM … … END PERFORM

Posted in IBM Mainframe Interview Questions | Leave a comment

What is a scope terminator? Give examples. | IBM Mainframe Questions

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

Posted in IBM Mainframe Interview Questions | Leave a comment

In an EVALUATE statement, can I give a complex condition on a when clause? | IBM Mainframe Questions

Yes.

Posted in IBM Mainframe Interview Questions | Leave a comment

How do you come out of an EVALUATE statement? | IBM Mainframe Questions

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.

Posted in IBM Mainframe Interview Questions | Leave a comment

What are the different forms of EVALUATE statement? | IBM Mainframe Questions

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 … Continue reading

Posted in IBM Mainframe Interview Questions | Leave a comment