Hi, I'm creating a C# SAS V5 generator (.xpt files). My output files are stored in .xpt and encoded in ISO-8859-1 (1252 code). I followed all the SAS documentation for well exporting but i'm facing some problems with my numbers conversion. E.g., when converting C# int into their floating-point representation, i got some mistakes. I have a unit test exporting my data in .xpt format, then I load them into SAS and read it with %xpt2loc maccro. For sequence number, my 8 is read as "3.9375", my 16 as "A".. It's not random mistakes, it's always the same. I'm working with Alan Churchill C# converter (december 2012) - https://www.codeproject.com/Articles/492449/Transform-between-IEEE-IBM-or-VAX-floating-point , or maybe you have an other solution ? Here is a sample of my code, var converter = new Converter(); converter.Process(Endian.BigEndian); var bytes = converter.ConvertDoubleToBytes(Platform.IbmFloat, (double)data_); var byteString = Encoding.GetEncoding(1252).GetString(bytes); return PadString(byteString, _fieldSizes[index_]); for a numeric var, _fieldSizes[index_] is always equals to 8. Hope you can help.
... View more