cancel
Showing results for 
Search instead for 
Did you mean: 

New Line in EBCDIC file created by receiver file adapter

Former Member
0 Kudos

Hi mates,

I've configured the receiver file adapter to create a file in EBCDIC format by specifyin the File encoding 'Cp037'. When the file is viewed on the AS400 system using the command DSPPFM, it appears as a continuous text instead of line-by-line. I've tried specifying 0x0D(CR), 0x0A(LF), 'nl' as the endSeparator for the record type in content conversion, but no luck. Still the file looks like a continuous text.

I learnt from the following links that the New Line character (NL or NEL) in AS400 is Unicode '0x85'.

<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867251">OutputStreamWriter/InputSreamReader convert NEL to linefeed with Cp037 encoding</a>

<a href="http://search.cpan.org/~guido/libintl-perl-1.16/lib/Locale/RecodeData/IBM037.pm#CHARACTER_TABLE">CHARACTER TABLE</a>

But when I specify this '0x85' as the endSeparator, I get the error below as 0x85 (decimal equivalent 133) is not part of the standard ascii code i.e. basic 127 codes

<i>Conversion initialization failed: java.lang.Exception: java.lang.NumberFormatException: Value out of range. Value:"85" Radix:16</i>

Is there any way I can produce the EBCDIC file with new line as end separator for records?

I appreciate your inputs.

thx in adv

praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Praveen!

If you use a hexadecimal viewer to check the file created by XI, using 'nl' as endSeparator..do you see the right character codes??

regards,

Matias

Former Member
0 Kudos

Matias,

When I specify 'nl' or '0x0A', the resultant hex code getting generated is 'NAK' but not 'NEL'...which is the right one..

thx

praveen

Answers (1)

Answers (1)

Former Member
0 Kudos

Instead of using binary mode for FTP and specifying encoding, endSeparator, I used the text mode and left the translation to the FTP server on AS400 system.

Desirably, it generated the file with right encoding and new line characters.

praveen