Transferring Files in Binary or Text Mode
Sometimes you need to transfer files between the PC and host platforms. There are a number of products that provide this capability. For instance, you can use FTP to transfer files from the PC to the host. FTP can transfer a file using a binary or text mode.
- Binary mode means do not translate the characters contained in the file.
- Text mode means translate the characters from ASCII on the PC to EBCDIC on the host.
Text mode will also write a separate record on the host for each carriage return line feed combination found in the original PC file.
Unfortunately, the Text mode ASCII to EBCDIC translation used by FTP does not match our standard ASCII to EBCDIC translation for extended ASCII characters (code points 128 and above contain international characters, some currency and punctuation symbols, and so on). Therefore, if system resource files to be uploaded contain some of these extended ASCII characters, the files must be uploaded as Binary.
If a system resource file, such as a FAP, FXR, or DDT file is uploaded as binary, not only do you need to convert the ASCII characters to EBCDIC, you also need to create records that correspond to each line of text in the PC file.
On the PC, the end of a line is indicated by a couple of control characters, specifically a carriage return character followed by a line feed character (CRLF). Since the PCL file was uploaded as binary, the file still contains the CRLF characters.
Some products, including IBM's Personal Communication, provide the ability to upload a file as binary but will translate CRLFs into separate records when uploading the file.
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.