REXX Programming Fundamentals

Test your knowledge of REXX programming language including variables, string functions, parsing operations, and mainframe dataset interactions.

20 Questions Published

Questions

Question 1 True/False

SAY "HELLO" "THERE" SAY "HELLO" || "THERE Result? HELLO THERE HELLOTHERE

  1. True
  2. False
Question 2 True/False

NAME1 = "JHON" NAME2 = " JHON " IF NAME1 == NAME2 THEN SAY " MATCHED " ELSE SAY " NOT MATCHED " Result: NOT MATCHED

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

INPUT_STRING = "HOW ARE YOU" PARSE VAR INPUT_STRING ONE TWO THREE

  1. ONE = " " ; TWO = "HOW" ; THREE = "ARE YOU"
  2. ONE = "HOW" ; TWO = "ARE"; THREE = "YOU"
  3. ONE = "HOW ARE YOU" ; TWO = NULL ; THREE = NULL
  4. ONE = " " ; TWO = "HOW" ; THREE = "ARE"
Question 4 Multiple Choice (Single Answer)

PARSE VALUE "THIS IS A SAMPLE" WITH B A C D WHAT IS THE VALUE OF C?

  1. THIS
  2. IS
  3. A
  4. SAMPLE
Question 5 Multiple Choice (Single Answer)

%MYPRINT MEMORIAL DRIVE CAMBRIDGE ------------------------------------ /REXX/ PARSE UPPER ARG LASTN . SAY LASTN -------------------------------------- RESULT?

  1. MEMORIAL
  2. DRIVE
  3. MEMORIAL DRIVE CAMBRIDGE
  4. CAMBRIDGE
Question 6 Multiple Choice (Single Answer)

%MYPRINT MEMORIAL DRIVE CAMBRIDGE ------------------------------------ /REXX/ PARSE UPPER ARG LASTN FIRSTN SAY FIRSTN -------------------------------------- RESULT?

  1. MEMORIAL
  2. DRIVE CAMBRIDGE
  3. DRIVE
  4. CAMBRIDGE
Question 7 Multiple Choice (Single Answer)

%MYPRINT ABCDEFGHIJKLMNOP ------------------------------------ /*REXX */ PARSE ARG 1 VAR1 5 7 VAR2 9 -------------------------------------- RESULT?

  1. VAR1 = ABCDE ; VAR2 = GHE
  2. VAR1 = ABCD ; VAR2 = GH
  3. VAR1 = ABCDE ; VAR2 = GHIJKLMNOP
  4. VAR1 = ABCDEFG; VAR2 = HI
Question 8 Multiple Choice (Single Answer)

SIGL instruction ?

  1. set to the line number of the REXX program from which the transfer of Control statment
  2. set to the command of the REXX program causes error
  3. set to the subroutine name of the REXX program causes error
  4. set to the return code that was set by an environment command
Question 9 Multiple Choice (Multiple Answers)

Pick the REXX reserved variables from the following list?

  1. RC
  2. RESULT
  3. ADDRESS
  4. SIGL
Question 10 True/False

SAY VERIFY('SUSAN','ABNTUSV') result : 0

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

SAY TRUNC(1234.5,3) Result:

  1. 1234.5
  2. 1234.500
  3. 123
  4. 234
Question 12 Multiple Choice (Single Answer)

SYSDSN(dataset name) instruction helps to ?

  1. Defines the dataset name in system Catalog
  2. Uncatalog the dataset name given
  3. Tells if a dataset name exists
  4. none
Question 13 Multiple Choice (Single Answer)

NEW_STRING = STRIP(' MUCH BLANK SPACE ',B) SAY NEW_STRING

  1. " MUCH BLANK SPACE "
  2. " MUCH BLANK SPACE"
  3. "MUCH BLANK SPACE "
  4. "MUCH BLANK SPACE"
Question 14 Multiple Choice (Multiple Answers)

CALL LISTDSI dataset name?

  1. Retrieves complete information about dataset name
  2. Retrivess list of dataset names similar to the given dataset name
  3. Retrives RACF details of dataset name
  4. Retrives the attributes of a dataset
Question 15 Multiple Choice (Single Answer)

say FORMAT(123.45,5,3)?

  1. " 123.450"
  2. "123.45"
  3. "00123.450"
  4. "00123.45"
Question 16 Multiple Choice (Single Answer)

say FIND ('MARY HAD A LITTLE LAMB)','A LITTLE LAMB')

  1. 1
  2. 2
  3. 3
  4. 4
Question 17 Multiple Choice (Single Answer)

say C2X('A123')?

  1. C1F1F2F3
  2. A1010203
  3. A2010203
  4. C2010203
Question 18 Multiple Choice (Single Answer)

COMPARE ('APPLES', APPLESAUCE')?

  1. 7
  2. 8
  3. 9
  4. 10
Question 19 True/False

PROCEDURE instruction: Makes all variables in the function/ subroutine as local variables

  1. True
  2. False
Question 20 Multiple Choice (Multiple Answers)

EXPOSE variable-1 ... varible-n

  1. Allow Variable-1 through variable-n to be shared with the main part of the program
  2. Used with the PROCEDURE instruction
  3. suppress Variable-1 through variable-n not to be share with main part of the program
  4. All the above