Kbase P95997: Unable to create a Windows text line terminator from AS/400
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/10/2004 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1C
IBM AS/400 (RISC)
Windows
SYMPTOM(s):
Unable to create a Windows text line terminator from AS/400
PUT CHR(13) and PUT CHR(10) do not produce a Windows EOF (End Of Line) from AS/400
Using native 4GL Client on AS/400
Using -cpinternal IBM037 and -cpstream IBM850
CAUSE:
On the Windows platform, the EOL (End Of Line) is CR (Carriage Return) plus LF (Line Feed), in other words CHR(13) and CHR(10).
There is a bug in the convmap.cp for the conversion of CHR(10) between the code pages IBM037 and IBM850.
FIX:
Instead of CHR(10), output CHR(37) to produce a file which contains the Windows LF.
For example:
OUTPUT TO VALUE("test.txt").
PUT "word1" FORMAT "X(10)".
PUT CHR(13) FORMAT "X".
PUT CHR(37) FORMAT "X".
PUT "word2" FORMAT "X(10)".
PUT CHR(13) FORMAT "X".
PUT CHR(37) FORMAT "X".
OUTPUT CLOSE.