From the code you supplied, I see you have not coded FROM() in the Start, and thus there is no data to be retrieved, which, of course, gives the Enddata condition , and the abend. You should ALWAYS retreive until the Enddata condition is signalled. This condition removes the AID (Automatic Initiate Descriptor) from the Queue. Otherwise the task will be started over and over. To pevent this, the AEI2 is issued, to make you aware of the missing handling of the condition.