Kbase P163927: 4GL/ABL: Problems trying to import a file to an OpenEdge database.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/16/2010 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL: Problems trying to import a file to an OpenEdge database.
The data is being imported using the 4GL/ABL IMPORT statement.
The imported data is not as expected and contain strange results.
Some fields are populated with the expected values and other are not populated at all.
FACT(s) (Environment):
UNIX
Linux
Progress 9.x
OpenEdge 10.x
CAUSE:
The data file is a text file that was created on window where CHR(13) is used as a line terminator. Linux expects CHR(10) to be the line terminator.
FIX:
Replace CHR(13) globally with CHR(10) either programmatically or using the Linux operating system translate command. For example, the following command replaces (translates) all the occurrences of CHR(13) i.e. octal 015 with CHR(10) i.e. octal 12 and sends the output to OutputFileName:
tr '\015' '\012' < InputFileName > OutputFileName
NOTE: Some Linux flavors expect the file names to be quoted.