You are here: Available Utilities > C > CPCNV > Transferring Files...

Transferring Files in Binary or Text Mode

Sometimes you need to transfer files between the PC and host (z/OS) 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 (z/OS). FTP can transfer a file using a binary or text mode.

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. Use the /R parameter to treat the CRLFs as an end of line indicator when converting the file on z/OS.

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. Do not use the /R parameter if you use a file transfer program that converts lines ending with CRLFs into separate records when uploading to z/OS.