Transcript

ODS Packages: Putting Some Zip In Your ODS Output.

Eric GebhartPrinciple Systems Developer

1

Packages

✓HTML

✓RTF

✓PDF

✓ Images

✓Data Sets

✓Text files

Packages

Packages .SPK.ZIP

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods html close;

ods html;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods html close;

ods html;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods html close;

ods html ;ods html ;

PackingSlip

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods html close;

ods html ;

ods Package Open;

ods html ;

PackingSlip

gplot7.gifgplot8.gifgplot9.gifgplot10.gifgplot11.gif

gplot14.gifgplot13.gifgplot12.gif

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods html close;

ods html ;

ods Package Open;

Package

sashtml.htmgplot.gifgplot1.gifgplot2.gifgplot3.gifgplot4.gifgplot5.gifgplot6.gif

gplot15.gifgplot16.gifgplot17.gifgplot18.gif

PackingSlip

sashtml.htmgplot.gifgplot1.gifgplot2.gifgplot3.gifgplot4.gifgplot5.gifgplot6.gifgplot7.gifgplot8.gifgplot9.gifgplot10.gifgplot11.gifgplot12.gifgplot13.gifgplot14.gifgplot15.gifgplot16.gifgplot17.gifgplot18.gif

ods Package Publish

PackingSlip

sashtml.htmgplot.gifgplot1.gifgplot2.gifgplot3.gifgplot4.gifgplot5.gifgplot6.gifgplot7.gifgplot8.gifgplot9.gifgplot10.gifgplot11.gifgplot12.gifgplot13.gifgplot14.gifgplot15.gifgplot16.gifgplot17.gifgplot18.gif

ods Package PublishArchive

archive_path = ”./”

Properties(

);

archive_name = ‘test.zip’

PackingSlip

sashtml.htmgplot.gifgplot1.gifgplot2.gifgplot3.gifgplot4.gifgplot5.gifgplot6.gifgplot7.gifgplot8.gifgplot9.gifgplot10.gifgplot11.gifgplot12.gifgplot13.gifgplot14.gifgplot15.gifgplot16.gifgplot17.gifgplot18.gif

ods Package PublishArchive

archive_path = ”./”

Properties(

);

archive_name = ‘test.zip’

PackingSlip

sashtml.htmgplot.gifgplot1.gifgplot2.gifgplot3.gifgplot4.gifgplot5.gifgplot6.gifgplot7.gifgplot8.gifgplot9.gifgplot10.gifgplot11.gifgplot12.gifgplot13.gifgplot14.gifgplot15.gifgplot16.gifgplot17.gifgplot18.gif

ods Package

ods Package

Close

ods Package

Close

Clear;

PackagePublish

Transports

✓Archive

✓Email

✓Subscribers

✓WebDav

✓Queue

PackagePublish

Transports

PackagePublish

Properties

PackagePublish

Properties

Archive

ArchiveProperties ( Archive_name = ”test.spk” Archive_path = “./”);

ods Package Publish

Archive

Email

EmailProperties ( Archive_name = ”test.spk” Archive_path = “./”)Addresses ( “Eric@EricGebhart.com” “Kevin.Smith@SAS.com”);

ods Package Publish

Email

Subscribers

Subscribers Properties ( Channel_store = ‘LDAP: ...’)

ods Package Publish

Subscribers

WebDav

WebDavProperties ( Collection_URL = ‘http://...’);

ods Package Publish

WebDav

Queue

QueueQueues ( "MQSERIES://PCONE:LOCAL" "MSMQ://JSMITH:TRANSQ"

);

ods Package Publish

Queue

SAS Integration Technologies

SAS Integration Technologies

✓Archive

✓Email

✓Subscribers

✓WebDav

✓Queue

SAS Integration Technologies

✓Archive

✓Email

✓Subscribers

✓WebDav

✓Queue

SAS Integration Technologies

Ods Package Open;

✓Archive

✓Email

✓Subscribers

✓WebDav

✓Queue

SAS Integration Technologies

Ods Package Open ;nopf

✓Archive

✓Email

✓Subscribers

✓WebDav

✓Queue

Looking Inside✓Unzip✓Proc Document✓SAS Package

Manager

unzip -t example1.zip

Archive: example1.zip testing: PackageMetaData OK testing: gplot18.gif OK testing: gplot17.gif OK testing: gplot16.gif OK testing: gplot15.gif OK testing: gplot14.gif OK testing: gplot13.gif OK testing: gplot12.gif OK testing: gplot11.gif OK testing: gplot10.gif OK testing: gplot9.gif OK testing: gplot8.gif OK testing: gplot7.gif OK testing: gplot6.gif OK testing: gplot5.gif OK testing: gplot4.gif OK testing: gplot3.gif OK testing: gplot2.gif OK testing: gplot1.gif OK testing: gplot.gif OK testing: sashtml.htm OKNo errors detected in compressed data of example1.zip.

proc document name=archive;

import archive="example1.zip" to myPackage;

list/levels=all;

run;

Listing of: \Work.Archive\Order by: InsertionNumber of levels: All Obs Path Type--------------------------------------------------------------------------------------------------- 1 \myPackage#1 Dir 2 \myPackage#1\'sashtml.htm'n#1 File 3 \myPackage#1\'gplot.gif'n#1 File 4 \myPackage#1\'gplot1.gif'n#1 File 5 \myPackage#1\'gplot2.gif'n#1 File 6 \myPackage#1\'gplot3.gif'n#1 File 7 \myPackage#1\'gplot4.gif'n#1 File 8 \myPackage#1\'gplot5.gif'n#1 File 9 \myPackage#1\'gplot6.gif'n#1 File 10 \myPackage#1\'gplot7.gif'n#1 File 11 \myPackage#1\'gplot8.gif'n#1 File 12 \myPackage#1\'gplot9.gif'n#1 File 13 \myPackage#1\'gplot10.gif'n#1 File 14 \myPackage#1\'gplot11.gif'n#1 File 15 \myPackage#1\'gplot12.gif'n#1 File 16 \myPackage#1\'gplot13.gif'n#1 File 17 \myPackage#1\'gplot14.gif'n#1 File 18 \myPackage#1\'gplot15.gif'n#1 File 19 \myPackage#1\'gplot16.gif'n#1 File 20 \myPackage#1\'gplot17.gif'n#1 File 21 \myPackage#1\'gplot18.gif'n#1 File

Copyright © 2007, SAS Institute Inc. All rights reserved.

Meta Data

Copyright © 2007, SAS Institute Inc. All rights reserved.

list 'sashtml.htm'n/details;

Listing of: \Work.Archive\myPackage#1\'sashtml.htm'n#1Order by: InsertionNumber of levels: 1 SizeType in Bytes Created Modified Symbolic Link Template---------------------------------------------------------------------------------------------------File 4536 28FEB2007:19:15:38 28FEB2007:19:15:38

Label---------------------------------------------------------------------------------------------------MARKUP, Proc, Gplot, Gplot, Plot of Height by Weight, Gplot1, Plot of Height by Weight, Gplot2, Plot of Height by Weight, Gplot3, Plot of Height by Weight, Gplot4, Plot of Height by Weight, Gplot5, Plot of Height by Weight, Gplot6, Plot of Height by Weight

Meta Data

Package Meta Data✓Description✓Abstract✓Name / Value

Package Meta Dataods Package Open Description=’My Description’ Abstract=’My abstract’ NameValue=’Author=”Me”’ ;

File Meta Data✓Description✓MimeType✓Name / Value

File Meta Data

ods Package Add File=’example1.sas’ Description=’My 1st example’ MimeType=’Text/Plain’ NameValue = ’Data=”class” ’ ;

Multiple Simultaneous packages

Multiple Simultaneous packages

ods html Package;

ods Package(two) Open;

ods pdf Package(two);ods rtf Package(two);

ods Package Open;

Package Templates

What is it???

What is it???✓Creates Package directories✓Default package attributes✓Default publish options✓Default close options

Organizing Files

By file definiton

By Mime Type

Organizing Files

path './' files = body contents frame pages code data stylesheet ;

By Mime Type

Organizing Files

path './' files = body contents frame pages code data stylesheet ;

path 'images/' mimetypes = "image/bmp image/gif image/jpg image/png" ;

A list of Paths

Proc Template; Define Package packages.example3;

Run;

A list of Paths

default_path = "./";

path './' files = body contents frame code data ;

path 'style/' files = stylesheet ;

path 'images/' mimetypes = "image/bmp image/gif image/jpg image/png" ;

Proc Template; Define Package packages.example3;

Run;

A set of Defaults

publish = Archive properties( archive_path="./" archive_name="example3.zip" );

Description = "This is my description";

Abstract = "This is my abstract";

clear = yes; NameValue = 'data="sashelp.class";

publishing_framework = no;

Proc Template; Define Package packages.example3;

Using the Template

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

Using the Template

ods package template= example3; ods html package;

ods package publish archive;ods package close;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

unzip -t example3.zip

Archive: example3.zip testing: PackageMetaData OK testing: images/gplot18.gif OK testing: images/gplot17.gif OK testing: images/gplot16.gif OK testing: images/gplot15.gif OK testing: images/gplot14.gif OK testing: images/gplot13.gif OK testing: images/gplot12.gif OK testing: images/gplot11.gif OK testing: images/gplot10.gif OK testing: images/gplot9.gif OK testing: images/gplot8.gif OK testing: images/gplot7.gif OK testing: images/gplot6.gif OK testing: images/gplot5.gif OK testing: images/gplot4.gif OK testing: images/gplot3.gif OK testing: images/gplot2.gif OK testing: images/gplot1.gif OK testing: images/gplot.gif OK testing: ./sashtml.htm OKNo errors detected in compressed data of example3.zip.

Package Templates And

Tagsets

What does it do?✓ create a package✓ create multiple files✓ organize files ✓ set file urls✓ set file mimetypes

Automatically

Setting it up

Set File names

Set Mime Types

Set the package template

proc template; define tagset tagsets.example5; parent=tagsets.html4;

End;Run;

proc template; define tagset tagsets.example5; parent=tagsets.html4;

End;Run;

Setting it up

Set File names

Set Mime Types

package = example5;

proc template; define tagset tagsets.example5; parent=tagsets.html4;

End;Run;

Setting it up default_mimetype = "text/html"; stylesheet_mimetype = "text/css";

Set File names

package = example5;

proc template; define tagset tagsets.example5; parent=tagsets.html4;

End;Run;

Setting it up default_mimetype = "text/html"; stylesheet_mimetype = "text/css";

body = "test.html";stylesheet = "test.css";

package = example5;

proc template; define tagset tagsets.example5; parent=tagsets.html4;

End;Run;

Using It

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

Using It

proc gplot data=sashelp.class; plot height*weight; by name; run; quit;

ods tagsets.test file="example5.spk";

ods tagsets.test close;

unzip -t example5.spk

Archive: example5.spk testing: PackageMetaData OK testing: images/gplot18.gif OK testing: images/gplot17.gif OK testing: images/gplot16.gif OK testing: images/gplot15.gif OK testing: images/gplot14.gif OK testing: images/gplot13.gif OK testing: images/gplot12.gif OK testing: images/gplot11.gif OK testing: images/gplot10.gif OK testing: images/gplot9.gif OK testing: images/gplot8.gif OK testing: images/gplot7.gif OK testing: images/gplot6.gif OK testing: images/gplot5.gif OK testing: images/gplot4.gif OK testing: images/gplot3.gif OK testing: images/gplot2.gif OK testing: images/gplot1.gif OK testing: images/gplot.gif OK testing: ./test.html OK testing: style/test.css OKNo errors detected in compressed data of example5.spk.

The Future ✓Open Document Format✓MicroSoft Office Open

Copyright © 2008, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

top related