Problem solve Get help with specific problems with your technologies, process and projects.

Debug value of pointer

See what the pointer is pointing to when debugging ILE RPG.

When debugging ILE RPG code, to see what a pointer is pointing to, you can use :x or :c when using the EVAL debugger...

command on the pointer itself. This means you can debug a pointer's value without having an RPG BASED variable.

This shows the first 10 bytes that "ptr" is pointing to, as character data: ===> EVAL ptr:c 10

This shows the first 10 bytes that "ptr" is pointing to, in hex: ===> EVAL ptr:x 10

This is useful when the pointer is pointing to data that is not readable as character data--for example, packed data. If ptr is pointing to a packed field with the value 12345, ptr:x 3 would show you X'12345F'.


The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Dig Deeper on iSeries ILE programming