The NEXT_ITEM_TYPE function returns an integer code identifying the data type of the next data item in a message that has been retrieved into the session’s local message buffer. As each item is moved off of the local message buffer with the UNPACK_MESSAGE procedure, the NEXT_ITEM_TYPE function will return the data type code for the next available item. A code of 0 is returned when there are no more items left in the message.
Parameters
typecode
Code identifying the data type of the next data item as shown in the following table.
Type Code
Data Type
0
No more data items
9
NUMBER
11
VARCHAR2
13
DATE
23
RAW
Note: The type codes list in the table are not compatible with Oracle databases. Oracle assigns a different numbering sequence to the data types.
Examples
The following example shows a pipe packed with a NUMBER item, a VARCHAR2 item, a DATE item, and a RAW item. A second anonymous block then uses the NEXT_ITEM_TYPE function to display the type code of each item.