XCODE-SESSION-KEY attribute
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Data type: CHARACTER
Access: Write-only
Applies to: SECURITY-POLICY system handle
When set, the XCODE-SESSION-KEY attribute contains the
encryption key used by the COMPILE statement for the current session. The attribute must contain the same key used
with the XCODE utility. The attribute does not have a default or initial
value. To unset the attribute, set it with the Unknown value (?).
Because the attribute contains an encryption key, any attempt to read the attribute is a compiler error.
Both the XCODE utility and this attribute have an eight-character limit for keys. However, neither the utility or the attribute issues a warning or error if the key is longer. Instead, the utility and attribute use the first eight characters and ignore additional characters.
The XCODE utility does not perform code page conversions
and does not use the -cpinternal parameter when encrypting files. Therefore, the source code
and key will use the default code page of the operating system where you run the
XCODE utility. If a different code page is in effect where
XCODE-SESSION-KEY is set, then code page conversions may prevent the
attribute key from matching the XCODE utility key and the compile fails.
To prevent this case, use only US-ASCII characters, which are found in all code pages below
code point 128.
You cannot use XCODE with the XREF,
XREF-XML, STRING-XREF, or LISTING
options together. Also, if the DEBUG-LIST option is used with an encrypted
source file, the resulting debug file will only contain a notice that the source file is
encrypted.
The LIST-QUERY-ATTRS and LIST-SET-ATTRS
functions do not return the XCODE-SESSION-KEY attribute when given a
SECURITY-POLICY handle.
XCODE-SESSION-KEY attribute is not supported
when FIPS mode is enabled, as encrypted source code cannot be compiled
in that environment.