Synchronize events.
WAITCICS >>-WAITCICS--ECBLIST(ptr-value)--NUMEVENTS(data-value)----------> .-PURGEABLE----------. >--+--------------------+--+------------+---------------------->< +-PURGEABILITY(cvda)-+ '-NAME(name)-' '-NOTPURGEABLE-------'
Condition: INVREQ
Note for dynamic transaction routing: Using this command could create inter-transaction affinities that adversely affect the use of dynamic transaction routing. See Affinity for more information about transaction affinities.
WAITCICS waits for events that post MVS™-format ECBs. The command causes the issuing task to be suspended until one of the ECBs has been posted, that is until one of the events has occurred. The task can wait on one or more ECBs. If it waits on more than one, it is dispatchable as soon as one of the ECBs is posted. You must ensure that each ECB is cleared, set to binary zeros, no later than the earliest time it could be posted. CICS cannot do this for you. If you wait on an ECB that has been previously posted and not subsequently cleared, your task is not suspended and continues to run as though the WAITCICS had not been issued.
CICS includes the addresses of all ECBs passed by WAITCICS commands of current tasks in the ECBLIST passed by CICS to the MVS WAIT facility when it runs out of work. Such ECBs can be posted using the MVS POST facility or by hand posting. Hand posting could, for example, be done by moving an appropriate value into the ECB. If hand posting is definitely not going to be used, it is preferable to use WAIT EXTERNAL.
A given ECB may not be waited on by more than one task at the same time. If this rule is not followed and the ECBLIST passed by CICS on the MVS WAIT contains duplicate ECB addresses, MVS abends CICS.
Function | PURGEABLE |
NOTPURGEABLE |
---|---|---|
DTIMOUT expired |
Abend AEXY |
No effect |
CEMT SET TASK PURGE |
Abend AEXY |
No effect |
CEMT SET TASK |
Abend AEXY |
Abend AEXY |
See Recovery for transactions for information about DTIMOUT and SET TASK for information about SET TASK PURGE|FORCEPURGE.
The ECBs specified are in read-only storage.
Default action: terminate the task abnormally.
DCL
ECB1 FIXED BIN(31), /* actual ecb */
ECB2 FIXED BIN(31), /* actual ecb */
ECB3 FIXED BIN(31); /* actual ecb */
DCL /* list of ecb addresses */
1 ECB_ADDR_LIST,
2 ECB_ADDR(3) PTR;
DCL /* ptr to each addr list */
PTR_ECB_ADDR_LIST PTR;
ECB_ADDR(1) = ADDR(ECB1);
ECB_ADDR(2) = ADDR(ECB2);
ECB_ADDR(3) = ADDR(ECB3);
/* set up pointer */
PTR_ECB_ADDR_LIST = ADDR(ECB_ADDR_LIST);
/* PTR_ECB_ADDR_LIST = ADDR(ECB_ADDR(1));
(alternative) */
EXEC CICS WAITCICS
ECBLIST(PTR_ECB_ADDR_LIST)
NUMEVENTS(3)
PURGEABLE