Problem:
Return code -2108 on a prepare statement (dynamic sql using Oracle 10g)
ORA-02108 PCC: invalid descriptor passed to run-time library
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.
Resolution:
Was passing the sql statement in a group level item setting the 49 level for length and data part. Changed the prepare to only pass the data part and that resolved the error.
For dynamic sql and oracle either use a host variable using the varying clause where you set the data and length or use a pic x(nn). 49 levels are not valid for Oracle.