POST (Post Event) Macro

This macro provides communication between two tasks in the same partition by posting an event control block (ECB).

It causes bit 0 of byte 2 of the ECB to be set on. A post that is issued to an ECB removes a task that waits for the ECB from the wait state. For more information about an ECB, see ATTACH (Attach a Task) Macro.

POST processing can post an ECB in 24-bit or 31-bit addressing mode physically resident above or below 16 MB. When POST is issued in AMODE 24, all operands are treated as 24-bit addresses. When POST is issued in AMODE 31, all operands are treated as 31-bit addresses.

Format

Read syntax diagramSkip visual syntax diagramname POST ecbname(1),SAVE=savearea(0)

Requirements for the caller

AMODE:
24 or 31
RMODE:
24 or ANY
ASC Mode:
Primary

Parameters

ecbname | (1)
Provides the address of the ECB that is to be posted.
SAVE=savearea | (0)
This operand can be used for taking a specific waiting task out of the wait state. The operand causes the system to locate the save area whose address is specified in the operand and to take only the subtask that is associated with this save area out of the wait state. This task normally is waiting for the specified ECB to be posted. The save area must be allocated below the 16 MB line (RMODE 24).
Although specifying this operand saves time, since other tasks that wait for this ECB are not taken out of the wait state for the event that your program signals by issuing the POST macro, specifying the operand does not guarantee that those tasks stay in the wait state until another POST is issued. Other events could cause the other tasks to be dispatched. Therefore, use the POST macro with SAVE to control subtask operation only if either:
  • You have a separate ECB for each of the tasks, or
  • There is a need to save processing time.

If you issue a POST without SAVE, all tasks that wait for the ECB are taken out of the wait state.