newline problem between EBCDIC & ASCII

557阅读 0评论2009-11-06 jianzk
分类:

Infoprint Manager reads the first six bytes and tests for all ASCII characters (code points from X'00' to X'7F') to determine if a file is encoded in ASCII or EBCDIC. If no non-ASCII characters are found, the line-data transform program assumes that the file uses the ASCII newline character, X'0A'. Otherwise, the transform assumes the file uses the EBCDIC newline character, X'25'. Because an input file can misguide the line-data transform, a set of rules has been established to determine how the transform processes the file.

Data Type Newline Character
All EBCDIC EBCDIC X'25'
All EBCDIC ASCII X'0D0A' or X'0A' 1
All ASCII EBCDIC X'25' 1
All ASCII ASCII X'0D0A' or X'0A'
1:
These combinations are possible only if a file contains a prefix with a string that indicates a different code set than actually exists.
  • For EBCDIC data with ASCII newlines, use X'0320202020200A'as the first seven bytes of the file.
  • For ASCII data with EBCDIC newlines, use X'03404040404025'as the first seven bytes of the file.

上一篇:how to see hex value under debug mode
下一篇:how to debug batch job