tag:blogger.com,1999:blog-20769129.post2593817055677288353..comments2023-10-15T06:55:57.488-07:00Comments on Computing from Out in Left Field: SAS XPT Files, IBM Floats, and C#Savianhttp://www.blogger.com/profile/17299246950932791515noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-20769129.post-72224510119234915252015-02-12T13:31:41.933-08:002015-02-12T13:31:41.933-08:00I fixed the link on the article. Here it is in cas...I fixed the link on the article. Here it is in case:<br /><br />http://www.codeproject.com/KB/applications/492449/Converters.zip<br />Savianhttps://www.blogger.com/profile/17299246950932791515noreply@blogger.comtag:blogger.com,1999:blog-20769129.post-16879567495868802182015-02-12T13:03:12.210-08:002015-02-12T13:03:12.210-08:00Hi Allan - I have the exact same issue you had. I ...Hi Allan - I have the exact same issue you had. I am trying to read in IBM 4-byte floating points. I also found Johns article but dont have a c# converter.<br /><br />Your link to skydrive doesnt work for me. Is there any other way you could make the c# code avialable??<br /><br />Any help would be very appreciated before I loose my mind!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20769129.post-66636594981635255912013-04-16T04:45:00.424-07:002013-04-16T04:45:00.424-07:00The C# code to do the conversions is on CodeProjec...The C# code to do the conversions is on CodeProject. The C# code to do the whole XPT format is available for purchase. Just contact me if needed.Savianhttps://www.blogger.com/profile/17299246950932791515noreply@blogger.comtag:blogger.com,1999:blog-20769129.post-66737904032513459662013-04-16T03:27:17.898-07:002013-04-16T03:27:17.898-07:00Alan,
Have you shared the c# code for this anywher...Alan,<br />Have you shared the c# code for this anywhere?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20769129.post-24841328881442369262013-02-21T05:30:09.121-08:002013-02-21T05:30:09.121-08:00Nasir,
I did not want a reliance on any SAS softw...Nasir,<br /><br />I did not want a reliance on any SAS software for the conversion. The code was going into a commercial tool and I could not use the SAS OleDb provider in this case. While a user could use the SAS provider, you cannot wrap their dll into another product.<br /><br />You can read numerics using the SAS provider but the numbers come in as text. <br /><br />On the format front, I associate the format name to the numeric but you have to be able to read the sas7bcat to convert the numeric to the formatted values. That is the last challenge: good you caught it.Savianhttps://www.blogger.com/profile/17299246950932791515noreply@blogger.comtag:blogger.com,1999:blog-20769129.post-69991638198137687612013-02-21T02:29:04.927-08:002013-02-21T02:29:04.927-08:00Alan,
Another issue that I haven't seen resol...Alan,<br /><br />Another issue that I haven't seen resolved by the provider is the numeric format. In Sas XPT files there can be a Format for a numeric column. For example you can store date as a numeric value but provide a format in the meta data in the xpt header to say which format to use for it. The sas Viewer will actually format such a column for you.<br /><br />The problem is the OLEDB provider for sas does not support formatting.<br /><br />The custom code you wrote, how do you think you are going to deal with this situation because IBM floats code will actually take the numeric data and convert it to completely different values in C#.Anonymoushttps://www.blogger.com/profile/03394523981133908671noreply@blogger.comtag:blogger.com,1999:blog-20769129.post-80896950518185235222013-02-21T02:24:13.943-08:002013-02-21T02:24:13.943-08:00hmm,
you could have used the SaS local provider w...hmm,<br /><br />you could have used the SaS local provider which can be installed standlone and is free.<br /><br />Using this provider you just have to use OLEDB to read the SaS xpt files. Just 5 lines of code in total!Anonymoushttps://www.blogger.com/profile/03394523981133908671noreply@blogger.comtag:blogger.com,1999:blog-20769129.post-49242811599431803132012-11-12T11:42:50.717-08:002012-11-12T11:42:50.717-08:00The macros are not usable on a system where SAS is...The macros are not usable on a system where SAS is not installed. <br /><br />That was the need here. XPT files should be consumable outside of SAS.Savianhttps://www.blogger.com/profile/17299246950932791515noreply@blogger.com