2. What is the use of EVALUATE statement?

Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and case is that no ‘break' is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is made.

3. 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.

4. What is a scope terminator Give example?

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

5. 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 Para name rather than in-line perform.

6. What the difference is between CONTINUE and NEXT SENTENCE ?

They appear to be similar, that is, the control goes to the next sentence in the paragraph. But, Next Sentence would

take the control to the sentence after it finds a full stop (.). Check out by writing the following code example, one if

sentence followed by 3 display statements (sorry they appear one line here because of formatting restrictions) If 1 0

then next sentence end if display ‘line 1' display ‘line 2'. display ‘line 3'. Note- there is a dot (.) only at the end of the line.

7. How many bytes does a S9(7) COMP-3 field occupy?

It will take 4 bytes. Sign is stored as hex value in the last nibble. General formula is INT((n2) + 1)), where n=7 in this example.

8. What is Static and Dynamic linking?

In static linking, the called subroutine is link-edited into the calling program, while in dynamic linking, the subroutine & the main program will exist as separate load modules. You choose static dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).A statically called subroutine will not be in its initial state the next time it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.

9. What is AMODE(24), AMODE(31), RMODE(24) and RMODE(ANY) (applicable to only MVSESA Enterprise Server) ?

These are compile link edit options. AMODE stands for Addressing mode and RMODE for Residency mode.

AMODE(24) - 24 bit addressing;

AMODE(31) - 31 bit addressing

AMODE(ANY) - Either 24 bit or 31 bit addressing depending on RMODE.

RMODE(24) - Resides in virtual storage below 16 Meg line. Use this for 31-bit programs that call 24-bit programs. (OSVS Cobol pgms use 24-bit addresses only).

RMODE(ANY) - Can reside above or below 16 Meg line.

10. What is SSRANGE, NOSSRANGE?

These are compiler options with respect to subscript out of range checking. NOSSRANGE is the default and if chosen, no run time error will be flagged if your index or subscript goes out of the permissible range.