How does the Batch Refresh Process work with a homonyms workspace?
The Batch Refresh Process is a way to load updated versions of source files. How are existing files updated, or new ones loaded into a homonyms workspace?
With the introduction of the 3.5 version of Enterprise Analyzer (EA), support was added for homonyms within a workspace. This means that it is now possible to have more than one copy of source files/programs/Java classes that have the same name loaded into the workspace. The way that two files that have the same name are kept as separate items within the workspace is that they are loaded from different directories. This means that the path of the file now makes up its name.
It should be noted that homonyms are only supported in workspaces that are created with EA 3.5 or later. Homonyms are not supported in workspaces that have been upgraded from earlier versions of EA.
So if two copies of the file Dispatch.cbl are to exist within a new EA 3.5 workspace, then they have to be loaded from different directories. I.e.:
is considered to be a different object to:
Both of these items can create the same program, which in this example is named 'dispatch'. Attached below is a zip containing the example programs and steps to show how to load the original files and then how to refresh the files using the Batch Refresh Process (BRP).
When using the BRP to update or add files to a workspace, the files are placed in the PreparedSources directory that is under the BRP directory for the workspace. The important point to note is that the directory structure under PreparedSources directory needs to match the directory structure used to load the original file if the file is to be replaced.
If a new version of the file is to be added to the workspace, then this needs to go into a different directory. Also, new files placed in the original directory structure will be added to workspace and will not replace files that have the same name but were loaded from a different directory.
If the same version of a copybook is used by different projects, it should only be loaded/refreshed from the first directory structure, otherwise the workspace would have duplicate versions of the same copybook.
So, going back to examples of dispatch.cbl, the following file would replace one of the two loaded copies of dispatch.cbl.
whereas the following would be considered new files:
<BRP_directory> is the BRP directory for the workspace. See point 2.d for more on the BRP directory.
Demo to show this working:
Initial Load and Verify of programs
- Create a new workspace.
- Using Enterprise Analyzer Administrator, configure the workspace for BRP. This is done from the EA Administration tool, Administer/Configure BRP.
- A list of workspaces is displayed that have already been configured for use with BRP.
- If the workspace in question does not already appear in the list, select the ‘Add’ button to configure BRP for the test workspace.
- You will be taken through the configure BRP screens, the default options can be used.
- As part of general configuration process, the <BRP_ directory> is defined. This is the root directory for all the the files used by BRP. The reports and logs are created under this directory and the PreparedSources directory is also beneath the <BRP_ directory>.
- Unzip the attached demo. This will create two main directories, loadlib and loadlib-BRP. Under each loadlib directory, there are either two or three sub directories that contain the actual files.
- Create a test project in the selected workspace, then drag and drop the loadlib directory into the project. The will load two versions of the Dispatch.cbl file, one from the dir1 directory and one from the dir2 directory.
- Verify the two programs. Each version of Dispatch.cbl calls different programs, so the version in dir1 calls programs prgram1 and prgram2 with the version in dir2 calls programs prgram3 and prgram4.
BRP Refresh and Load of New Programs
- Copy the loadlib-BRP directory to the <BRP_ directory>\ PreparedSources directory. The directory then needs to be renamed to as ‘loadlib’. This contains a mixture of new files to add to the workspace plus a replacement file.
- From a dos command prompt window that has been opened ‘as administrator’ change to the <Workspace BRP directory> and execute the runBRP batch file.
- Once BRP has completed, a new version of dir1\Dispatch.cbl will have loaded into the workspace together with a new files:
- The new files will be added to the default project in the workspace.
The new version of dir1\Dispatch.cbl has the code re-arranged into paragraphs. It has the same relationships as the original version.
The program dir3\ Dispatch.cbl shows that a file with the same name as an existing file in the workspace is in a different directory it is treated as new entity.
The program dir2\Newprog1.cbl shows that a program with a different base name but in an existing directory is considered a new entity as well.
Incident # 2780569