Tag: mainframe

Questions Related to mainframe

  1. SELECT COUNT(*) FROM Persons

  2. SELECT COLUMNS() FROM Persons

  3. SELECT COLUMNS(*) FROM Persons

  4. SELECT COUNT() FROM Persons


Correct Option: A
  1. SELECT FirstName FROM Persons

  2. SELECT Persons.FirstName

  3. EXTRACT FirstName FROM Persons

  4. EXTRACT Persons.FirstName


Correct Option: A
  1. SELECT DISTINCT

  2. SELECT DIFFERENT

  3. SELECT UNIQUE

  4. SELECT SAME


Correct Option: A
  1. LEFT JOIN

  2. RIGHT JOIN

  3. FULL JOIN

  4. SELF JOIN


Correct Option: A,B,C,D

UNION selects only distinct value by default.

  1. True

  2. False


Correct Option: A
  1. Alternate Key

  2. Foreign Key

  3. Unique Key

  4. Alias Key


Correct Option: B

Indicate what is not correct in a REXX program.

  1. A REXX clause can be coded in uppercase, lowercase or mixed case.

  2. Multiple instructions can be coded on 1 line, as long as they are separated by a ','

  3. A REXX program should start with a comment clause /* REXX */

  4. Continuation of REXX instructions is achieved by using a ',' as a continuation indicator


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) A REXX clause can be coded in uppercase, lowercase, or mixed case. - This option is correct. In REXX, the case of the keywords does not matter, so it can be coded in uppercase, lowercase, or mixed case.

Option B) Multiple instructions can be coded on 1 line, as long as they are separated by a ',' - This option is incorrect. In REXX, multiple instructions are typically coded on separate lines, and not on the same line separated by a comma.

Option C) A REXX program should start with a comment clause /* REXX */ - This option is correct. It is good practice to start a REXX program with a comment clause to indicate that it is a REXX program.

Option D) Continuation of REXX instructions is achieved by using a ',' as a continuation indicator - This option is correct. In REXX, when an instruction is too long to fit on a single line, a comma (",") can be used as a continuation indicator to continue the instruction on the next line.

The correct answer is B. Multiple instructions cannot be coded on 1 line in REXX.