Kbase P125872: How to detect which fields trigger errors in IMPORT statement
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/09/2007 |
|
Status: Unverified
GOAL:
How to detect which fields trigger errors in IMPORT statement ?
GOAL:
How to identify which field(s) are not loaded correctly during IMPORT ?
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
This is not possible without writing specific code to detect the errors.
The reason for this is that the IMPORT statement is line-based, and the field mapping is based on the delimiters found.
If the input source (usually a file) contains formatting errors, such as character data not being quoted properly or the delimiter being something other than expected, this will cause the wrong data in the input line to be mapped to the wrong field.
Because the IMPORT statement is designed to be generic, no specific errors can be provided to indicate which field fails to import. There are even cases where the IMPORT statement itself will not raise any error, but the data does not end up in the correct fields/variables (This happens if all fields/variables are of type CHARACTER).
If more granular control is required in order to provide more specific error messages, additional logic will be required to extract and verify the values from the imported line.
This can be done for example by reading the entire line using an IMPORT UNFORMATTED operation, and then using additional ABL code to scan the line and determine te appropriate field values.