Cobol Question:

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

Tweet Share WhatsApp

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 PDF Read All 110 Cobol Questions
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?