CA TPX Session Management for z/OS

Tuesday Tip: Filesize changes during XCOM-transfer between Windows and Unix

  • 1.  Tuesday Tip: Filesize changes during XCOM-transfer between Windows and Unix

    Posted 11-28-2014 09:37 AM

    Have you ever wondered why the size of a file may have changed after it was transferred using XCOM? This phenomenon does not imply a error in XCOM but is normal when Unix is in the game and the transfer is not of type BINARY!

    Reason is that in Windows the line break is realised using two special characters (x'0D' [CR] - Carriage Return and x'0A' [LF] - Line Feed) while in Unix only the x'0A' [LF] is used.
    So a file in Windows which contains of 10 bytes (six characters and four special characters)


                         abc[CR][LF]
                         def[CR][LF]

     

    contains only eight characters after the transfer to Unix because the special characters [CR] are removed:

                         abc[LF]
                         def[LF]

     

    When transferring from Unix to Windows you will discover the revers, the files are getting larger because every [LF] is prefixed with an [CR] to follow Windows standards.