This general macro is used to wait for the completion of a named
event. It is used with the EVNTC (see EVNTC-Define Internal Event) and POSTC (see POSTC-Mark Event Completion) macros.
The EVNTC, POSTC and EVNWC macros can be used to pass the contents of a
core block from one ECB to another ECB.
Format
- label
- A symbolic name can be assigned to the macro statement.
- TYPE
- The type of event being waited for:
- CNT
- Count type event.
- MSK
- Mask type event.
- CB
- Core block oriented event.
- LIST
- List-type event.
- Note:
- See the POSTC macro for more information about these parameters.
For TYPE=CB, LEVEL must be specified and BLOCK may be specified. If
BLOCK is given, the event name is retrieved from the area specified and the
error code if one, is returned in the specified area.
For TYPE=LIST, the BLOCK parameter must be specified.
- BLOCK=label1
- An area formatted as defined in EV0BK that contains the name of the event
being waited on. The area is used to return the values from the
completed event. LEVEL and BLOCK are mutually exclusive except for
TYPE=CB.
- LEVEL=Dx
- A core block reference word (CBRW) and file address reference word
(D0-DF). LEVEL and BLOCK are mutually exclusive except for
TYPE=CB.
- ERROR=label2
- A label to branch to if the event has completed with error.
- NFOUND=label3
- A label to branch to if the event does not exist.
Entry Requirements
- For an EVNWC macro using the BLOCK parameter:
- The symbolic name of the event you are waiting for must be in field EVNBKN
in the area pointed to by the BLOCK parameter. For TYPE=LIST, the full
size of EV0BK must be allocated to ensure that there is enough room for the
returned data list. For more information about the EV0BK area, see EVNTC-Define Internal Event.
- For an EVNWC macro using LEVEL without the BLOCK parameter
- The symbolic name of the event to be waited for must be in CE1FAx, where x
is the specified level.
- R9 must contain the address of the ECB being processed.
Return Conditions
- For an EVNWC macro with the BLOCK parameter:
- The area specified will be filled as it relates to the specified event
type. (See POSTC-Mark Event Completion.)
- If it is an MSK type, the area specified is filled in with the remaining
mask and the contents of the accumulated POST MASK 2 field (EVNBKM2) from the
event.
- If it is a CNT type, the area specified is filled in with the remaining
count value.
- If it is a CB type, the CBRW specified by the LEVEL parameter is set to
the value passed by the POSTC macro. Enter the LEVTA macro to determine
if a core block was passed.
- If it is a LIST type, the area specified is filled in with the data list
information. To determine the status of the data list items, the flag
field (EVNBKLIF) of each item must be interrogated.
- The EVNBKE field is set with the error indicator if an error
occurs.
- For the MSK-, CNT-, or CB-type event, the error indicator in the EVNBKE
field is the value returned in the ERCODE parameter, as coded in the POSTC
macro.
- For the LIST-type event, the error indicator in the EVNBKE field is set to
a generic error code value of X'7F'. The error indicator field
(EVNBKLIE) for each list data item contains the value returned in the ERCODE
parameter as coded in the POSTC macro.
- For an EVNWC macro with the LEVEL parameter only:
- The core block reference word of the specified level is set to the
remaining mask or count value, CE1CRx bytes 0-1, and to the contents of the
accumulated POST MASK 2 field, CE1CRx bytes 3-4. (See POSTC-Mark Event Completion). The CE1SUD field for the level will be set with the
error indicator if an error occurred. The error indicator in the CE1SUD
field is the returned ERCODE parameter as coded in the POSTC macro. If
it is a 'CB' type, the full core block reference word is set to the
value passed by the POSTC macro. A LEVTA macro should be issued to
determine if a core block was passed.
- If the specified name is not found an immediate return is made to the
label specified by the NFOUND parameter. If the event completed with
error, control is returned to the label specified by the ERROR
parameter. Otherwise control is returned to NSI.
- The contents of R14 and R15 are unknown. The contents of
R0-R7 are preserved across this macro call.
Programming Considerations
- This macro can be executed on any I-stream.
- The EVNWC macro arms the named event to allow event completion to be
posted to the ECB. The EVNWC macro increments the I/O counter and flags
the named event so that on completion, the event can be posted to the
ECB. If the named event has completed, the EVNWC macro initiates the
posting process.
- Defined events in MDBF systems are subsystem unique.
- Issuance of the EVNWC macro causes an unconditional loss of control for
the issuing ECB unless the named event is not found.
- More than one ECB is allowed to wait for the same named event except for
type CB. When the event completes all waiting ECBs are posted
complete. For type 'CB', only the creating ECB may wait on the
event. Any other ECB attempting to wait on the event will be returned
with a not-found condition.
- The EVNTC and EVNWC macros can be coded to delay an ECB for a given amount
of seconds. This essentially will delay the ECB until the
amount of time specified in EVNTC TIMEOUT=xx has elapsed. The
POSTC macro does not need to be coded.
Examples
None.