The SAS Output Delivery System and reporting techniques

ODS package changing encoding of the zipped files

Reply
Contributor DCL
Contributor
Posts: 35

ODS package changing encoding of the zipped files

Hi,

My sas environment is set with global encoding UTF-8.

I want to export my SAS dataset into a UTF-16 encoded csv file to feed the file into another application. I was able to do this successfully. However, when I try to zip the UTF-16 encoded file(s) using ODS package, the encoding of the zipped files change automatically to ANSI.

Here is the macro i used for zipping:

%macro test;

options lrecl=10000 ;
ods package(test) open ;

filename fil1 "&_outbound./&file1." encoding="utf-16le";

ods package(test) add file=fil1;

filename fil2 "&_outbound./&file2." encoding="utf-16le";

ods package(test) add file=fil2;

ods package(test) publish archive properties(archive_name="zipfile.zip" archive_path="/home/loc" );
ods package(test) close clear;

%mend;

I have verified that "&_outbound./&file1" is UTF-16. But the same file extracted from zipfile.zip archive is ANSI. Is there any option to set encoding here?

Thanks in advance!



SAS Super FREQ
Posts: 8,744

Re: ODS package changing encoding of the zipped files

Hi:

  I think this is a question for Tech Support. To open a track with Tech Support, follow the instructions here: Technical Support Form

cynthia

Contributor DCL
Contributor
Posts: 35

Re: ODS package changing encoding of the zipped files

Thanks Cynthia, i shall do as you suggested.

Contributor DCL
Contributor
Posts: 35

Re: ODS package changing encoding of the zipped files

Hi All,

 

Just to update on this topic- I had raised this issue to SAS tech Support but unfortunately did not recieve any useful solution.

 

My application has now migrated to SAS9.4. I did a quick search in SAS docs but couldnt find any major enhancements to ODS package in 9.4 (that could preserve the encoding type of the file).

 

If there are any thoughts, please let me know.

 

Thanks,
Dilip

Ask a Question
Discussion stats
  • 3 replies
  • 525 views
  • 0 likes
  • 2 in conversation