BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

If it's in the doc apologies I couldn't find it.

 

Below is some test code:

 

* filename out "C:\Temp";  * change as desired ;

proc cport lib=sashelp file="%sysfunc(pathname(out))/testing.cpt";
   select class cars fish shoes stocks;
run;

libname xpt xport "%sysfunc(pathname(out))/testing.xpt";
proc copy in=sashelp out=xpt;
   select class cars fish shoes stocks;
run;

/* 
Well that rules out using the xport engine.
In fairness, the 9.4 doc does say:

The XPORT engine supports a feature set that is compatible with SAS 6. 
The XPORT engine cannot support SAS 9 features, such as long variable names. 
Warning or error messages report limitations that are encountered during the transport operation. 
For details about typical error messages and recovery actions, 
see File library.member.DATA has too long a member name for the XPORT engine.

Curiousity/rhetorical questions:  

Are there ANY installations still running SAS V6?
Does SAS even officially support V6?
If the answer is NO, should SAS clean up "bloat" in their software?
For example, isn't the installation of the xport engine just a waste of disk space in SAS 9.x?
*/

proc cimport lib=work file="%sysfunc(pathname(out))/testing.cpt";
   * how do i get a listing of the contents without actually importing??? ;
   * like i can do with tar, zip, 7-zip, rar, etc. ??? ;
run;

Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
4 REPLIES 4
art297
Opal | Level 21

@ScottBass: The macro provided in this paper ( http://www.lexjansen.com/pharmasug/2009/ad/AD08.pdf ) may be what you're looking for.

 

As for you comments about whether they are still needed, yes, unless the US govt has changed its requirements and, secondly, definitely needed for those of us who have to access archived versions of historical files.

 

Art, CEO, AnalystFinder.com

 

p.s. I'm sure a number of mainframe folks are still using SAS6

 

ScottBass
Rhodochrosite | Level 12

Thanks @art297.  It's good to know there's a hack available for functionality typically provided by similar software archiving/compression packages.

 

Thanks too for clarifying that V6 is still alive and well, and in production environments.

 


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
Satish_Parida
Lapis Lazuli | Level 10

@art297

 

The link is broken.

 

I am looking at a Oracle DMW app Auto generated SAS code, it is trying to read contents of CPORT file using proc contents. 

 

libname Source "/u04/dataloader/FILEWATCHER/FileWSASDev/AccentureFixitol";

option nofmterr;

proc contents data=Source.RAVE_ODM_20180727T095357_part1 out=Contents noprint;
run; 

/*RAVE_ODM_20180727T095357_part1.CPORT is the cport file in the path passed in libname.*/

How ever this is not working, I did not find any documentation to read the contain of cport file.

 

I could really use some help here.

 

Thank you in advance.

art297
Opal | Level 21

There were some stray characters in the link. Reload the post's page and try it again.

 

Art, CEO, AnalystFinder.com

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 826 views
  • 1 like
  • 3 in conversation