PATHENCODING Environment Variable
Specifies the encoding for external file references and directory references when the encoding is different from the SAS session encoding.
| Categories: | Environment Control |
|---|---|
| CAS | |
| Default: | None |
| Requirement: | The characters in a pathname must contain characters that are recognized by both the session encoding and the encoding that is specified by PATHENCODING. |
Details
Set the PATHENCODING value in SAS Environment Manager. The encoding value that you assign specifies the encoding for external file references and directory references that are accessed from within a SAS program. Specify a value for this environment variable when external file encoding and directory encoding are different from the SAS session encoding. SAS uses the default session encoding when referencing external files and directories. The PATHENCODING environment variable provides an alternative encoding for external file and directory references. PATHENCODING is valid only for files that are located on disk. When the PATHENCODING environment variable has a valid encoding value, SAS transcodes the pathname from the SAS session encoding into the specified encoding.
For a list of valid encoding values, see LINUX Encoding Values in SAS National Language Support (NLS): Reference Guide.
The pathnames that you specify within a SAS program must be entered in the SAS session encoding. Do not specify pathnames in the encoding that you specify for the PATHENCODING environment variable.
To specify a PATHENCODING value of LATIN1 in a SAS session that uses UTF-8, the characters in a pathname must contain characters that are recognized by both the session encoding and the encoding that is specified by PATHENCODING. As a result, to specify a PATHENCODING value of LATIN1 in a SAS session that uses UTF-8, you must specify a SAS session encoding of UTF-8 or SAS_U8.