Configuring scp

By default, scp treats files as text. It assumes that all data going over the network is encoded in ASCII coded character set ISO 8859-1. The EBCDIC coded character set of the current locale is used for data conversion. On the remote system, the locale of the scp process is determined by how LC_ALL is initialized on that system. If LC_ALL is set through a shell profile (for example, /etc/profile), then it will not be inherited by the remote scp process. Specifically, the remote scp process will run in a C locale. Figure 1 shows the change in locales; for example, if a user on Host GERMANY running in locale De_DE.IBM-273 uses scp to transfer a file to a remote host, the file contents are converted from IBM-273 to ISO 8859-1 to go over the network and from ISO 8859-1 to IBM-1047 on the target system.
Figure 1. Using scp when LC_ALL is set through shell profiles
Using scp when LC_ALL is set through shell profiles
If LC_ALL is set through the ENVAR run-time option in the CEEPRMxx member, then the new locale is inherited by the remote scp process. Specifically, the EBCDIC coded character set of that locale is used. See Figure 2 for an example of using scp when LC_ALL is set through ENV in CEEPRMxx. If a user on Host GERMANY running in locale De_DE.IBM-273 uses scp to transfer a file to a remote host, the file contents are converted from IBM-273 to ISO 8859-1 to go over the network, and from ISO 8859-1 to IBM-273 on the target system.
Figure 2. Using scp when LC_ALL is set through ENV in CEEPRMxx

Warning: If a file is encoded in an EBCDIC coded character set whose compatible ASCII coded character set is not ISO 8859-1, then nonidentical conversions might occur. Specifically, substitution characters (for example, IBM-1047 0x3F) might replace characters that do not have a mapping between the specified EBCDIC coded character set and ISO 8859-1. To determine if a coded character set is compatible with a particular locale, see the information about locales supplied with z/OS XL C/C++ in z/OS® XL C/C++ Programming Guide.

If the EBCDIC coded character set for your sessions is compatible with ISO 8859-1 and the preceding text conversions are satisfactory for your environment, the following setup is not required.