ChangeTraffic.bj

Action

Generate change traffic metrics. Change Traffic metrics compare the source files currently in a workspace with the source files in a change unit:

  • At the tag level, the number of new, modified, and deleted files in the change unit.
  • At the object level, the number of new, modified, deleted, and moved lines in the modified files, and the number of lines in the new and deleted files.
Important: An additional module required for generating the object level Change Traffic metrics is not included in the COBOL Analyzer installer. It is called diff and is a source comparison tool that has been developed as an open source module using GnuWin. As such, it is free to download, but is not something that Micro Focus can distribute.

Diff can create metrics to show differences between two source modules. These metrics are then gathered by ChangeTraffic.bj and loaded into CA via the Enterprise View core module apm-core.jar.

To download and install diff:
  1. Go to https://www.microfocus.com/docs/links.asp?ea=gnuwin .
  2. Go to the latest available version (currently it is 2.8.7.1) and select the executable to download. In this case it is diffutils-2.8.7-1.exe.
  3. Run the executable to install diff.
  4. Go to its installation directory. By default it is: C:\Program Files (x86)\GnuWin32\bin.
  5. Copy diff.exe into the CA bin directory. By default it is: C:\Program Files (x86)\Micro Focus\COBOL Analyzer\Bin.

Once diff has been placed in the CA bin directory, ChangeTraffic.bj can be run as part of Batch Refresh Process to compare the files that are currently in a workspace against the files that are about to be loaded into CA.

The change unit comprises the new and modified source files, and optionally a change unit description file, named Configuration.txt. Use the change unit description file to:

  • List the source files to be deleted, in the form DELETED:filename.
  • Assign the change metrics a date other than the date the script is executed. Specify the date in the form DATE: YYYY-MM-DD HH24:MI:SS.

For example:

DATE: 2010-03-15 17:12:13
DELETED:MYPROG.CBL
DELETED:MYCOPY.CPY
Note: Generating or importing change traffic metrics does not physically delete source files from the workspace. Use ProcessChangeUnit.bj with a change unit description file to delete source files from the workspace.

The output of ChangeTraffic.bj is an XML file that can be imported into the repository in online mode using the Enterprise View Configuration interface, or in batch mode using the following command:

java -jar avmcore-Panther.jar "workspace" "outputfile"

where workspace is the name of the workspace and outputfile is the XML output file.

Note: Enterprise View must be installed before you run the import command.

Syntax

ChangeTraffic UDCFolder SourceFolder XMLOutputFile ProjectName UDCName
Required Parameters Description

UDCFolder

Dedicated folder for the change unit.

SourceFolder

\Sources folder for the workspace.

XMLOutputFile

Output file.

ProjectName

Name of tag for the application.

UDCName

Name of tag for the change unit. Use this argument to distinguish between change units. Enter an empty string if you do not want to specify a change unit tag.