Data processing information
Configure the data processing information settings.
In the DataMagic Management screen, click the Data processing to display the Data Processing Information List screen, and then click the New button to display the Data Processing Settings screen. Configure the settings as shown below and save them.
1. Enter cnv32 in the ID field.
2. Setting variables
Prepare 3 variables that retain the total marks (sum total marks) of the respective subjects to enable the calculation of the average marks.
Double-clicking the Variable button in the Data Processing Settings screen brings up the Variable Settings screen. Set the fields as in the table below and save the fields.
Variable name |
Variable type |
Initial value |
---|---|---|
total_score_english |
Numeric value |
0 |
total_score_science |
Numeric value |
0 |
total_score_math |
Numeric value |
0 |
3. Configure the settings for the input file (C:\Examples\32\input\sampleIN32.csv) and the extraction condition.
Select an input file format in the Object palette, and then drag and drop it on the input area. Double-click the icon to display the Input Settings screen.
Set Format, Omit ID, Delimiter, Enclosure character, File name, Use header record, and Lines 1 to in the Layout tab, as well as the settings in the Sorting tab, as shown below.

Screen 8.281 Input Settings screen
4. Set the post-process.
Post-processing name |
Comparison source |
Comparison target |
Operator |
Extraction condition |
|||
---|---|---|---|---|---|---|---|
Post-processing 1 |
|
|
|
|
|
|
|

Screen 8.282 Post-processing screen
5. Set the output file (C:\Examples\32\output\sampleOUT32.csv).
Select an output file format in the Object palette, and then drag and drop it on the output area. Double-click the icon to display the Output Settings screen.
Configure the settings as shown below.

Screen 8.283 Output Settings screen
6. Add the variable assignment to the extraction condition.
Right-click the Extraction Condition icon and click Add assign variable.
7. Associate the extraction condition and the output file.
In the Data Processing Settings screen, drag-and-drop to set mappings as in the following figure.

Screen 8.284 Setting mappings
Double-click the variable assignment icon, the mapping information icons on the relation lines from the extraction conditions and output files, and the mapping information icons on the relation lines from post-processings and output files to bring up the Set Mapping Information screen. The following are the settings to set in the Set Mapping Information screen.
8. Setting mapping information.
1) Relation line from the extraction condition 1 to variables
Add the marks of the respective subjects of the input record to the variables. Set the output information of the output variables as follows:

Screen 8.285 Set Mapping Information screen (relation line 1)
Variable on the output side |
Output information |
|
---|---|---|
Field type |
Value |
|
total_score_english |
Numeric operation |
$VAR(total_score_english)+$INAME(english) |
total_score_science |
Numeric operation |
$VAR(total_score_science)+$INAME(science) |
total_score_math |
Numeric operation |
$VAR(total_score_math)+$INAME(math) |
For details about the numeric operation formula, see DataMagic Reference Manual.
2) Relation line from the extraction condition 1 to the output file
Output the respective fields of the input record. Set the output format as follows:

Screen 8.286 Set Mapping Information screen (relation line 2)
3) Relation line from the post-process 1 to the output file
At the end of the conversion processing, calculate the averages for the total marks of the respective subjects retained in the variables. Set the fields on the output side as follows:

Screen 8.287 Set Mapping Information screen (relation line 3)
Field on the output side |
Output information |
Output format |
||
---|---|---|---|---|
Field type |
Value |
Format |
Significant digits after decimal point |
|
name |
Fixed value (Fixed character string) |
Average |
Standard |
|
english |
Numeric operation |
$VAR(total_score_english)/$RCOUNT |
Numeric character string |
Specified: 1 |
science |
Numeric operation |
$VAR(total_score_science)/$RCOUNT |
Numeric character string |
Specified: 1 |
math |
Numeric operation |
$VAR(total_score_math)/$RCOUNT |
Numeric character string |
Specified: 1 |
For details about the numeric operation formula, see DataMagic Reference Manual.
9. Click the Apply button to save the data processing information.