Summary applications write directly to the Application server's memory, allowing for potentially quicker reads than a traditional database. To read data that has been loaded into memory, end-users would need to run a report over this data set. Like the traditional summary, In-Memory Summaries require they must be subtotaled by one and only one field. Again, like the standard summary template, data will be summarized by the aggregate of the subtotal keys, meaning now detail level information will be loaded into memory.
Program Name: This will be the application’s number. By default, m-Power uses the letter S (Summary) followed by a five digit number.
Select Only Matching Records: Select either 'No', for a left outer join, or 'Yes' for an inner join. A left outer join will return all records from the primary table along with matching records from the secondary tables. An inner join will return records from the primary and secondary tables only where matching records are found.
Summary Table Name: This will be the name given to the table created by the application.
Summary Table Schema/Library: Specify the schema/library in which your application will be created. This will default to your current data dictionary.
Summary Table Description: Specify a description for your table.
Replace or Add Records: Selecting 'Replace' will clear the table and then add data, whereas selecting 'add' will append the data to the existing table.
Template: You can select a template by scrolling through the available templates. The templates define the general layout and functionality of the resulting application. This section will list all the available maintenance templates; you will see a small screenshot of what that template looks like at runtime. Learn more about templates.
Select the first, or only, table you want your summary to be written over, and then select your fields. After adding your fields, you are brought to the Summary Field Definition screen. Seeing as you are building a summary application, m-Power assumes you would like to Summarize or Average numeric fields. If you would like to do so, select either the "Summary" or "Average" option from the "Sum/Avg" dropdown list. If you do not select either of these options, m-Power will place the last value from the detail level into each subtotal line.
Note: Selecting Average or Summary will create a new field within your Data Dictionary. Because of this, you must specify a new name. Additionally, consider adding a length of two to new fields' lengths to compensate for possible data truncation. If you would like to add a new description, you can do so under the "Text" column.
After finishing, click 'Accept'. You can now join to additional tables, and will be brought back to the Summary Field Definition screen after each subsequent join.
When building a summary application, multiple sequence keys are allowed. However, only one subtotaled field is allowed, and this subtotal will represent the data in the table as no detail information will be included in the new summary table.
Delete: You can delete fields by clicking the checkbox and clicking Accept. If a field has a red circle with a cross line, that means that the field is being used somewhere else in the application (sequence, calculation, etc.), and, due to this dependency, is not available for deletion. NOTE: Deleting a field will remove the field from the application only, the table will be unchanged.
Field Name: This is the same name the field has in the table.
Table: The name of the table where that field exists.
New Name: This is the new name you gave to your field in the Summary Field Definition screen.
New Description: This is the new description you gave to your field in the Summary Field Definition screen.
Write Field?: Specify whether the field should be written to the database.
Size: This displays the length of a field. If a field has a length consisting of two numbers separated by a comma, the first number will be the integer length and the second the decimal length of the field.
User def: This option has been deprecated.
Record Selections can be created over any database fields. These are the options:
Relation: A drop down allows you to select a relationship for the filter.
Value: This is the value to compare against. The options are:
Constant Value: A constant value allows you to hard-code any given value into a selection. This value cannot be modified by the end-user at run–time.
Application Field Value: Developers have the option of comparing a value from one field to a value from another field within the same record.
Runtime Value Prompt: This option allows end-users to decide the value of their record selection at runtime.
And/Or: When creating multiple record selections, you have the option to set them as "and" or "or" Example: selection A "and" selection B will display only records that match both selections. Selection A "or" selection B will display records that match one or both selections. Learn more.
Calculations are a very powerful feature of m-Power. In summaries, calculations can be written to the database to create a new field. Learn more. As such, developers have the ability to name the field created by the calculation.
Note: If the chosen Calculation Name already exists (either as a field or another summary calculation) with different attributes, an error message will be displayed showing the existing definition. You must either change the Calculation Name to a unique name, or change the attributes to match the existing definition.
This feature allows developers to connect m-Power application with their current business logic, or to extend m-Power capabilities by allowing developers to write their own Java, RPG, or SQL programs, and integrating these programs into the applications. m-Power utilizes "locations" to connect the external objects, these locations vary depending on what the external object does and when it should be executed. The following locations are supported in this template:
*STRSEARCH: This location has been deprecated for this template.
SmartLinks are not supported in Summary templates since Summaries do not output to the screen, but rather write back to the database in the form of a new table. For testing and debugging purposes, there is a runtime shell that can be run in the browser, but generally end users will never run a Summary since they are most often scheduled to be run at desired intervals using the Scheduled Tasks and Messaging plugin.
Note that unlike other applications, recompiling a summary causes the summary table to be dropped and recreated.
When accessing the Application Properties, a window will slide open with several tabs; let’s go through each of the tabs:
In Memory Summaries that have been generated can be found as a zip file within /mrcjava/WEB-INF/classes/DATA_DICTIONARY/TABLE_NAME.zip. This file is useful in the event that Tomcat needs to be restarted. If this occurs, Tomcat will reload the data from this file into memory upon an end-user querying this data set.