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
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!
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 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.