Cobol Question:

Download Job Interview Questions and Answers PDF

Why do we code S9 (4) comp. Inspite of knowing comp-3 will occupy less space ?

Cobol Interview Question
Cobol Interview Question

Answer:

Here s9(4)comp is small integer ,so two words equal to 1 byte so totally it will occupy 2 bytes(4 words).here in s9(4) comp-3 as one word is equal to 1/2 byte.4 words equal to 2 bytes and sign will occupy 1/2 byte so totally it will occupy 3 bytes.

Download Cobol Interview Questions And Answers PDF

Previous QuestionNext Question
Differentiate COBOL and COBOL-II. (Most of our programs are written in COBOLII, so, it is good to know, how, this is different from COBOL)?How do you code COBOL to access a parameter that has been defined in JCL? And do you code the PARM parameter on the EXEC line in JCL?