Search code examples
linuxunixmainframe

caret ^ is converting to some special symbol


I'm transferring the file which has the content like below from mainframe system to a Unix instance. I've a delimiter in the file as ^&*. I'm sending the same in mainframe but when we receive the file in the unix we're receiving as Ø&*.

I'm using connect direct to transfer the file from one system to another.

File Type: Flat File, File transfer: CD (Connect Direct)

file content

H^&*20220407^&*160009^&*2006
T^&*1

But when I receive the file in the unix server I can the file content is changed. Mainly ^ is converted to Ø.

HØ&*20220407Ø&*160009Ø&*2006
TØ&*1

Mainframe details


Solution

  • This is most surely a code page problem.

    The data in the file on the mainframe is (most probably) in some EBCDIC code page. ConnectDirect is doing a code page tranformation when sending the file to that UNIX system. This is what the XLATE(YES) means.

    However, there is some default code page "from"-"to" pair configured, which is being used with XLATE(YES). But this probably is not the correct pair. You need to

    • find out what EBCDIC code page the data on the mainframe is encoded in. Is it IBM-037, IBM-1047, IBM-500, IBM-273, etc. There are many.
    • find out what code page the data shall be in on the UNIX side: UTF-8, ISO8859-1, 437, etc. There are many.
    • make sure ConnectDirect will transform using the correct source and target code pages.

    Ask your ConnectDirect support people to help you with this.