Page 1 of 1

The character ÿ causes end-of-file

PostPosted: Fri Jul 20, 2012 3:37 am
by zatlas1
Hi
I am getting ASCII text files and the FTP convert them to EBCDIC. Specifically the character 'ÿ' is translated to x'ff'. That should not be a problem but both in C and Rexx, when reading the file abruptly stop reading as if it was an unexpected EOF. Is that behavior normal and if so what could be done about it, short of translating the offending character to something else?

Thank you
ZA

Re: The character ÿ causes end-of-file

PostPosted: Fri Jul 20, 2012 7:14 am
by dick scherrer
Hello,

What does the record look like when viewed with HEX ON? And the next record?

Re: The character ÿ causes end-of-file

PostPosted: Fri Jul 20, 2012 8:41 am
by zatlas1
I actually misstated the issue, the character at issue is x'ff' in the ASCII. Here is the section where that character appears in the original ASCII file:
Hex:
20 20 20 20 66 74 68 69 6E 67 0A 20 20 20 20 2A 2A 2A 20 46 61 69 6C 65 72 73 0A 20 20 20 20 5D 74 68 69 6E 67 0A 20 20 20 20 63 74 68 69 6E 67 0A 20 20 20 20 64 74 68 69 6E 67 0A 20 20 20 20 65 74 68 69 6E 67 0A 0A 2F 5E 5C 81 2F 0A 20 20 20 20 81 0A 0A 2F 5E FF 2F 0A 20 20 20 20 FF 0A 0A 2F 5E

Text:
fthing
*** Failers
]thing
cthing
dthing
ething

/^\/


/^ÿ/
ÿ

/^

On the z/OS side it looks like this:

   File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
 -------------------------------------------------------------------------------
 EDIT       ZATLAS1.TEST.INPUT1                             Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 000153     cthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000033895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000154     dthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000043895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000155     ething
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000053895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000156
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000157 /^\ /
        6BE264444444444444444444444444444444444444444444444444444444444444444444
        100110000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000158
        444424444444444444444444444444444444444444444444444444444444444444444444
        000010000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000159
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000160 /^
        6B4444444444444444444444444444444444444444444444444444444444444444444444
        100000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************






================================================================================
   File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
 -------------------------------------------------------------------------------
 EDIT       ZATLAS1.TEST.INPUT1                             Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 000153     cthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000033895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000154     dthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000043895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000155     ething
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000053895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000156
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000157 /^\ /
        6BE264444444444444444444444444444444444444444444444444444444444444444444
        100110000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000158
        444424444444444444444444444444444444444444444444444444444444444444444444
        000010000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000159
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000160 /^
        6B4444444444444444444444444444444444444444444444444444444444444444444444
        100000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************






================================================================================
   File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
 -------------------------------------------------------------------------------
 EDIT       ZATLAS1.TEST.INPUT1                             Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 000153     cthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000033895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000154     dthing
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000043895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000155     ething
        44448A889844444444444444444444444444444444444444444444444444444444444444
        000053895700000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000156
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000157 /^\ /
        6BE264444444444444444444444444444444444444444444444444444444444444444444
        100110000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000158
        444424444444444444444444444444444444444444444444444444444444444444444444
        000010000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000159
        444444444444444444444444444444444444444444444444444444444444444444444444
        000000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000160 /^
        6B4444444444444444444444444444444444444444444444444444444444444444444444
        100000000000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************

so the hex code '2F 5E FF' was translated almost correctly to '61 B0 ..' and then the system does not see the rest.

Thanks
ZA