More Jewels in the New ‘RSE Quick Start Guide’
Continuing The RSE Quick Start Guide
Recently, we published the first excerpt of our RSE Quick Start Guide, newly updated for RDP. Part 1 covered installing RDP and configuring your connection. This time, we’re continuing where we left off to utilize your new connection to IBM i to edit some source code and see what all the fuss is about.
RSE Quick Start Guide Excerpt - Part 2
Let’s Get to Work!
You should now be ready to use your RSE connection. Note the “subsystems” listed under your connection name: Objects, Commands, Jobs, IFS files, Spooled Files and Qshells. (Note that the term “subsystem” in RSE has nothing to do with IBM i host subsystems.) In this guide, we will concentrate only on Objects, but you may want to explore some of the others on your own.
Expand the Objects subsystem (if it is not already expanded) by clicking on the arrow or the + sign. The first three entries (Work with libraries, etc.) are reminiscent of PDM. However, they don’t work quite the same as PDM. They are like a prompted “Work with ...” command in PDM but each filter can be named and saved for future use. You will want to create your own filters eventually, but for now, in the interest of getting you off to a “quick start,” we’re going to skip over these.
Let’s begin by using one of the default filters supplied with RSE: the Library list filter. By the way – a word of warning – avoid expanding the User libraries supplied filter. On most systems, the number of user libraries is so large that expanding this filter leads to excessive time spent twiddling thumbs waiting for the list to appear! And when it finally does appear, it’s too long to be useful.
Expand the Library list filter in your connection. If you didn’t save your user ID and password earlier when you verified your connection, you will be asked for them again here (and many more times later, so now would be a good time to save them). You will probably notice a delay as the workbench goes to the IBM i to create a server job for your requests and retrieves the library list for that job. You should eventually see a list of libraries. This is the default library list for your user profile.
If this list doesn’t look like the library list in your interactive jobs, it’s probably because you have an initial program that runs after you sign on to change your library list. You can customize your initial library list later using the Properties of your Objects subsystem. We’ll show you how to do that in a later section of the guide.
You can expand a library to see its objects. Pick a library (preferably a relatively small one and/or your personal library). If the library you want to work with doesn’t appear in the Library list, you may add it (both to the filter and to the actual library list of the server job on the host) by right-clicking on the Library list entry and selecting “Add Library List Entry…” or “Change Current Library….” The wizard will step you through these actions. Changing your library list this way only affects the server job you’re connected to at the moment. If you were to disconnect from the host and reconnect later, you will need to adjust your library list again, much as you would do if you were disconnected from an interactive session. If you want the library list to be maintained permanently, use the aforementioned properties dialog.
Many objects can be expanded as well. In our case, look for a source physical file to expand. Objects appear in the same sequence they would in PDM (i.e., *Pgms come before *Files and are in alphabetical sequence within object type). If the list seems too long to work with productively, you now know why you have the flexibility to create your own filtered lists, as we mentioned. Remember that you can always make the Remote Systems list full screen by double-clicking on the tab at the top of the view.
Expanding a source physical file shows a list of members. You’ll notice that you have the source type and member name listed. If you’re a big user of other information from PDM, such as the member text, try this: Right-click on the source file name (e.g., QRPGLESRC) and select “Show in table.” You will see a list of members appearing in a separate view—the Object Table View. If a command entry area obstructs part of the list at the bottom, you can close it by clicking on the blue arrow just above the word “Command.”
You will most likely want to double-click on the Object Table view tab to take it to full screen. Now you have a more “PDM-like” view of the members in the file, with a couple of twists. For example, click on a column heading in the table and it will sort the members in that sequence. Click on the small down arrow (the view menu arrow) at the top right corner of this view (its position is highlighted in Figure 1) and select “Show Columns,” then select “All” from the resulting menu. Voila! You now have Date Created and Date Last Modified in your member list as well. You may need to stretch the column headings to see all the information. Object Table view works for libraries and objects as well as members. You can choose whether to interact with your objects/members from the table view or from the Remote System view. Right-clicking on a member in either list shows the same options available to you and double-clicking will open the member for edit.
Using either the Object Table view or the Remote Systems view, open a source member in the editor. The easiest way to do this is to double-click on the member name. Alternatively, you can right-click and select “Open with,” then “Remote Systems LPEX Editor.” Note that if you don’t like drilling down to find a member to open it and you know the precise name of the member you need to open, you can always right-click on Objects (in the Remote Systems view) and select Open Member....
If it’s a very large member and/or if your connection to the host is not speedy, it could take a while for the source to appear in the editor view in the middle of your workbench. While it does take longer to see the source in this editor compared to SEU, once it’s open here, it’s now local. This means you can go from the top to the bottom of the source as fast as you can drag the scroll bar—faster still if you use the keyboard shortcuts in the edit view Ctl-Home (top) and Ctl-End (bottom). We’ll look at a few of the many other navigational features of the editor later. Also, you don’t need to close a member to open another one, nor do you need to (or want to) close it to save it or to compile it.
Before we go on to look at the editor, go back to either Remote Systems view or Object Table view and choose two or three other source members to open—from the same or a different source file. Do NOT close the first source member you opened. One of the greatest features of the workstation editors is that you can have multiple members open at once. Open an RPGLE source member if you have one, as we’ll be using that language in our editor example a little later. Note that when a member is open for edit in this editor, it is locked on the host to avoid others changing it at the same time—just as SEU locks open members.
Notice that when you have multiple members open, they each have a tab at the top of the editor view. You can simply click on the tab with your mouse to move from one to another. If you prefer to leave your hands on the keyboard, you can use a keyboard shortcut—either Ctl-F6 or Ctl-E.