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.

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

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

Saved successfully!

Ooh no, something went wrong!