The getNextElement() function reads data from a specified iSeries® data queue then deletes the data from the queue. Compare this function with the browseNextElement() function, which reads data in the same way, but does not delete the data from the queue.
If the destination for the data consists of an array of HEX(2) elements, the function reads the data as raw bytes; otherwise it reads the data as a STRING.
The function reads the first element in the queue unless you specify a key. If you specify a key, the function reads the element(s) that match the key and the search type (such as greater than the key value, not equal to the key value, and so on).
iplatformLib.getNextElement( dataQueueDef DataQueueDefinition inOut, elementData ANY inOut, wait INT in, [, keyData ANY in, searchType CHAR[2] inOut] ) returns (result BOOLEAN)