Sample 45277: Use ODS Package to create a zip file that includes all supporting files generated when using ODS HTML
ODS Package enables you to create a zip file that includes all of the supporting files that are generated when using the ODS HTML destination.
When generating output with the ODS HTML destination, the body, contents, and frame files, along with any image files that are generated, can be packaged into a single zip file. You also have the ability to include the program and the data sets if desired.
You can create this package, or zip file, by adding an ODS PACKAGE OPEN statement at the beginning of the code that generates the output to be included in the zip file. Include the PACKAGE option in the ODS HTML statement to tell ODS Package to add all of the output from the destination to the package. The ODS PACKAGE PUBLISH statement creates the archive file and enables you to specify the name and location of the zip file.
The sample code below illustrates the creation of a zip file using ODS Package. A list of the files contained in the zip file can be viewed on the Output tab.
proc sort data=sashelp.class out=temp;
by age;
run;
ods package open nopf;
ods html path="C:\temp"(url=none)
file="body.html"
contents="contents.html"
frame="frame.html" package;
proc print data=temp;
by age;
run;
proc sgplot data=temp;
by age;
scatter x=age y=height;
run;
quit;
ods html close;
ods package publish archive properties(archive_name="htmloutput.zip"
archive_path="c:\");
ods package close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
ODS Package enables you to create a zip file that includes all of the supporting files that are generated when using the ODS HTML destination.
Date Modified: | 2012-02-09 16:56:03 |
Date Created: | 2012-01-04 06:02:49 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
Windows Vista for x64 | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |