Today, my addition of new data queue CL commands continues. Taking advantage of data queues in application development often requires peeking at the data queue content to verify or debug the data exchange between your programs. This need inspired the Display Data Queue Entry (DSPDTAQE) command.
The DSPDTAQE command is based on the nondestructive data queue entry retrieval that the Retrieve Data Queue Message (QMHRDQM) API performs. Using this API, you can retrieve as many data queue entries as your receiver variable can hold, without actually removing the data queue entries from the data queue.
On a side note, the nondestructive data queue entry retrieval capability has also been added to the original Receive Data Queue (QRCVDTAQ) API, but this API retrieves only one data queue entry at a time and is therefore of no use if you want to read all data queue entries without actually removing them.
Currently, no IBM-provided command displays a data queue’s contents. You could use the Dump Object (DMPOBJ) command to generate an object dump of the data queue, including the queue entries, but analyzing the resulting spooled file can be challenging and time-consuming. Nevertheless, the DMPOBJ command does the job if no other alternative is available.