For more information on how to use the POST macro to synchronize tasks, see z/OS MVS Programming: Assembler Services Guide.
The requirements for callers of POST are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | One of the following:
|
AMODE: | 24- or 31- or 64-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: |
|
Control parameters: | The event control block (ECB) must be in the primary address space. |
None.
None.
Before issuing the POST macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The POST macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␣ | One or more blanks must precede POST. |
POST | |
␣ | One or more blanks must follow POST. |
ecb addr | ecb addr: RX-type address, or register (1) or (2) - (12). |
,comp code | comp code: Symbol, decimal digit, or register (0) or (2) - (12). |
Range of values: 0 to (230 − 1) | |
Default: 0 | |
,LINKAGE=SVC | Default: LINKAGE=SVC |
,LINKAGE=SYSTEM | |
,RELATED=value | value: Any valid macro keyword specification. |
The explanation of the parameters is as follows:
For LINKAGE=SVC, the linkage is through an SVC instruction. This linkage is valid only when the caller is in primary mode and the primary, home, and secondary address spaces are the same.
For LINKAGE=SYSTEM, the linkage uses a non-SVC entry. This linkage is valid in cross memory mode or in non-cross memory mode. The ECB must be in the caller's primary address space. LINKAGE=SYSTEM is intended to be used by programs in cross memory mode.
The default is LINKAGE=SVC.
The RELATED parameter is available on macros that provide opposite services (for example, ATTACH/DETACH, GETMAIN/FREEMAIN, and LOAD/DELETE) and on macros that relate to previous occurrences of the same macros (for example, CHAP and ESTAE).
WAIT1 WAIT 1,ECB=ECB,RELATED=(RESUME1,'WAIT FOR EVENT')
.
.
.
RESUME1 POST ECB,0,RELATED=(WAIT1,'RESUME WAITER')
For LINKAGE=SYSTEM, the return code in register 15 is always zero. Otherwise, the POST macro has no return codes.
POST POSTECB
POST POSTECB,X'7FF'