z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Use of parentheses with relational expressions

z/OS MVS JCL Reference
SA23-1385-00

The system evaluates relational-expressions that are enclosed within parentheses prior to expressions found outside of parentheses. Therefore, you can control the way in which complex relational-expressions are evaluated.

For example, code the following to test that a return code is 0, 1, 2, or 3:
   //TESTPAR  IF  (RC LT 4 & (RC LT 12 | RC = 16))  THEN
By keeping the same expressions but changing the position of the parentheses, you can test that a return code is 0, 1, 2, 3 or 16:
   //TESTPAR1  IF  ((RC LT 4 & RC LT 12) | RC = 16)  THEN

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014