Finding unexpected storage overwrite errors in assembler

While your program is running, some storage might unexpectedly change its value and you want to find out when and where this happened. Consider the following example, where the program finds a value unexpectedly modified:

L	R0,X'24'(R3)

To find the address of the operand being loaded, enter the following command:

LIST R3->+X'24'

Suppose the result is X'00521D42'. To set a breakpoint that watches for a change in storage values starting at that address and for the next 4 bytes, enter the following command:

AT CHANGE %STORAGE(X'00521D42',4)

When the program runs, z/OS® Debugger stops if the value in this storage changes.