Description:
A batch program running against an IDMS CV is using DC-BATCH protocol and issuing PUT QUEUE and GET QUEUE commands. The program completes successfully but the transaction in the CV side fails with:
DC001003 Vnn Tnnn TASK:RHDCNP3S PROG:xxxxxxxx STALLED WAITING FOR EREECB AT nnnnnnnn DC027007 V10 Tnnn TASK:RHDCNP3S PROG:xxxxxxxx ABENDED WITH CODE D002 DC201006 V10 T1 CV-Status BE-TaskID Pri FE - ID1 FE - ID2 FE TaskCD FE User ID DC201006 V10 T1 ABRT D002 nnn 100 BATCBULK nnnnnnnn xxxxxxxxx yyyyyyyy DC203005 V10 T530 Program-ID RHDCRUAL Transaction-ID nnnnnnnn has been Rolled OUT !
Solution:
When tasks stall waiting on EREECB after the batch job has finished it indicates that the job did not terminate the database transaction properly. The transaction will remain active until the external wait time defined in the SYSGEN is exceeded. IDMS then terminates the transaction and performs a rollback. Normally a transaction is terminated by issuing a FINISH DML command. However, the FINISH only terminates the database transaction, it will not end the queue transaction. DC-BATCH protocol programs writing to queues need to issue a FINISH TASK instead of a FINISH so that the queue transactions are also committed. Another option is to code a COMMIT TASK which also commits queue area updates.