I know this problem. This is just becuase of your wrong comiple options. If you compile wrong options it limits to 10,000 bytes (max size).
Proper compile options:
For stay resident --- Yes option
RENT,TRUNC(BIN),NODYNAM,DATA(31)
RENT,AMODE(31),RMODE(ANY),REUS
For stay resident --- No option
TRUNC(OPT),NODYNAM,AMODE(31)
RENT,AMODE(31),RMODE(ANY)
these will limit each output parameter to 32k but try to size it to get bettre performance. Best of luck Need more help let me know.