You are currently on IBM Systems Media’s archival website. Click here to view our new website.


Code on the Road

These tips for mobile programming give you the freedom to work where you want

Those of you who’ve been reading our articles for a while know that we’re huge fans of the editor that’s part of Remote Systems Explorer packaged either in WebSphere Development Studio Client (WDSC) or Rational Developer for i (RDi). One of the advantages of using the workstation-based tools is the fact that it’s far easier to work away from your regular office network than when using a host-based editor. It’s a godsend to people like us who travel frequently and still need to get some coding done while on the road. Other developers we talk to find it useful to be able to work from home occasionally where the network connection may be less than optimum.


This month, we decided to concentrate on the capability to work disconnected from a network and/or transport or duplicate your office development environment on your PC at home.

Disconnecting From the Host with Projects

When working disconnected from your office network, you should use the iSeries Projects perspective (called i5/OS Projects if you’re using RDi). The Projects perspective looks and works much like RSE except that it’s designed to let you work with little or no communication to the host i system after some initial setup. Some developers use projects even when they’re attached to their office networks to be able to isolate the components of a specific project from their other programming tasks.

To open the Projects perspective, use the Window pull-down menu in the RSE workbench, select “Open Perspective” and from the resulting menu, choose “iSeries Projects” (or “i5/OS Projects”). It looks much like the RSE perspective, except there’s now a Project Navigator view where the Remote Systems view was in RSE (in the top-left window of the workbench). The Remote Systems view is still there—it’s simply moved down to the bottom left, occupying the same position as the Properties view.

A project consists of local copies of the source members you need for the project you’re working on. The Project Navigator shows the source members as if they were in the source files on the host i system. A project is associated with one specific library on the i system and it remembers what source files the copied members came from so it can put them back in the appropriate places when the developer requests it. You may also create a new source member in any of the source files in your project and those will be copied back to the host as well. You can even create a new source physical file in the project, if you so desire.

You can create a project in two ways. The first is to create a project explicitly, giving it a name of your choice and then copying source into it. To do this, right-click in the Project Navigator view and select “New...,” then “iSeries (or i5/OS) Project.” You’ll need to give the project a name and specify the host connection and the library associated with the project. After the project is created, use the RSE view to select source members from the associated library and right-click to add them to your project.

The second way to create a project, which we often use when we need to quickly dash out the door on a trip, is to simply right-click on one or more members in the RSE view (no need to be in the Projects perspective in this case) and choose “Make Available Offline.” This produces a message stating that it will add these members to a project with a name that’s derived from your connection name concatenated with the library name. If necessary, that project will be created automatically for you as part of this action before copying the members into it.

Now that you have the source members in the project you want to work on when disconnected, you should also make sure you have any required external file descriptions cached to your workspace. Chances are, if you’ve been working on these same source members in RSE, you already have them cached. But you should use one of these methods to ensure that’s the case:

  • Open all project source members in the editor and populate (or refresh) the Outline view for each.
  • Use the RSE view to select the files needed (you can select multiple files at once) and choose “Cache File Descriptions.”
  • Verify each source member while connected to cache any uncached file descriptions.

Now you’re set to continue working after disconnecting from the network. Remember that not only can you edit the code and use your Outline view while disconnected, you may also use the Verify option (under the Source pull-down menu) to find and correct any potential “compile time” errors so you’ll get clean compiles after you push the changed source back to the host.

Reconnecting to the Host

After you’ve made any changes (and/or created new members) in the project and have reconnected to your host system, you can use the “Remote Actions” context menu to push individual members or all changed members in a source file or project back with a single request. Since the copied members haven’t been locked from other developers while they’re in your project, you may get a warning if you’re about to overwrite changes made directly to the source members.

You may also either compile members directly from the project or use RSE to do the compiles after pushing your changes back. IBM also supplies a build option with projects that can automatically recompile your programs when they’re pushed back to the host system, but we’ll leave it up to you to study that option.

Moving to Other Computers

Due to the amount we travel, we use our laptops all the time, in the office and on the road. So it’s pretty simple for us to create a project and carry it with us on the road. But what if you use a desktop PC at the office and need to get your project onto another computer (such as a laptop or your home PC) to continue working on it?

Probably the easiest way is to copy your entire workspace to the other PC, most likely using a USB thumb drive. If you aren’t sure where your workspace is, use the File pull-down menu in the RSE workbench to choose “Switch Workspace.” This shows you the location of your current workspace. Copy that directory (and ALL its subdirectories) to the other PC. Make sure when you start up the workbench on the laptop/home PC that you specify the workspace location you just copied. This can also be done via the Switch Workspace option.

Of course, you’ll need to ensure you have the same version of RSE installed on both computers so you can easily transport the workspace. If you’re installing the WDSC version of RSE, we recommend you install just the “RSE/Projects” version and deselect all of the Web/Java/Webfacing, etc., options to significantly reduce the install time and space required.

This technique of copying your workspace from one computer to another is also effective if you want to work from home using RSE with a high-speed Internet connection. While you could create a new workspace for RSE and work from home, copying one gives you all of the preference customizations, connections, cached files, etc. from the other.

Road Coding

These capabilities mean you have no reason to stop programming just because you’re away from the office network. Or perhaps a better way to look at it is you have no reason why you must stay at the office to do your programming when you could be working elsewhere ... like the beach!



Jon Paris is a technical editor with IBM Systems Magazine and co-owner of Partner400.

Susan Gantner is a technical editor with IBM Systems Magazine and co-owner of Partner400.



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Are You Multilingual?

Rational enables development in multiplatform environments

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters