BookmarkSubscribeRSS Feed
selukarchetan7
Calcite | Level 5

Hello All,

 

I am creating a XPT file from c# by the SAS Guidelines.

 

I am strucked, in converting Column length to string greater then 230. When i convert Encoding.ASCII "230" length value and store it in a file and when i try to access the file in SAS Universal Viewer Column length which is 230 is converted into 63.

 

E.g.: Name length = 230 (Actual)

 when created XPT file and seen in Universal Viewer it shows Name Length = 63.

 

How can i overcome this issue.

 

Note: I am using c# and programmatically generating XPT's.

 

Please help me out

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

XPT (and don't get me started on it), is so ancient even the dinosaurs laughed at how old it was.  Really should not be using it for anything in this eon!  Its proprietary binary (all the lovely cross OS issues), has limitations all over the show, one of which your hitting here.  Character strings can only be 200:

https://www.loc.gov/preservation/digital/formats/fdd/fdd000466.shtml

(Thats just the first result on google)

 

I cannot express how much I hate this file format.  Use anything - and yes I would even include Excel in there before using XPT.  CSV, XML, Json, delimited text, anything!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 1 reply
  • 868 views
  • 2 likes
  • 2 in conversation