IBM RDi Shortcut Of The Day
Imagine you are editing some source in IBM i RDi. You are looking at an exsr statement and you have your cursor positioned on the subroutine name. There are two ways that I know of to jump to the subroutine. The first method involves the following steps:
- double click on the subroutine name to select it
- copy it with ctrl + v
- ctrl + home to get to the top of the source
- ctrl + f to open the search box
- ctrl + v to paste the subroutine in
- escape to close the search box
- shift + f4 to repeat find (because there are multiple exsr statements for this subroutine)
That seems like a lot of steps, but they are probably subconscious movements for you by now, after repeated use. If you are anything like me, it takes a matter of seconds to do the above. But what if there are lots of occurrences of the subroutine name (e.g. in comments or multiple exsr statements)? You have to keep pressing F16 until you finally arrive at the subroutine's begsr. And then of course you risk going past it.
The second method of finding the subroutine involves the ever useful outline view. Open up Main Procedure > Subroutines, and you can see all subroutines used. Expand a subroutine and you can see all references to it. Click on any of the expanded references to jump to the exsr statement, or click on the subroutine name you expanded to jump to the subroutine itself. This method is probably quicker than the first, and feels intuitively "neater" to me.
But it's still a few more clicks than is strictly necessary.
Enter IBM RDi Shortcut Of The Day!
Take the exsr statement you prepared earlier. Position the cursor on the subroutine name. Press F3. You are transported immediately to the start of the subroutine.