BookmarkSubscribeRSS Feed
csiege
Calcite | Level 5

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

4 REPLIES 4
ballardw
Super User


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.

 

 

csiege
Calcite | Level 5

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

ballardw
Super User

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

AlanC
Barite | Level 11

I think XPORT is the only one ever described.

 

See here:

 

https://www.loc.gov/preservation/digital/formats/fdd/fdd000464.shtml

 

https://github.com/savian-net

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 464 views
  • 0 likes
  • 3 in conversation