Managing dependencies

Rational Developer for System z has built-in tools and functions that locate program dependencies on the MVS file system by using the specified SYSLIB as the search path. Some of the tools that use SYSLIB as the search path include project build, remote syntax check, content assist, show dependencies, open copy member, and remote debugger. When you store your source files in the Rational Team Concert for System z source control repository, you can choose to extract a subset of the source file base into the file system location specified by your data set prefix on z/OS (your z/OS sandbox). However, if your programs depend on members that Rational Developer for System z searches for using SYSLIB as the search path, those members will not be found unless you manage the dependencies manually.

There are several ways you can manage dependencies manually. The recommended best practice for managing dependencies is to maintain a team z/OS sandbox that contains a full copy of the source code base and periodically run a Team Build that specifies a team data set prefix. For example, if your data set prefix is USERID, the team prefix could be BUILD or COMMON. You can set up your SYSLIB so that it always uses your prefix first and then the common prefix data sets. With this setup, anything not found in your data set, will be found in the team data set. To use this method, your team build has to be set up to use a team repository workspace that automatically accepts changes from the stream. If you schedule the team build to run several times a day, you will have the latest versions of the source always available on the file system so that Rational Developer for System z dependency functions can access them.

The simplest method for managing dependencies is to make sure that all of your dependencies are always loaded into your z/OS sandbox by organizing the common artifacts (copy members) that your programs depend on into a set of common zComponent projects. To manage dependencies using this method, complete the following tasks:
1. Create a z/OS project with two (or more) MVS subprojects
Use one subproject as your working set subproject that will contain the programs you are modifying. Use the second subproject as your dependency management subproject to contain the common members on which your programs depend.
2. Load files to the working set subproject
Use the Load to z/OS wizard to load the members you intend to modify (for example, programs) to the working set subproject. See Loading artifacts to Rational Developer for System z.
3. Load files to the dependency management subproject
Use the Load to z/OS wizard a second time to load the copy members or include files on which your programs depend to the dependency management subproject. After the files are loaded, any incoming changes from the source control repository to any common member will appear in the Pending Changes view. If you accept the changes, they will appear in your dependency management subproject and the corresponding members will appear in your z/OS sandbox.
4. Set up your SYSLIB
Set up your SYSLIB so that it points to the data set prefix property specified in your build context. Whenever a Rational Developer for System z function runs that requires dependencies be found, that function will use the SYSLIB you specified in your build translators and resolve the dependent members in your sandbox.

You can also manage dependencies by requesting a personal build using your repository workspace and your data set prefix prior to starting development with Rational Developer for System z using that same data set prefix. However, if you use this method and the dependencies are updated after you run your personal build, your sandbox will not contain the most up-to-date versions of those files unless you run another build and accept all of the changes into your repository workspace.