SMP/E for z/OS Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 2: Coding parentheses correctly

SMP/E for z/OS Commands
SA23-2275-01

The following set of SMP/E commands has an error in the LOG command:
SET      BDY(GLOBAL)        /* Process global zone.     */.
LOG      (I AM ABOUT TO RECEIVE SERVICE LEVEL
          0701 IN ORDER TO INSTALL A NEW FUNCTION.
          (FUNCTION IS JXX1112).
RECEIVE  SOURCEID(PUT0701)  /* Receive service level.   */.

The LOG command does not have matched parentheses. The string (FUNCTION IS JXX1112) is in parentheses within the LOG command, but no closing parenthesis is found for the LOG command itself. SMP/E continues scanning the SMPCNTL input, looking for the closing parenthesis. Because it is not found, and because (we assume) there are no more commands, SMP/E issues an error message, and the message is not written to the SMPLOG.

Assume that you had made an additional mistake in the RECEIVE command as follows:
SET      BDY(GLOBAL)        /* Process global zone.     */.
LOG      (I AM ABOUT TO RECEIVE SERVICE LEVEL
          0701 IN ORDER TO INSTALL A NEW FUNCTION.
          (FUNCTION IS JXX1112).
RECEIVE  SOURCEID(PUT0701)  /* Receive service level.   */.

Here, a 9 was mistakenly typed instead of a (. SMP/E finds the matching parenthesis after the SOURCEID operand, considers it to be the one for the LOG command, and would consider the text closed. Because no other data is found after the closing parenthesis (other than the period and a valid command comment) SMP/E writes the RECEIVE command to the SMPLOG as part of the LOG command text.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014