Multiple choice technology programming languages

"Identify the incorrect statement "

  1. CALL RAF-SUB.

  2. CALL RAF-SUB ON OVER FLOW GO TO MIS-SUB.

  3. CALL RAF-SUB USING PARAM-1.

  4. CALL RAF-SUB USING PARAM-1 UNTIL PARAM-1 >10 (x)

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

COBOL CALL statement syntax doesn't include UNTIL clause. Options A, B, and C show valid CALL syntax (plain call, with overflow, with USING). Option D incorrectly adds UNTIL, which is not part of the CALL verb - UNTIL is used with PERFORM, not CALL.

AI explanation

To answer this question, we need to understand the syntax and usage of the CALL statement in programming.

Option A) CALL RAF-SUB - This option is correct because it simply calls the subroutine RAF-SUB without any additional parameters or conditions.

Option B) CALL RAF-SUB ON OVERFLOW GO TO MIS-SUB - This option is correct because it calls the subroutine RAF-SUB and specifies that if an overflow occurs during the execution of RAF-SUB, the program should transfer control to the subroutine MIS-SUB.

Option C) CALL RAF-SUB USING PARAM-1 - This option is correct because it calls the subroutine RAF-SUB and passes the value of PARAM-1 as an argument to the subroutine.

Option D) CALL RAF-SUB USING PARAM-1 UNTIL PARAM-1 >10 - This option is incorrect because the syntax is not valid. The "UNTIL" keyword is not a valid keyword in the CALL statement. It seems to be a mix-up with the syntax of a looping statement.

Therefore, the correct answer is D) CALL RAF-SUB USING PARAM-1 UNTIL PARAM-1 >10.