BookmarkSubscribeRSS Feed
hellind

Community Trekker

Joined:

Jun 23, 2011

JSL: Save data table with Compression

current data table() << save("\\fssg52\VIEW21_CHECKLIST.sas7bdat", SAS);

I use the above code to save the JMP data table to SAS data sets. But without compression the data table is very big. How do I put the SAS equivalent of '(Compress=yes)'  in JSL?

1 ACCEPTED SOLUTION

Accepted Solutions
mattf

Community Trekker

Joined:

Jun 23, 2011

Solution

JSL: Save data table with Compression

Hi:

If you also have access to SAS (either local or remote), one work-around might be to comress the file after transferring to SAS with a little post-processing via the SAS Submit command.

e.g.

dt = Open("$SAMPLE_DATA\Big Class.jmp");

dt << Save As("C:\temp\BigClass.sas7bdat", SAS);

// or

dt << SAS Export Data( dt, temp, BigClass, Replace Existing);

// then

SAS Submit("

     libname temp "C:\temp";

     data temp.BigClass(compress=yes);

          set temp.BisClass;

     run;

proc contents data=temp.BigClass;

run;

");

Best regards,

-Matt

5 REPLIES
mattf

Community Trekker

Joined:

Jun 23, 2011

Solution

JSL: Save data table with Compression

Hi:

If you also have access to SAS (either local or remote), one work-around might be to comress the file after transferring to SAS with a little post-processing via the SAS Submit command.

e.g.

dt = Open("$SAMPLE_DATA\Big Class.jmp");

dt << Save As("C:\temp\BigClass.sas7bdat", SAS);

// or

dt << SAS Export Data( dt, temp, BigClass, Replace Existing);

// then

SAS Submit("

     libname temp "C:\temp";

     data temp.BigClass(compress=yes);

          set temp.BisClass;

     run;

proc contents data=temp.BigClass;

run;

");

Best regards,

-Matt

Re: JSL: Save data table with Compression

How about using the OS file compression?  In Windows NTFS file system, the compression that is built in does a better job of compression than the SAS dataset option.

See http://en.wikipedia.org/wiki/NTFS#File_compression .

Doc Muhlbaier

Duke

hellind

Community Trekker

Joined:

Jun 23, 2011

JSL: Save data table with Compression

Doc@Duke,

Do you mean compression to ZIP? I save the file in a shared folder to be used by the team.

Re: JSL: Save data table with Compression

No, in windows XP and later, the NTFS file system supports data compression at the OS level.  In XP, right click on a file or directory and select properties, click "Advanced" and you get the choice to compress.  You can set it up at the directory level, so all files and subdirectories will be compressed as well.

See http://en.wikipedia.org/wiki/NTFS#File_compression

hellind

Community Trekker

Joined:

Jun 23, 2011

Re: JSL: Save data table with Compression

I see. I learned something new. I can set compression=on on my local folder.

But because I am saving the datatables as SAS Datasets to a shared folder, controlled my IT, I don't have the option to right click on the shared folder.

My workplace is a corporate with tight security.