z/OS: Changes to exits

From IBM MQ for z/OSĀ® Version 9.0.0, exits that rely upon being able to modify static storage within the load module must be modified to be reentrant.

Writing channel exit programs on z/OS stipulates that IBM MQ exits must be reentrant and capable of running anywhere in virtual storage.

Non-reentrant C programs are those that might use variables declared with the static storage class, or variables receiving the extern storage class, or might contain writable static strings.

Non-reentrant exits have, technically, never been supported in IBM MQ for z/OS, but prior to IBM MQ for z/OS Version 9.0.0, it was possible for some of these exits to process successfully

From IBM MQ for z/OS Version 9.0.0, exits that rely upon being able to modify static storage within the load module no longer function correctly. You should modify such exits to be reentrant.

You might achieve this in some cases by:

  • Moving static or global variables inside the scope of a function, or
  • Dynamically allocating storage used for any static variables and using, for example, the IBM MQ ExitUserArea, or other operating system facilities, such as name or token services to obtain addressability.