Not too long ago, a friend of mine was having a problem with a program that he had just finished. We were using the source debugger to find out what was causing his problem. We figured out the problem Eventually, but in the course of our work, we came across some debugger commands and options that I was a Previously unaware of. Now I am not going to say that I know everything about the IBM source debugger but I have been using it for a good long while. I was surprised to discover something new, so I thought I'd share what I learned with you.
The% INDEX function is one of the functions that up until recently I was unaware of. It is really handy when you are manipulating multiple-occurrence of data structures. It is even more useful when used in conjunction with the _QRNU_DSI_xxxx built-in value (where xxxx = the name of a multi-occurrence of data structure). The _QRNU_DSI_xxxx EVAL command will return the current occurrence of a multiple-occurrence of data structure. Often this is a very useful thing to know during program execution and as far as I know this is the only way to get it. By using the% INDEX function you can also change the current occurrence of a multiple-occurrence of data structure. See below.