The parse exit common area contains a pointer to the SQL text area. The text area consists of the SQL text preceded by a 2-byte SQL length field, which provides the number of bytes in the SQL text. (The SQL length field does not include the 2 bytes for the length field itself.)
If your exit routine changes the length of the SQL text, it must also change the value in the 2-byte length field.
If the SQL text is shortened by the processing of your exit routine, you need only to correct the value in the length field.
If the SQL text is expanded by your exit routine, you must acquire additional storage to handle the overflow.
As you code your exit routine to alter the SQL text,
be aware that AMD2 does not modify the SQL text
after your routine is executed. Therefore, the SQL statements must
be in the DB2 syntax before the parse exit routine returns to AMD2.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |