DATA Step, Macro, Functions and more

CIMPORT and COMPRESS=YES

Reply
Occasional Contributor
Posts: 13

CIMPORT and COMPRESS=YES

Greetings.

OPTIONS COMPRESS=YES doesn't seem to work with PROC CIMPORT. What I did was:

[1] created an uncompressed SAS-dataset and CPORTed it. Proc DATASETS / CONTENTS shows me that the SAS-dataset is, indeed, uncompressed.
[2] I then deleted the dataset and recreated it with OPTIONS COMPRESS=YES. Works fine. Proc DATASETS /CONTENTS shows me COMPRESS CHAR etc.
[3] Next I CIMPORTed the file from step [1] and I specified OPTIONS COMPRESS=YES in the program.

Much to my surprise proc DATASETS / CONTENTS shows me that the dataset is no longer compressed! Is this how it's supposed to work? Proc CIMPORT undoes my compression? We're running (mainframe) SAS 9.0101M3

TIA
Super User
Posts: 5,257

Re: CIMPORT and COMPRESS=YES

By reading the documentation, including this SAS note: http://support.sas.com/kb/4/720.html, my guess is that the compression option used when creating the transport file is taking precedence of any options set in the current session.

/Linus
Data never sleeps
Occasional Contributor
Posts: 13

Re: CIMPORT and COMPRESS=YES

Linus, I think you're right. I found Usage Note 4720 and, indeed, CPORT preserves the compression-attribute and CIMPORT recreates with whatever info it finds on the transport-file.

How unfortunate.
Ask a Question
Discussion stats
  • 2 replies
  • 161 views
  • 0 likes
  • 2 in conversation