Dear SAS experts,
This is with regard to the issue while importing the transport file (.cpt file) by PROC CIMPORT.
The Transport file was created in a Windows environment via PROC CPORT and it has the encoding WLATIN1, but I am trying to Import it in UNIX Environment (default encoding=”UTF-8”) using PROC CIMPORT and it is showing the error as in below screenshot.
libname x '~path';
filename y '~pathx';
proc cimport library=x infile=y;
run;
quit;
I tried inencoding as well encoding option as well but it did not solve the issue.could you please suggest how i could overcome this error and read the transport file.
I am working on sas 9.4
Unfortunately you need to start SAS using the wlatin1 encoding instead of the utf-8 encoding to make the PROC CIMPORT code run.
You cannot change the session encoding setting once the session has started.
How to do that depends on how you are starting SAS. If you are running it on PC then perhaps you already have the choice to launch SAS using different encodings in the START menu. On my PC there is a "SAS 9.4 (English)" icon and a "SAS 9.4 (Unicode)" icon in the start menu that will let me start with the those two different encodings. Otherwise on Windows or Unix you can start SAS using a different configuration file or command line options to change the system encoding.
If you are using Enterprise Guide, or SAS/Studio or some other method that connects to a server to run SAS then you need to have a way to connect to different services that are configured to use the encoding you need.
Check with your local SAS support team, or contact SAS support.
Please show HOW you attempted to specify encoding.
To CPORT you probably have a program like:
filename cpt '... path and name.cpt';
proc cport data=... file=cpt; run;
You just need to define the encoding on filename statement:
filename cpt '... path and name.cpt' encoding='UTF-8';
Unfortunately you need to start SAS using the wlatin1 encoding instead of the utf-8 encoding to make the PROC CIMPORT code run.
You cannot change the session encoding setting once the session has started.
How to do that depends on how you are starting SAS. If you are running it on PC then perhaps you already have the choice to launch SAS using different encodings in the START menu. On my PC there is a "SAS 9.4 (English)" icon and a "SAS 9.4 (Unicode)" icon in the start menu that will let me start with the those two different encodings. Otherwise on Windows or Unix you can start SAS using a different configuration file or command line options to change the system encoding.
If you are using Enterprise Guide, or SAS/Studio or some other method that connects to a server to run SAS then you need to have a way to connect to different services that are configured to use the encoding you need.
Check with your local SAS support team, or contact SAS support.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: