Example with All Wait State Information Known at Assembly Time

If you know the wait state and the reason code at program assembly time, the parameter list storage can be defined and initialized with one invocation of the LOADWAIT macro. The following example defines storage for and initializes a parameter list, and names the parameter list ‘TEST’:
Figure 1. LOADWAIT Example for Defining and Initializing a Parameter List
LOADWAIT  MF=(L,TEST),
      CODE=WAITA29,
      WAITTYPE=RESTARTABLE
      REASON=SOMERC
Issue the WTO macro with the WSPARM option to load a restartable wait state code of X'A29':
Figure 2. WTO Example for Issuing a Message with a WSPARM parameter
      WTO  'WMM0001  UNABLE TO COMMUNICATE A REPLY',
             LINKAGE=BRANCH,SYNCH=YES,WSPARM=TEST

WAITA29  EQU X'A29'
SOMERC   EQU X'3'

This example represents the most common usage of the LOADWAIT macro. The list form of the macro is used because both the wait state and reason code are known at program assembly time. The calling program specifies the LOADWAIT parameter list (TEST) on the WSPARM parameter of the WTO. WTO issues the message "WMM0001 UNABLE TO COMMUNICATE A REPLY" and loads the wait state.