Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How does the Batch Refresh Process work with a homonyms workspace?

How does the Batch Refresh Process work with a homonyms workspace?

 

Problem

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?

Resolution

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.:

loadlib\dir1\Dispatch.cbl

is considered to be a different object to:

loadlib\dir2\Dispatch.cbl

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.


<BRP_directory>\PreparedSources\loadlib\dir2\Dispatch.cbl

whereas the following would be considered new files:

<BRP_directory>\PreparedSources\loadlib\dir2\newprog1.cbl
<BRP_directory>\PreparedSources\loadlib\dir3\Dispatch.cbl

Where:

<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

  1. Create a new workspace.
  2. Using Enterprise Analyzer Administrator, configure the workspace for BRP. This is done from the EA Administration tool, Administer/Configure BRP.
    1. A list of workspaces is displayed that have already been configured for use with BRP.
    2. If the workspace in question does not already appear in the list, select the ‘Add’ button to configure BRP for the test workspace. 
    3. You will be taken through the configure BRP screens, the default options can be used.
    4. 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>.
  3. 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.
  4. 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.
  5. 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

  1. 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.
  2. From a dos command prompt window that has been opened ‘as administrator’ change to the <Workspace BRP directory> and execute the runBRP batch file.
  3. Once BRP has completed, a new version of dir1\Dispatch.cbl will have loaded into the workspace together with a new files:
    a. dir2\newprogr1.cbl
    b. dir3\Dispatch.cbl
  4. 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.

Homonyms_Source.zip

Incident # 2780569

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2014-08-04 13:59
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.