What it means
CICS found a length it could not accept, the program did not check RESP, so CICS ended the task with AEIV.
On LINK, RESP2 says which length: 11 COMMAREA length below 0 or too big, 12 DATALENGTH negative, 13 DATALENGTH bigger than LENGTH, 26 zero COMMAREA address with a nonzero length, 27 bad INPUTMSG length.
Typical causes
- LENGTH points at the wrong field, so CICS picks up a garbage or negative value.
- In Assembler, LENGTH given as an equate value instead of the address of a halfword holding the length.
- DATALENGTH set larger than LENGTH, or left negative.
- A COMMAREA pointer is not set but a length is passed.
- LENGTH is larger than the real data area, so the copy would overlap other storage.
How to fix it
- Find the failing command from the abend message and trace or dump; capture RESP2 if you can.
- Check that LENGTH and DATALENGTH name fields that hold the right binary values at the time of the call.
- Make LENGTH no larger than the data area it describes.
- In Assembler, pass the length field, not an equate, or let the translator work it out.
- Add RESP and RESP2 so a bad length is reported instead of abending.