Batch Processing Setup

The batch process provides a public section called "EXTRACT" that can be called by an application engine process that prepares the absence results for reporting. You must prepare the list of parameters. Then the EXTRACT section generates the SQL requests based on the parameters and executes the requests.

A section called "MAIN" is provided for testing purposes. The MAIN section is used by the delivered run control Validate Report Data. The parameters are managed by the delivered application classes via an object &reportBatch defined at the component level:

import GP_RPT_DATA:ReportDataClasses:*;
Component ReportDataAE &reportBatch;
Section Step

Main

  1. Prepare the list of parameters based on the run control GP_RC_RPT_DTL.

  2. Call EXTRACT.

EXTRACT (public)

  1. Initialization.

  2. Print the parameters log file.

  3. Generate the requests (call to .GenerateSQL).

  4. Loop on the requests. Call to EXECUTE.

EXECUTE

  1. Print a message in the log file.

  2. Execute a request.

  3. Print a message in the log file.

The application engine is based on the state record GP_RPT_AET and includes the following dedicated temporary tables: GP_RPTC_TMP, GP_RPTO_TMP, GP_RPTE_TMP, GP_RPTS_TMP, and GP_RPTW_TMP.

Below is an example of the batch processing setup:

import GP_RPT_DATA:ReportDataClasses:*;
Component ReportDataAE &reportBatch;
&reportBatch.AddParamChar("EXTPRC", "COUNTRY", "USA");
&reportBatch.AddParamChar("EXTPRC", "NAME", "GP_REPORT");
&reportBatch.AddParamChar("EXTPRC", "TYPE", "P");
&reportBatch.AddParamChar("SELPYE", "SECUR", "Y");
&reportBatch.AddParamChar("SELCAL", "CALGRPID", GP_REGISTER_AET.CAL_RUN_ID);
&reportBatch.AddParamChar("SELCAL", "FROMDT", GP_REGISTER_AET.FROM_DT);
&reportBatch.AddParamChar("SELCAL", "TODT", GP_REGISTER_AET.TO_DT);

The call section name is EXTRACT, and the program ID is GP_EXT_AE.