Home

Key Functionalities of ERPJewels

What is new in ERPJEWELS

Latest Trends

ETL/Trends in Data mining/ Trends in Data mining/ Data tranformation and multi-dimensional repoting capabilites

Download

Docs, Executable, AVI and others in Download Section

Hot Links

Find what is Hot in ERPJewels

Related Links

Procedure to use memory based algorithm for data grouping

  1. Decide the program for which memory based grouping is required. The main criteria for program selection should be the proportion of grouped records to total extracted records. The lower the proportion, the greater the savings will be.
  1. What is the kind of grouping? It can be for
    1. Single summary without detail for baan report
    2. Multiple parallel summaries for baan report
    3. Table grouping updation within same program.
  1. Decide the session or combination of sessions to use for the generation of summaries / grouping.  Session tudll8200m000 is ideal for single session containing multiple reports containing single summary with no detail. Whereas tudll8200m001 is ideal for single report containing multiple parallel summary within the same report or single summary. Tudll8200m0002 is useful for grouping of table fields. (Please see screens listed at the end for session screens ) .
  1. Run the code generator session with proper details. Generate the code in Baan2notepad (ie device for printing in notepad or wordpad) . Save the generated code with a file name for later reference.
  1. In the generated code, comments section is more informative. It contains more information about the table or report for which the grouping is being done. It may or may  not be copied to the actual program . This comments sections contain important information like  kind of summary possible with report , any specific sortfield / indexfield excluded , sortfield / index field details , accumulator details,  report code etc
  1. The declaration section contains the necessary declaration statements with appropriate comments. These statements need to be added to the declaration section of the program. The program must be compiled to see for errors if any.
  1. Review the program under performance improvement. Identify each rprt_open / rprt_close and rprt_send / brp.open / brp.close and brp.send there in the program and write down the report group and report no in comments below the use those functions. For table based grouping find db.insert and db.update functions for the table and write appropriate comments .This will help u copy paste only relevant section of the code correctly.

  1. It may quite be possible that the entire summary generation exercise be done in various parts of the logic wherein each part of the logic may have some static value of the sort field / index field. It will be good practice to exclude such sort fields from the code generation and make array size smaller. Though this will lead to little bit more effort for developer, it will be better for the user. Write down appropriate comments for each such logic so that at each part. This exercise will call for resetting the arrays to 1 and array counter to 0 at the end of each part.

  1. When the code is generated from different code generator, make sure to use different dll variables for summaries running (entire ETL cycle – Extraction, Transformation and Loading) in parallel in the program. Summaries for which the complete ETL cycle happens at different point in time.
  1. Replace the report /table initialization /termination code in the program at appropriate place.  At each substitution it may be a good practice to compile the code.
  1. Follow each rprt_send / db_insert (at detail section) and comments written there to replace the code. Keep replacing rprt_send and db.insert with appropriate memory function at detail level.At each detail replacement, validate the declaration, initialization and termination for variable accuracies , search length , accumulator functions , group string assignments etc .
  1. When there are multiple summaries (ie parallel summaries) in a single report, u need to generate respective code in in tudll8200m001.  Following points may be worth noting
    1. In the code identify the appropriate rprt_send for the respective after.field layout based on the print condition of the after.field layout.
    2. In 3rd screen of the session tudll8200m001, one may use “Prefix for DLL variables” to indicate that a specific variable is used for specific kind of summary. E.g one can use ‘mt’ prefix for metal summaries.
    3. One may restore the variables to original default variable code if there is no need for separate variable code. e.g. If  indexlen may be 6 for all summaries indexlen , we can have 1 single variable for the same . Similarly reportcode also can be shared. Same way arrayidx and search position can also be shared. And there is not need to prefix it with different value than the general code.
    4. For summaries running in parallel, we need different variable structure . So prefix the variable structure with a short code to indicate some association for the kind of summary being done.
    5. The place for report initialization and termination will be the same. So all report summary initialization and termination should be together in same function. However the detail section for each summary can be at different place , depending on the kind of detail being addressed (corresponding to which print layout in the report).
    6. While trying to include / exclude the sort field for grouping, the consideration may be given to whether those fields are really different for the summary being generated. If those field remain the same, there is strong case to exclude the sort field for grouping purposes.
  1. Code generated with ~~~~~~~   are the lines pointing developer of specific attention. It could for example be
    1. When report aggregate fields are expression fields, the generated code may show assignments to expressions. This however is wrong technically. This can however be easily tackled by introducing a report variable. Considering the kind of gains and program efficiency one gets, this is an exercise worth doing.
    2. When there are assignments to be made to make an aggregate condition true for a variable being aggregated in various conditions, code generator indicates the same through remark. Normally this is a clear case, when aggregate condition checks for equality on single variable, it can be easily made true by making that assignments. However when aggregate expression contains and / or logical operators or inequality conditions code generator can not write a statement to make the same true. Programmer has to write suitable code at the place indicated by the code generator.
    3. If same variable is in aggregate function with mutually non-exclusive conditions, the programmer has to introduce 1 variable to bring exclusivity of conditions.
  2.  Program will also generate the code for top down grouping with memory based algorithms if any required,

Developer Experience      

A session containing 9 Baan reports and overall 21 summaries therein could be migrated to QSS algorithms within 1 day. This drastically reduces the complexity involved with QSS functions .

Session Screens

Screen 1 Code generator for entire session (tudll8200m000) Form 1

Screen 2 Code generator for entire session (tudll8200m000) Form 2

 

Screen 3 Code generator for a report  (tudll8200m001) Form 1

Screen 4 Code generator for a report  (tudll8200m001) Form 2

Screen 5 Code generator for a report  (tudll8200m001) Form 3

Screen 6 Code generator for a table   (tudll8200m002) Form 1

 

Screen 6 Code generator for a table   (tudll8200m002) Form 2

Screen 6 Code generator for a table   (tudll8200m002) Form 3



FastTrack to ERPJEWELS :

Latest Trend | Hot Links | Jewels of ERPJewels | Jewels of Baan | Jewels of Excel