Types of REXX Clauses

REXX clauses can be: instructions, null clauses, and labels. Instructions can be keyword instructions, assignments, or commands. The following example shows a program with these types of clauses. A description of each type of clause follows the example.

/* QUOTA REXX program. Two car dealerships are competing to  */
/* sell the most cars in 30 days.  Who will win?             */

store_a=0; store_b=0
DO 30
   CALL sub
END
IF store_a>store_b THEN SAY "Store_a wins!"
 ELSE IF store_b>store_a THEN SAY "Store_b wins!"
  ELSE SAY "It's a tie!"
EXIT

sub:
store_a=store_a+RANDOM(0,20) /* RANDOM returns a random number in */
store_b=store_b+RANDOM(0,20) /* in specified range, here 0 to 20  */
RETURN

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfhrxax.html