Technical

Tips

How to Perform Calculations Using Input Data

You can download a sample script for this tip by clicking on the following link.
Please download the sample script and try it out.

How to use the sample script:
1. Download the sample script file to local disk from above link.
2. Start DataMagic Manager and log in.
3. From the menu of DataMagic Management screen, select Import Management Information and import the sample script.
4. Download the sample data files and place them to the indicated path as below.

Introduction

In DataMagic, you can execute processing to add, subtract, multiply, and divide input data.
For example, when you process sales data, you can output the price of a product including sales tax by multiplying the price before tax by the tax rate.
You can also output the gross profit rate by subtracting the cost from the sales price, and then dividing that difference by the sales price.

Processing diagram

Functions used
   - Numeric operations

Diagram of completed data processing information and required settings

Sample data files

  • *Click to download the sample data files and place them to the indicated place.
How to Create Sample Data Processing Information
1. Create new data processing information with the name Tips3.
2. Double-click Input Settings to open the Input Settings window, and set the input file.
3. For Add extraction condition, select OK.
4. Double-click Output Settings to open the Output Settings window, and set the output file.
5. Drag from the Extraction Conditions and drop in the Output Settings, and double-click Set Mapping Information to open the Set Mapping Information window.
6. Select the fields to which you want to output the results of the calculation, and click Output information.
7. Select Numeric operations.
8. Set $INUM(2)*1.08 in the Formula.
9. Apply the data processing information, and execute the processing.

If the prices including tax are output as in the processing diagram, the processing was successful.
Tip: If you do not want to output any digits after the decimal point, perform the following procedure in Set Mapping Information.

In Conclusion

So, what do you think?
By using numeric operations, you can perform addition, subtraction, and division, in addition to the multiplication we used in this sample.
In addition to using values from input data, you can also insert the results into variables and calculate the values from multiple records.