Project

General

Profile

Calculating Report Results

Introduction

After the FWD "conversion front end" completes without any errors, an automated process must be executed to calculate the reporting results and statistics that can be explored using the Code Analytics. This step is also called "Report Generation".

Do not run this step unless all the ASTs created during parsing are properly formed. If there are errors during the conversion front end, the resulting ASTs are very likely to be malformed and are certainly invalid for use in Code Analytics.

Running Report Generation

This section assumes you have used the sample project as a template. In that project, there is an Apache Ant build.xml that provides multiple build targets which include report generation.

This step will only work properly using the ASTs that are created as part of the front end conversion process. It will not work properly on ASTs that have been fully processed for conversion to Java. It is important to have an isolated run of the front end before running the processing that calculates the report results and statistics.

The project template for build.xml includes two targets that allow running just the conversion front end:

Target Description
rpt Parse the project and generate code and schema reports. This will check for the existence of 'file-cvt-list.txt'. If it exists, then convert.front.list will be executed, otherwise convert.front is executed. After the conversion front end runs, the ReportDriver is executed to calculate the reporting results and statistics. This will create a database (possibly a very large database) that can be accessed via a web application.
rpt-no-front Generate code and schema reports without any execution of the conversion front end. Use this target there has been a separate successful execution of convert.front or convert.front.list. This target will run the ReportDriver to calculate the reporting results and statistics. This will create a database (possibly a very large database) that can be accessed via a web application.

When you are getting the application code parsed for the first time, it is best to just run the parsing by itself. This is because for larger applications, it is expected that there will be some issues to be resolved. Running the "front end" by itself will avoid other processing (the report calculations) which are useless if the project is not parsing properly. Make sure to review the output of the parsing run to see if there are any errors and resolve those errors before running the report calculation targets. Using ant rpt-no-front is useful in this case, once the front end successfully completes.

Over time, as 4GL code and schemata changes are made, they must be incorporated into the project. Anytime the 4GL code or schemata changes, the parsing and report generation targets will need to be re-executed. This can be done using a single target ant rpt.

To clear previous results and then run parsing and report generation:

Linux Windows
cd ~/app_name
ant clean.all
ant rpt
c:
cd c:\app_name
ant clean.all
ant rpt

Warning: running report generation may take a very long time to run. Small projects can be processed quickly. But for a project of 5MM LOC that takes 40 minutes to run the front end conversion, then it may take 5 hours to run the report generation. for a 15MM LOC application, it might take 4.5 hours to run the front end conversion, and it will likely take 18 hours to run the report generation.

For details on manually running the ReportDriver, please see Running the Report Driver.


© 2004-2017 Golden Code Development Corporation. ALL RIGHTS RESERVED.

Next: Starting the Report Server