Multiple choice technology mainframe

Sample Code 0100 IDENTIFICATION DIVISION. 0200 PROGRAM-ID. AM822P115. Referring to the sample code above, which one of the following statements is correct?

  1. There should not be a hyphen between PROGRAM and ID.

  2. Line 0100 should be DIVISION-ID.

  3. The compiler shortened the program name to "AM822P11".

  4. Line 0200 should be PROGRAM IDENTIFICATION. AM822P115.

  5. The program name must not contain numbers.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

COBOL program names are limited to 6 characters (actually 30 in COBOL-85 and later, but older compilers had 6-character limits). When the compiler encounters a longer name like AM822P115, it truncates it to fit the limit, resulting in AM822P11. The PROGRAM-ID syntax with hyphen is correct.