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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 974 views
  • 2 likes
  • 2 in conversation