Concerning the shielding of variables of an internal subroutine from the main EXEC part, which of the following is correct:

  1. One can not shield variables in a subroutine from the main EXEC, only from other subroutines.

  2. One can shield the variables by using the clause: CALL SUBROUT1 PROCEDURE

  3. One can shield the variables by defining the start clause of a subroutine:SUBROUT1: PROCEDURE

  4. One can shield the variables by defining the start clause of a subroutine: SUBROUT1: SHIELDED


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of variable shielding in subroutines.

Option A) One can not shield variables in a subroutine from the main EXEC, only from other subroutines. This option is incorrect because it suggests that variables in a subroutine cannot be shielded from the main EXEC. In reality, it is possible to shield variables from both the main EXEC and other subroutines.

Option B) One can shield the variables by using the clause: CALL SUBROUT1 PROCEDURE This option is incorrect because the clause "CALL SUBROUT1 PROCEDURE" does not shield variables. It is used to call a subroutine, not to shield variables.

Option C) One can shield the variables by defining the start clause of a subroutine: SUBROUT1: PROCEDURE This option is correct because the start clause of a subroutine can be used to shield variables. By defining the subroutine with a start clause such as "SUBROUT1: PROCEDURE", the variables within that subroutine are shielded from the main EXEC and other subroutines.

Option D) One can shield the variables by defining the start clause of a subroutine: SUBROUT1: SHIELDED This option is incorrect because the keyword "SHIELDED" is not used to shield variables in a subroutine. The correct keyword to use is "PROCEDURE".

Therefore, the correct answer is Option C) One can shield the variables by defining the start clause of a subroutine: SUBROUT1: PROCEDURE. This option is correct because it accurately describes the method of shielding variables in a subroutine from the main EXEC.

Find more quizzes: