28.09.2013 Views

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SAS</strong> <strong><strong>an</strong>d</strong> <strong>Lotus</strong> <strong>Notes</strong>, <strong>an</strong> <strong>ideal</strong><br />

<strong>combination</strong> <strong>for</strong><br />

webpublication<br />

Florence - May 2001


Agenda<br />

Presentation <strong>SAS</strong> <strong><strong>an</strong>d</strong> <strong>Lotus</strong> <strong>Notes</strong><br />

Introduction<br />

Tables on the intr<strong>an</strong>et<br />

Charts<br />

A clickable map<br />

Conclusion


Introduction<br />

OZ zorgverzekeringen<br />

Health insur<strong>an</strong>ce as core-bussiness<br />

615.000 insurees, 590.000 ZFW<br />

Main office in Breda, a few offices around the area<br />

550 employees<br />

travel-insur<strong>an</strong>ce (Europeese) <strong><strong>an</strong>d</strong> other insur<strong>an</strong>ce<br />

prodcuts (ASR, Axent/ Aegon)


Tables on the intr<strong>an</strong>et (1)<br />

Static or dynamic?<br />

Why on the intr<strong>an</strong>et?<br />

ODS HTML output destination<br />

NOTESDB access engine


Tables on the intr<strong>an</strong>et (2)<br />

a simple static webpage<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazp.html"<br />

path = odsout<br />

newfile = output;<br />

title ”A<strong>an</strong>tal IKAZ-P polissen";<br />

proc tabulate data=d1 missing;<br />

run;<br />

ods html close;


filename sasintra notesdb;<br />

Tables on the intr<strong>an</strong>et (3)<br />

adding a page to <strong>an</strong> existing LN-database<br />

data _null_;<br />

FILE sasintra;<br />

PUT '!NSF_DB! d:\testserver\notes\data\hugs\sasintra.nsf';<br />

PUT "!NSF_ATTACH! d:\hugs\output\ikazp.html";<br />

PUT '!NSF_FORM! RAPH00';<br />

PUT "!NSF_FIELD!Titel!A<strong>an</strong>tal polissen Ikaz-P";<br />

PUT '!NSF_FIELD!Status!Publiceren';<br />

PUT '!NSF_FIELD!SoortRapport!1';<br />

PUT '!NSF_FIELD!RapportType!Per rechtsgrond';<br />

PUT "!NSF_FIELD!Jaar!2000";<br />

PUT "!NSF_FIELD!Ma<strong><strong>an</strong>d</strong>!Oktober";<br />

PUT "!NSF_FIELD!Periode!10";<br />

PUT '!NSF_FIELD!Soortverzekering!Hoofdverzekering';<br />

PUT "!NSF_FIELD!DocCode!ikazp";<br />

PUT "!NSF_FIELD!RapportUrl!/hugs/sasintra.nsf/DbCode/ikazp/$file/ikazp.html?OpenElement";<br />

run;


Tables on the intr<strong>an</strong>et (4)<br />

extra features<br />

Tables with drilldown-facilities<br />

Tables in Excel<br />

Creating tables with a different (comp<strong>an</strong>y) ‘style’


Tables on the intr<strong>an</strong>et (5)<br />

a static webpage with drilldown<br />

proc <strong>for</strong>mat;<br />

value $ozc<br />

'00' ='Buitenl<strong><strong>an</strong>d</strong>'<br />

'11' ='Brab<strong>an</strong>t’;<br />

run;<br />

filename odsout "d:\hugs\output";<br />

ods html body = "rg.html" path = odsout newfile = output;<br />

proc tabulate data=hugs.hugsd1_2;<br />

<strong>for</strong>mat ozc $ozcc.;<br />

run;<br />

ods html close;


Tables on the intr<strong>an</strong>et (6)<br />

a static webpage with a link to Excel<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazpexcel.html"<br />

path = odsout<br />

newfile = output;<br />

title "A<strong>an</strong>tal IKAZ-P polissen";<br />

title2 " %bquote() ";<br />

proc tabulate data=d1 out=d1_2 (drop=_page_ _type_ _table_);<br />

run;<br />

ods html close;


Tables on the intr<strong>an</strong>et (7)<br />

creating a new style<br />

proc template;<br />

define style intra1;<br />

PARENT=styles.default;<br />

STYLE Body FROM Body/<br />

BACKGROUNDIMAGE='logo_zt.gif’; /* Background */<br />

STYLE SystemTitle FROM SystemTitle / /* Title above table */<br />

FONT_SIZE = 4<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Header FROM Header / /* Column-head */<br />

FONT_SIZE = 2<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Data FROM Data / /* Cellse */<br />

FONT_SIZE = 2<br />

FOREGROUND = white<br />

BACKGROUND = purple;<br />

end;<br />

run;;


Tables on the intr<strong>an</strong>et (8)<br />

using a different style<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazpstyle.html"<br />

path = odsout<br />

newfile = output<br />

style = intra1;<br />

title "A<strong>an</strong>tal IKAZ-P polissen";<br />

proc tabulate data=d1 missing;<br />

run;<br />

ods html close;


Different devices<br />

Static or dynamic?<br />

Charts (1)<br />

Extra options using frames


Charts (2)<br />

a webpage with a GIF-chart<br />

proc catalog cat=work.gseg kill;<br />

quit;<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html body="graf.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/DbCode/04gif/$file/";<br />

goptions device=gif;<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;


Charts (3)<br />

some nice features using the JAVA-device<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html file="graf.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/dbcode04java/$file/"<br />

archive="/hugs/sasintra.nsf/dbluid/ba99e/$file/graphapp.jar";<br />

goptions device=java;<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;


Charts (4)<br />

a frame with a table of contents<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html frame='frame.html'<br />

contents='contents.html'<br />

body="body.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/dbcode04gifetc/$file/";<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc tabulate data = hugs.grafdata;<br />

run;<br />

goptions device=gif;<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;


Charts (4)<br />

JAVA-metaframe<br />

goptions device=javameta;<br />

filename _webout "d:\hugs\output\maag\hagro04\mchart.htm";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

filename _webout "d:\hugs\output\maag\hagro04\mchart2.htm";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

filename _webout "d:\hugs\output\maag\hagro04\mchart3.htm";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

filename _webout;


Charts (5)<br />

JAVA-metaframe<br />

filename htmlout "d:\hugs\output\maag\hagro04\mchartmain.htm";<br />

data _null_ ;<br />

file htmlout ;<br />

put '';<br />

put '';<br />

put ' Working with Multiple Metacode Files ';<br />

put '';<br />

put '';<br />

put ' ';<br />

put '';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put ' ';<br />

put 'Sorry, your browser does not support the applet tag.';<br />

put '';<br />

put '';<br />

put '';<br />

run;


A clickable map<br />

data hagros;<br />

retain XSys YSys '2' When 'A' Position 'E';<br />

length text $2;<br />

x=28.8; y=29.2; text='g'; HTML = 'href="/hugs/sasintra.nsf/DbCode/m040/$file/mchartmain.htm?OpenElement"';<br />

output;<br />

x=29; y=28.3; text='04'; HTML='';<br />

output;<br />

x=29.4; y=29.2; text='r'; HTML = 'href="/hugs/<strong>SAS</strong>Intra.NSF/<strong>SAS</strong>report?OpenAgent&04"';<br />

output;<br />

keep XSys YSys When Position Text X Y HTML;<br />

run;<br />

ods html file='eggkaart.htm'<br />

path=odsout<br />

base="/hugs/sasintra.nsf/DbCode/egg01/$file/";<br />

proc gmap data=hulp map=hugs.ozkaart;<br />

id k_egg;<br />

choro eggnr /discrete nolegend <strong>an</strong>no=hagros coutline=black;<br />

title font=hwdmx065 h=7 c=black 'Economische Geografisch Gebieden';<br />

run;<br />

quit;<br />

ods html close;


Conclusion<br />

adv<strong>an</strong>tages using <strong>SAS</strong> (ODS)<br />

It’s easy to create webpages<br />

It’s possible to make nice webpages by creating a<br />

(comp<strong>an</strong>y) style<br />

Lots of nice features using different devices


Conclusion<br />

adv<strong>an</strong>tages using <strong>Lotus</strong> <strong>Notes</strong><br />

All webpages are within one (or a few) LNdatabases<br />

LN provides easy navigation<br />

It’s easy to use LN-security<br />

You c<strong>an</strong> use the existing infrastructure


<strong>SAS</strong> ® <strong><strong>an</strong>d</strong> <strong>Lotus</strong> <strong>Notes</strong> ® <strong>an</strong> <strong>ideal</strong> <strong>combination</strong> <strong>for</strong> webpublication<br />

Erwin v<strong>an</strong> Dongen<br />

OZ Health Insur<strong>an</strong>ce<br />

Breda, The Netherl<strong><strong>an</strong>d</strong>s<br />

Abstract<br />

With the help of the Output Delivery System (ODS) it has become very easy to<br />

generate HTML Output. St<strong><strong>an</strong>d</strong>ard reports, which were previously distributed on<br />

paper, c<strong>an</strong> now be published on <strong>an</strong> Intr<strong>an</strong>et through (static) HTML-pages. To<br />

administrate large qu<strong>an</strong>tities of HTML pages, they are stored in one or more<br />

<strong>Lotus</strong> <strong>Notes</strong> databases. Then they c<strong>an</strong> act as <strong>an</strong> Intr<strong>an</strong>et with the help of a<br />

<strong>Lotus</strong> Domino server.<br />

In this presentation it is shown how easy it is to generate HTML-pages in a<br />

nice lay-out. Particular attention will be paid to tables (proc tabulate),<br />

graphics (proc gchart) <strong><strong>an</strong>d</strong> maps (proc gmap).<br />

Of course the storage of all the output in a <strong>Lotus</strong> <strong>Notes</strong> (LN) database with the<br />

help of the NOTESDB access engine will be a major part of the presentation.<br />

A demonstration will highlight the adv<strong>an</strong>tages of this method.<br />

1. Tables on the intr<strong>an</strong>et<br />

The easiest way to publish in<strong>for</strong>mation on the intr<strong>an</strong>et is to create a static webpage. When you<br />

have a piece of existing code in which you create a table using the tabulate procedure it is<br />

pretty easy to capture the output of the procedure in a HTML-file. All you have to do is to add<br />

a few ODS-statements to your code as is shown in the example.<br />

Example: A simple static webpage<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazp.html"<br />

path = odsout<br />

newfile = output;<br />

title ”A<strong>an</strong>tal IKAZ-P polissen";<br />

proc tabulate data=d1 missing;<br />

run;<br />

ods html close;<br />

If the destination (represented by the filename reference) is somewhere on your webserver<br />

then the output is immediately available on the intr<strong>an</strong>et. However this paper is about<br />

publishing it on a Domino-webserver in which case you have to put your output in a LNdatabase.<br />

The following comm<strong><strong>an</strong>d</strong>s c<strong>an</strong> be used to create a new <strong>Notes</strong> document <strong><strong>an</strong>d</strong> to store<br />

it in a <strong>Notes</strong> database.<br />

1


Example: Adding a <strong>Notes</strong> document to <strong>an</strong> existing LN-database<br />

filename sasintra notesdb;<br />

data _null_;<br />

FILE sasintra;<br />

PUT '!NSF_DB! d:\testserver\notes\data\hugs\sasintra.nsf'; /* Name of the LN-database */<br />

PUT "!NSF_ATTACH! d:\hugs\output\ikazp.html"; /* Name of the HTML-file */<br />

PUT '!NSF_FORM! RAPH00'; /* Name of the <strong>for</strong>m to use */<br />

PUT "!NSF_FIELD!Titel!A<strong>an</strong>tal polissen Ikaz-P"; /* Field defined in the <strong>for</strong>m */<br />

PUT '!NSF_FIELD!Status!Publiceren'; /* Field defined in the <strong>for</strong>m */<br />

PUT '!NSF_FIELD!SoortRapport!1'; /* Field defined in the <strong>for</strong>m */<br />

PUT '!NSF_FIELD!RapportType!Per rechtsgrond'; /* Field defined in the <strong>for</strong>m */<br />

PUT "!NSF_FIELD!Jaar!2000"; /* Field defined in the <strong>for</strong>m */<br />

PUT "!NSF_FIELD!Ma<strong><strong>an</strong>d</strong>!Oktober"; /* Field defined in the <strong>for</strong>m */<br />

PUT "!NSF_FIELD!Periode!10"; /* Field defined in the <strong>for</strong>m */<br />

PUT '!NSF_FIELD!Soortverzekering!Hoofdverzekering'; /* Field defined in the <strong>for</strong>m */<br />

PUT "!NSF_FIELD!DocCode!ikazp"; /* Unique reference to the new LN-document */<br />

PUT "!NSF_FIELD!RapportUrl!/hugs/sasintra.nsf/DbCode/ikazp/$file/ikazp.html?OpenElement";<br />

/* URL containing DocCode <strong><strong>an</strong>d</strong> name of HTML */<br />

run;<br />

First a file name reference is created which specifies that the <strong>Notes</strong>DB access engine is to be<br />

used. Then, the data is written to this file. The <strong>Notes</strong> database that is to be opened is specified.<br />

Then the HTML file that is to be attached is indicated. In this example, we use a<br />

predetermined <strong>Notes</strong> <strong>for</strong>m (RAPH00). Finally, the fields that belong to this <strong>for</strong>m are filled in.<br />

It is import<strong>an</strong>t to note that the DocCode must be unique <strong><strong>an</strong>d</strong> must be specified in the<br />

RapportUrl.<br />

Requirements<br />

To use the <strong>Notes</strong>DB access engine it is necessary to specify the directory in which the<br />

notes.ini <strong><strong>an</strong>d</strong> the notes.exe are found in your search path. This c<strong>an</strong> be done in the control<br />

p<strong>an</strong>el system. Go to environment <strong><strong>an</strong>d</strong> ch<strong>an</strong>ge the variable ‘path’. Add the extra directories to<br />

the path. For example (<strong>for</strong> Windows NT) c:\notes\data;c:\notes’. See <strong>for</strong> more in<strong>for</strong>mation<br />

Walker, 1997.<br />

A table gets much more interesting when you add some extra features to it. The following<br />

examples show how you c<strong>an</strong> add a drilldown to your table, how you c<strong>an</strong> make a link to <strong>an</strong><br />

Excel-spreadsheet (so a user c<strong>an</strong> download the in<strong>for</strong>mation) <strong><strong>an</strong>d</strong> how you c<strong>an</strong> create <strong><strong>an</strong>d</strong> add a<br />

(comp<strong>an</strong>y) style.<br />

Example: A static webpage with drilldown<br />

proc <strong>for</strong>mat;<br />

value $ozc<br />

'00' ='Buitenl<strong><strong>an</strong>d</strong>'<br />

'11' ='Brab<strong>an</strong>t’;<br />

run;<br />

filename odsout "d:\hugs\output";<br />

ods html body = "rg.html"<br />

path = odsout<br />

newfile = output;<br />

proc tabulate data=hugs.hugsd1_2;<br />

run;<br />

ods html close;<br />

2


filename odsout "d:\hugs\output";<br />

ods html body = "regio.html"<br />

path = odsout<br />

newfile = output;<br />

proc tabulate data=hugs.hugsd1_2;<br />

<strong>for</strong>mat ozc $ozc.;<br />

run;<br />

ods html close;<br />

In this example the $ozc-<strong>for</strong>mat contains links to other HTML-files. In the first proc tabulate<br />

a HTML-file is created <strong>for</strong> each ozc. These files are automatically numbered rg.html, rg1.html<br />

<strong><strong>an</strong>d</strong> so on. The second proc tabulate creates one HTML-file (regio.html) containing a table in<br />

which the ozc-variable is a row-variable which is <strong>for</strong>matted with the links to the other created<br />

HTML-files. Finally you add all files to your LN-database <strong><strong>an</strong>d</strong> you make sure that only<br />

regio.html c<strong>an</strong> be addressed directly.<br />

To give a user more possibilities to use the data represented by a HTML-table you c<strong>an</strong> store<br />

the data in <strong>an</strong> Excel-file <strong><strong>an</strong>d</strong> link the file to the HTML-document. This is shown below.<br />

Example: A static webpage with a link to Excel<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazpexcel.html"<br />

path = odsout<br />

newfile = output;<br />

title "A<strong>an</strong>tal IKAZ-P polissen";<br />

title2 " %bquote() ";<br />

proc tabulate data=d1 out=d1_2 (drop=_page_ _type_ _table_);<br />

run;<br />

ods html close;<br />

Here a link to Excel is added in the title2-statement. The Href points to a pre-created Excelfile<br />

(which c<strong>an</strong> be located in the LN-database) <strong><strong>an</strong>d</strong> the Excel-logo is used as the link. Users<br />

who like to create their own graphs or tables using Excel c<strong>an</strong> now download the in<strong>for</strong>mation<br />

<strong><strong>an</strong>d</strong> c<strong>an</strong> do whatever they like with it.<br />

ODS gives you the possibility to control the look <strong><strong>an</strong>d</strong> feel of the HTML-files you create. One<br />

of the tools to do so is to create a style using the template-procedure. This paper doesn’t cover<br />

all the options, but a small example is shown below.<br />

Example: Creating a new style<br />

proc template;<br />

define style intra1;<br />

PARENT=styles.default;<br />

STYLE Body FROM Body/<br />

BACKGROUNDIMAGE='logo_zt.gif’; /* Background */<br />

STYLE SystemTitle FROM SystemTitle / /* Title above table */<br />

FONT_SIZE = 4<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Header FROM Header / /* Column-head */<br />

FONT_SIZE = 2<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Data FROM Data / /* Cells */<br />

FONT_SIZE = 2<br />

FOREGROUND = white<br />

BACKGROUND = purple;<br />

end;<br />

run;<br />

3


In this style the default style is used as the base. Instead of the grey background a logo is used.<br />

Furthermore the fontsize, <strong>for</strong>eground <strong><strong>an</strong>d</strong> background of the title, column-heads <strong><strong>an</strong>d</strong> cells are<br />

ch<strong>an</strong>ged. The following example shows how this new style c<strong>an</strong> be used.<br />

Example: using a different style<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazpstyle.html"<br />

path = odsout<br />

newfile = output<br />

style = intra1;<br />

title "A<strong>an</strong>tal IKAZ-P polissen";<br />

proc tabulate data=d1 missing;<br />

run;<br />

ods html close;<br />

To use a different style, simply add the style-option to the ODS-statement.<br />

2. Graphs<br />

Creating graphs to publish on the intr<strong>an</strong>et is somewhat more complicated because on the one<br />

h<strong><strong>an</strong>d</strong> you have to create the image (<strong>for</strong> example a GIF) <strong><strong>an</strong>d</strong> on the other h<strong><strong>an</strong>d</strong> you have to<br />

create a HTML-file in which the GIF is embedded. Luckily ODS does the necessary work <strong>for</strong><br />

you. The following example creates a graph using proc gchart with the GIF-device.<br />

Example: a webpage with a GIF-graph<br />

proc catalog cat=work.gseg kill;<br />

quit;<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html body="graf.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/DbCode/04gif/$file/";<br />

goptions device=gif;<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;<br />

The proc catalog in the example above makes sure that the gseg-catalog is empty when the<br />

new graph is created. The GIF-file is automatically named gchartx.gif where x is the number<br />

of the graph in the catalog. When you w<strong>an</strong>t to add the GIF to a LN-database the name must be<br />

known. By emptying the catalog you c<strong>an</strong> be sure that in this case the GIF-file is named<br />

gchart.gif. The ODS-statement looks almost the same as the ODS-statement that is used in the<br />

previous (table) examples. The only new part is the base-option. This option makes sure that<br />

the HTML-file that’s been created contains the correct link to the GIF. It is the URL to the<br />

GIF.<br />

Both the HTML-file <strong><strong>an</strong>d</strong> the GIF-file c<strong>an</strong> be added to the LN-database. The GIF file will be<br />

stored such that it c<strong>an</strong> not be asked <strong>for</strong> directly. Only through the HTML-file the GIF will be<br />

shown.<br />

It is also possible to use different devices. The Java-device <strong>for</strong> example gives the user a lot<br />

more possibilities to interact. The example below shows the use of the JAVA-device.<br />

4


Example: a webpage with a JAVA-graph<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html file="graf.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/dbcode04java/$file/"<br />

archive="/hugs/sasintra.nsf/dbluid/ba99e/$file/graphapp.jar";<br />

goptions device=java;<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;<br />

The only difference is the device=java <strong><strong>an</strong>d</strong> the archive-option that is added to the ODSstatement.<br />

The last one contains the URL to the JAVA-applet that has to be used while<br />

viewing the graph. In our case this applet is also attached to a <strong>Notes</strong>-document in the LNdatabase.<br />

So far we’ve been creating either a graph or a table. When you create both (or more) it c<strong>an</strong> be<br />

very nice to create a table of contents as well. In the next example a frame is created in which<br />

the left side contains a table of contents <strong><strong>an</strong>d</strong> the right side contains a graph <strong><strong>an</strong>d</strong> a table.<br />

Example: a frame with a table of contents<br />

filename odsout "d:\hugs\output\maag\hagro04";<br />

ods html frame='frame.html'<br />

contents='contents.html'<br />

body="body.html"<br />

path=odsout<br />

base="/hugs/sasintra.nsf/dbcode04gifetc/$file/";<br />

title "A<strong>an</strong>tal DDD's Maagmiddelen";<br />

proc tabulate data = hugs.grafdata;<br />

run;<br />

goptions device=gif;<br />

proc gchart data = hugs.grafdata;<br />

quit;<br />

ods html close;<br />

In the ODS-statement the file-option has been replaced by the frame, contents <strong><strong>an</strong>d</strong> bodyoption.<br />

The base now is the path to the contents, body <strong><strong>an</strong>d</strong> GIF. By attaching these three files<br />

in one <strong>Notes</strong>-document (which itself is not published) the link between the frame (which is<br />

published) <strong><strong>an</strong>d</strong> the rest is established.<br />

5


3. A clickable map<br />

The last part of this paper shows <strong>an</strong> example of a clickable map. A map is created using the<br />

GMAP-procedure <strong><strong>an</strong>d</strong> hotspots are added using the <strong>an</strong>notate-facility.<br />

Example: a clickable map<br />

data hagros;<br />

retain XSys YSys '2' When 'A' Position 'E';<br />

length text $2;<br />

x=28.8; y=29.2; text='g'; HTML =<br />

'href="/hugs/sasintra.nsf/DbCode/m040/$file/mchartmain.htm?OpenElement"';<br />

output;<br />

x=29; y=28.3; text='04'; HTML='';<br />

output;<br />

x=29.4; y=29.2; text='r'; HTML = 'href="/hugs/<strong>SAS</strong>Intra.NSF/<strong>SAS</strong>report?OpenAgent&04"';<br />

output;<br />

keep XSys YSys When Position Text X Y HTML;<br />

run;<br />

ods html file='eggkaart.htm'<br />

path=odsout<br />

base="/hugs/sasintra.nsf/DbCode/egg01/$file/";<br />

proc gmap data=hulp map=hugs.ozkaart;<br />

id k_egg;<br />

choro eggnr /discrete nolegend <strong>an</strong>no=hagros coutline=black;<br />

title font=hwdmx065 h=7 c=black 'Economische Geografisch Gebieden';<br />

run;<br />

quit;<br />

ods html close;<br />

In the datastep <strong>an</strong> <strong>an</strong>notate dataset is created. This dataset contains x <strong><strong>an</strong>d</strong> y co-ordinates of<br />

hotspots. The variable text is the hotspot that is shown on the map <strong><strong>an</strong>d</strong> the HTML-variable<br />

contains the URL to go to when the user clicks on the hotspot. In this case the first hotspot<br />

(‘g’) goes to <strong>an</strong>other HTML-file in the LN-database. The other hotspot (‘r’) starts a LN-agent<br />

with 04 as a parameter.<br />

The GMAP-procedure creates the map <strong><strong>an</strong>d</strong> uses the <strong>an</strong>notate-dataset to create the hotspots.<br />

Conclusion<br />

The new Output Delivery System makes it very easy to create HTML-output. Both text<br />

(tables) <strong><strong>an</strong>d</strong> graphics c<strong>an</strong> be made by adding a few statements to your existing code. By<br />

adding some HTML-statements yourself or by using different options <strong><strong>an</strong>d</strong> devices you c<strong>an</strong><br />

add extra features <strong>for</strong> extra functionality or just to make it all look a bit nicer. By using <strong>Lotus</strong><br />

<strong>Notes</strong> to store all webcontent everything is stored in a structured way. Besides that it is<br />

possible to use <strong>an</strong> existing infrastructure including security <strong><strong>an</strong>d</strong> navigation.<br />

References<br />

Walker, Jamie (1997) Integrating <strong>Lotus</strong> <strong>Notes</strong> ® with <strong>SAS</strong> ® , <strong>SAS</strong> ®<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!