Specifications for record extraction are explained below.
- Conversion of conditional value's character code (for character type attribute data)
- Numeric value conversion for comparison against conditional value (for numeric type attribute data)
- Supplement: Rules applied when multiple data conditions are specified
For restrictions and notes on extraction specifications, see Restrictions and Notes on Record Extraction Function.
| Conversion of conditional value's character code (for character type attribute data) |
When records are extracted on the condition represented by data with a character type attribute, Data Converter first converts the character code of the conditional value specified on the Set Data Conditions dialog box to the input file's character code system, and then compares the data in the input file against the conditional value. Code conversion of the conditional value is performed based on the following rules. If the input file's code system is Shift JIS, or if Hexadecimal Specification is selected, code conversion will not be performed.
* Code conversion from Shift JIS to the input file's code system is performed.
| Input file's code system |
Conversion |
| ASCII |
Code conversion not performed. The data specified for the conditional value will
be used.
|
| EBCDIC |
ASCII to EBCDIC |
| Unicode (UCS2/UTF8) |
ASCII to Unicode |
After character code conversion, extraction rules are applied based on the operator specification. Extraction rules are explained below.
|
Alphanumeric character or character string (CSV/XML) item |
|
Complete agreement (unmatch) |
The data item in the input file will be evaluated as a complete agreement when its area length and value match the area length and value of the conditional value. |
|
Agreement forward |
The data item in the input file will be evaluated as an "agreement forward" when the part of the conditional value that fits within the conditional value area length matches the value of the data item in the input file. |
|
CHAR-type item |
|
Complete agreement (unmatch) |
The data item in the input file (not including the NULL character that indicates the end of the character string) will be evaluated as a complete agreement when its area length and value match the area length and value of the conditional value. |
|
Agreement forward |
The data item in the input file will be evaluated as an "agreement forward" when the part of the conditional value that fits within the conditional value area length matches the value of the data item in the input file. |
|
Variable-length character string item |
|
Complete agreement (unmatch) |
The data item in the input file (including only the part that fits within the valid area length in RDW) will be evaluated as a complete agreement when its area length and value match the area length and value of the conditional value. |
|
Agreement forward |
The data item in the input file will be evaluated as an "agreement forward" when the part of the conditional value that fits within the conditional value area length matches the value of the data item in the input file. |
|
Variable-length Japanese item |
|
Complete agreement (unmatch) |
The data item in the input file (including only the part that corresponds to the number of characters in RDW) will be evaluated as a complete agreement when its area length and value match the area length and value of the conditional value.
* For the data in the UTF8 format, RDW will be included in the area length. |
|
Agreement forward |
The data item in the input file will be evaluated as an "agreement forward" when the part of the conditional value that fits within the conditional value area length matches the value of the data item in the input file. |
| Numeric value conversion for comparison against conditional value (for numeric-type attribute data) |
When records are extracted using the data with the numeric type attribute as the condition, Data Converter converts the numeric data in the input file to a format (numeric value) that allows comparison with the conditional value specified in the Set Data Conditions dialog box before comparing the data in the input file against the conditional value. Conversion to numeric values is performed based on the following rules.
After numeric value conversion, extraction evaluation is performed based on the operator specification and then the records are extracted.
| Unsigned attributes |
Always treated as a positive value. |
| Signed attributes |
Treated as a negative value if a minus sign is detected or as a positive value otherwise. |
| Conditions making data items ineligible for extraction |
External or internal decimal
- Non-numeric data is contained in a numeric part.
CSV/XML format
- Data other than the plus/minus sign, decimal point, or numbers is contained.
- Data having 19 or more significant digits is contained.
- A plus/minus sign is detected at a place other than the beginning of the area or more than one decimal point is detected. |
| Supplement: evaluation rules used when multiple data conditions are specified |
The example below shows how evaluation is performed when two or more data conditions are specified.
Data condition setting example:
| No. |
Concatenation Condition |
Item Name |
Operator |
Conditional Value |
Hexadecimal Specification |
| 1 |
-- |
Product name |
=(Complete agreement) |
Bar code reader |
|
| 2 |
OR |
Product name |
Agreement forward |
High-speed |
|
| 3 |
OR |
Unit price |
> |
10000 |
|
| 4 |
AND |
Unit price |
<= |
90000 |
|
| 5 |
OR |
Customer name |
Agreement forward |
8FAC97D1 |
YES |
| 6 |
OR |
Customer name |
Agreement forward |
8E52;89BA |
YES |
| Data condition evaluation order |
| 1. |
No. 1 data condition is evaluated. |
| 2. |
No. 2 data condition is evaluated. |
| 3. |
No. 1 and No. 2 data condition evaluation results are OR'ed together. |
| 4. |
No. 3 data condition is evaluated. |
| 5. |
The result of step 3 above is OR'ed with the result of No. 3 data condition evaluation. |
| 6. |
No. 4 data condition is evaluated. |
| 7. |
The result of step 5 above is AND'ed with the result of No. 4 data condition evaluation. |
| 8. |
No. 5 data condition is evaluated. |
| 9. |
The result of step 7 above is OR'ed with the result of No. 5 data condition evaluation. |
| 10. |
No. 6 data condition is evaluated. |
| 11. |
The result of step 9 above is OR'ed with the result of No. 6 data condition evaluation.
This is the final data condition for record extraction. |
|
|
|
The above sequence can be represented by a formula as follows: |
|
(((((product name = bar code reader) OR (product name » high speed)) OR (unit price > 10000)) AND (unit price
£ 90000)) OR (customer name » 8FAC97D1)) OR (customer name
» 8E52;89BA) |
|