I've figured out a way to read XPORT and sas7bdat formats from C#, but having trouble with CPORT.
The format doesn't appear to be recognized using the methods for the other two formats.
I've tried:
- sas.LocalProvider for sas7bdat
- SAS.UV.Transport for XPORT
Neither work for CPORT.
Any ideas?
thanks!
Chris
The format doesn't appear to be recognized using the methods for the other two formats.
Since CPORT creates differently structured files than Xport and is not in data set structure I would be very surprised that a method for either of the those would work. Note that XPORT only works for data members. CPORT exports can contain all sorts of different things stored in SAS catalogs: macro instructions, SAS formats, menus, SCL lists, graphics, AF widgets or programs and more. Each of which may have different binary storage requirements.
Is there any way to programmatically access the data within the CPORT file from .NET?
I see some references to SAS Integrated Object Model (IOM) Server as a possible option, but wanted to see if that was the right path before going that direction.
thanks!
Chris
@csiege wrote:
Is there any way to programmatically access the data within the CPORT file from .NET?
I see some references to SAS Integrated Object Model (IOM) Server as a possible option, but wanted to see if that was the right path before going that direction.
thanks!
Chris
You might search .NET oriented sites as this site would say to use Proc Cimport to recover the information in a CPORT transport file since that is the SAS tool for doing so. I don't know if SAS has ever made the file layout/description/binary coding for Cport files available.
I think XPORT is the only one ever described.
See here:
https://www.loc.gov/preservation/digital/formats/fdd/fdd000464.shtml
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 25. 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.