You can use the GETOPTION function in Base SAS:
data _null_; val=GETOPTION('encoding'); put val=; run;
On my system, this gives a log output
5 data _null_; 6 val=GETOPTION('encoding'); 7 put val=; 8 run; val=LATIN1
In SCL (SAS component language) you can use the OPTGETC and OPTGETN functions. See the manual for your specific SAS version for more information.
Martin Bøgelund
source share