BookmarkSubscribeRSS Feed
sandyming
Calcite | Level 5

Is there a way that I can read/copy/import xpt file which has encoding='UTF-8'?

Thanks for your help.

3 REPLIES 3
Ksharp
Super User

No. actually xpt file is a binary file which used to transfer dataset from a computer to another computer.

Why not import xpt file by proc copy +libname xpt engine and use dataset option encode='utf-8' to transform it ?

Ksharp

sandyming
Calcite | Level 5

Hi Kshap,

Thanks for your help.

I used the proc imcport in my program, and batch ran the program with SAS (UTF-8) instead of SAS.

Sandy

Tom
Super User Tom
Super User

If you have a PROC CPORT generated transport file then you must read it using a SAS session that is running using UTF-8 encoding.  You cannot switch on the fly to UTF-8 just to read the transport file.

I have no idea what SAS would do with a V5 Transport file with UTF-8 encoding, but I suspect that the same issues would apply.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3473 views
  • 3 likes
  • 3 in conversation