Which one of the following is not a valid statement?
-
Multiply corresponding record1 by record2
-
Add corresponding record1 to record2
-
Move corresponding record1 to record2
-
Subtract corresponding record1 from record2
COBOL allows ADD CORRESPONDING, MOVE CORRESPONDING, and SUBTRACT CORRESPONDING to operate on matching elementary items between group records. MULTIPLY CORRESPONDING is not a valid COBOL verb - the CORRESPONDING phrase is only supported with ADD, SUBTRACT, and MOVE statements.
To answer this question, let's go through each option to understand why it is correct or incorrect:
Option A) Multiply corresponding record1 by record2 - This option is not a valid statement because multiplying two records is not a well-defined operation. Multiplication is typically performed on individual values rather than entire records.
Option B) Add corresponding record1 to record2 - This option is a valid statement because adding two records is a valid operation. It involves adding corresponding values from each record.
Option C) Move corresponding record1 to record2 - This option is a valid statement. It suggests moving the values from record1 to record2.
Option D) Subtract corresponding record1 from record2 - This option is a valid statement because subtracting one record from another involves subtracting corresponding values from each record.
The correct answer is A. This option is not a valid statement because multiplying two records is not a well-defined operation.