+ All Categories
Home > Documents > Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ......

Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ......

Date post: 21-May-2018
Category:
Upload: lebao
View: 217 times
Download: 0 times
Share this document with a friend
27
Creating synergy by integrating SAS ® and Lotus Notes ® Erwin van Dongen & Han Tanis SAS European User Group International June 2000, Dublin
Transcript
Page 1: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

Creating synergy by integratingSAS® and Lotus Notes®

Erwin van Dongen &Han Tanis

SAS European User Group InternationalJune 2000, Dublin

Page 2: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Agenda

! Introduction! Lotus Notes as intranet framework! Starting a SAS-program in Lotus Notes! Lotus e-mail and SAS! SAS and Lotus Notes via ODBC! Conclusion

Page 3: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Introduction!!!!OZ health insurance

! Head office in Breda, South-West ofthe Netherlands

! > 600.000 enrolees! annual turnover: 1.4 billion Dutch

guilders (0.64 billion Euro)! SAS for datawarehousing and

reporting

Page 4: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Introduction""""Lotus Notes

! Known for e-mail and calendar! Web server: Lotus Domino! For OZ Lotus is an important middle-

ware tool:• between web client - mainframe• between web client - SAS

datawarehouse

Page 5: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Introduction####OZ intranet example

Storing SAS-output in aNOTES-database

Generate a report in MSWord with SAS

E-mailing this documentwith SAS

Accessing a SAS-dataset in Notes viaODBC

A1

A3

A2

B

Pharmaceutical

Quality

Groups

OZ-online

Page 6: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Intranet framework!!!!Why using Lotus Notes?

! Need for automation of periodicalreports

! SAS is excellent for reporting on theweb: html, java-applets, active-x

! Storing web pages in Notes:• access control• maintenance• using existing infrastructure for intranet

Page 7: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Intranet framework""""How it can be done

! Define the structure of the intranet in aLotus Notes application

! Create HTML and other files with SAS(ODS in version 8 is far more easythen the HTML-macro’s in version 6)

! Use a data null step to put the createdfiles in a Notes Database

! Notes.ini and Notes.exe in search path

Page 8: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

FILENAME sasintra NOTESDB;

DATADATADATADATA _NULL_; FILE sasintra; PUT '!NSF_DB! d:\seugi\sasintra.nsf'; PUT "!NSF_ATTACH! d:\seugi\output\graf.htm"; PUT '!NSF_FORM! VERS00'; PUT "!NSF_FIELD!Titel!SEUGI Graph"; PUT '!NSF_FIELD!Status!Publiceren'; PUT "!NSF_FIELD!Jaar!2000"; PUT "!NSF_FIELD!Onderwerp!SEUGI"; PUT "!NSF_FIELD!Soort!Huisartshulp"; PUT "!NSF_FIELD!Subonderwerp!SEUGI"; PUT "!NSF_FIELD!Zorgverlener!SEUGI"; PUT "!NSF_FIELD!DocCode!SEUGI"; PUT "!NSF_FIELD!RapportUrl!/intranet/sasintra.nsf/ DbCode/SEUGI/$file/graf.htm?OpenElement";RUNRUNRUNRUN;

Intranet framework####SAS NotesDB engine

Specify filename

Notes Database

Notes form

SAS output

Notes fields

Page 9: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Intranet framework$$$$SAS NotesDB engine

DEMODEMODEMO

Page 10: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Calling SAS programs!!!!Starting SAS in Lotus Notes

! Lotus Notes can call a SAS programwith certain parameters

! Lotus Notes waits for SAS-output bymeans of an agent

! OZ uses this on the extranet forsplitting billing files in two files: onewith correct data (for the mainframe)and one with incorrect data

Page 11: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Calling SAS programs""""How it can be done

Sub Initialize Dim WEBSession As New NotesSession Dim Document As NotesDocument

Set Document = WEBSession.DocumentContext

Parameters$ = "-SYSIN d:\seugi\applicatie.SAS -INITSTMT '%let a="& Right$( Document.QUERY_STRING( 0 ), 1 ) & ";'"

RunStatus = Shell( "C:\SAS\SAS.EXE " & Parameters$ )

If Not ( RunStatus = 33 ) Then Print "Can't start SAS-program." Else Print "The SAS-program is started." End IfEnd Sub

SAS program

Macro var.

SAS.EXE

Page 12: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Calling SAS programs####How it can be done

DEMODEMODEMO

Page 13: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Lotus Notes mail!!!!Mailing SAS-output automatically

! Distributing SAS-output by e-mail! Internal and external end users! Periodically standard reports

generated in batch (output mostly inMS Excel or ASCII format)

Page 14: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Lotus Notes mail""""How it can be done

! Adjust config.sas:• EMAILSYS VIM• EMAILID "your email ID"• EMAILPW your email password

! Notes.ini and Notes.exe in search path! Use a data null step to e-mail

generated output

Page 15: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Lotus Notes mail####How it can be done

FILENAME mymail EMAIL "Han Tanis/I en A/OZNotes" SUBJECT="Insurees at date &SYSDATE" ATTACH ="g:\users\dongen_e\seugi2.sd2";

DATADATADATADATA _NULL_; FILE mymail; PUT 'Dear Han,'; PUT ' '; PUT 'Hereby I send you the dataset with the current insured persons.'; PUT ' '; PUT 'Kind regards,'; PUT ' '; PUT ' '; PUT 'Erwin';RUNRUNRUNRUN;

Specify filename

Subject

Put statements

Attachment

Page 16: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Connection by ODBC!!!!Accessing SAS datasets in Lotus Notes

! Reading SAS data by ODBC! SAS base is enough! OZ application:

• health care providers can check ifsomeone is insured via the extranet

• in the near future part of the workflowmanagement system (for exampleacceptation procedure)

Page 17: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Connection by ODBC""""How it can be done

! Add the SAS ODBC driver to theODBC Data Source Administrator (incontrol panel Windows NT)

! Configure the SAS ODBC driver! Use the TCP/IP protocol (not DDE)! Adjust the services file! Run a proc ODBCSERV

Page 18: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Connection by ODBC####How it can be done

DEMODEMODEMO

Page 19: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

SEUGI 2000 Dublin: integrating SAS® and Lotus Notes ®

Conclusion

! Using strong sides of both softwarepackages adds value

! Less paper by means of an intranetthat is under control

! High level of automation is possible! Gaining access to SAS-data in a

simple and reliable way

Page 20: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

1

Creating synergy by integrating SAS!!!! and Lotus Notes!!!!

Erwin van Dongen & Han TanisOZ Health Insurance

Breda, The Netherlands

Abstract

Many organisations use both SAS and Lotus Notes. The purpose of this paper is to provide anoverview of the possibilities of integrating SAS and Lotus Notes. By presenting solutionsdeveloped by OZ Health Insurance, we will demonstrate how SAS and Lotus Notes have beenintegrated in order to benefit our organisation.

First of all, Lotus Notes provides an excellent framework for intranet. OZ uses this frameworkto distribute (management) information in a structured and automated way. Reports arecreated with SAS on a regular basis, resulting in HTML files or other file formats. These filesare added to a Lotus database using the SAS NotesDB access engine and are published on theintranet.Secondly, Lotus Notes mail is used to automatically distribute reports created in SAS. Forexample, contracted health care providers regularly receive a list of recently insured personsin an attached Excel file.Thirdly, Lotus Notes can start a SAS session with specific parameters which are dependent onthe input. OZ has improved the billing process dramatically by using this facility.Finally, we have built an application to check if someone is insured. This application usesboth the SAS ODBC server and Lotus Script.

Introduction

SAS software provides users with important facilities for integration with Lotus Notes,making it possible to use the strengths of both software packages. Using four examples, wewill demonstrate how the integration can be realised technically. We will also go into thebusiness applications at OZ. We assume the use of the Windows NT, 95 or 98 operatingsystem in this paper.

1. Lotus Notes as a framework for intranet

In version 8 it is very easy to create web pages using SAS. It is more difficult to automaticallypublish this output in a structured way on an intranet for example. When using a Lotus Notesserver and aiming to publish static web pages, a Notes document can be created using theNotesDB access engine. The HTML page can then be attached. Generated HTML pages canbe made available in a structured way through an intranet.

Example: Publishing static reports on the intranetImagine that we have a data set with the amount of medicine prescribed by several doctors,sorted by kind of medicine. We want to publish this in table form and in a graph through anintranet. The graph is created by the following code:

Page 21: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

2

goptions device=gif transparency; /* Set the proper goptions */

filename odsout "d:\seugi"; /* Set the output destination */ods html body='graf.htm' /* Name the output file (NOTES requires .HTM as extension) */ base='http://190.1.1.54/sas/seugi/' /* Set the path where the WEB server can find the GIF-file (190.1.1.54/sas equals d:\) */ path=odsout newfile=output;

/* Create the chart */

PROCPROCPROCPROC GCHART DATA = seugi.graf_bio;

TITLE "SEUGI Graph";

label mdwha2='Doctor' dddst_g='Prescribed amount' abio='Item';

VBAR3D mdwha2 / FRAME SUMVAR = dddst_g SUBGROUP = abio MAXIS = axis1 AXIS = axis2 RAXIS = 0 to 5000 by 1000 LEGEND = LEGEND1 PATTERNID = SUBGROUP G100 DISCRETE AUTOREF CLIPREF SUM;

RUNRUNRUNRUN;QUITQUITQUITQUIT;

ods html close; /* close the output destination */

The following commands can be used to create two new Notes documents and to store themin a Notes database. The HTML pages with the graph and the table that were generated areattached to these documents.

FILENAME sasintra NOTESDB;

DATADATADATADATA _NULL_; FILE sasintra; PUT '!NSF_DB! d:\seugi\sasintra.nsf'; PUT "!NSF_ATTACH! d:\seugi\output\graf.htm"; PUT '!NSF_FORM! VERS00'; PUT "!NSF_FIELD!Titel!SEUGI Graph"; PUT '!NSF_FIELD!Status!Publiceren'; PUT "!NSF_FIELD!Jaar!2000"; PUT "!NSF_FIELD!Onderwerp!SEUGI"; PUT "!NSF_FIELD!Soort!Huisartshulp"; PUT "!NSF_FIELD!Subonderwerp!SEUGI"; PUT "!NSF_FIELD!Zorgverlener!SEUGI"; PUT "!NSF_FIELD!DocCode!SEUGI"; PUT "!NSF_FIELD!RapportUrl!/intranet/sasintra.nsf/DbCode/SEUGI/$file/graf.htm?OpenElement";RUNRUNRUNRUN;

DATADATADATADATA _NULL_; FILE sasintra; PUT '!NSF_DB! d:\seugi\sasintra.nsf'; PUT "!NSF_ATTACH! d:\seugi\output\table.htm"; PUT '!NSF_FORM! VERS00'; PUT "!NSF_FIELD!Titel!SEUGI Table"; PUT '!NSF_FIELD!Status!Publiceren'; PUT "!NSF_FIELD!Jaar!2000"; PUT "!NSF_FIELD!Onderwerp!SEUGI"; PUT "!NSF_FIELD!Soort!Huisartshulp"; PUT "!NSF_FIELD!Subonderwerp!SEUGI"; PUT "!NSF_FIELD!Zorgverlener!SEUGI"; PUT "!NSF_FIELD!DocCode!SEUGI2"; PUT "!NSF_FIELD!RapportUrl!/intranet/sasintra.nsf/DbCode/SEUGI2/$file/table.htm?OpenElement";RUNRUNRUNRUN;

First a file name reference is created which specifies that the NotesDB access engine is to beused. Then, the data is written to this file. The Notes database that is to be opened is specified.Then the HTML file that is to be attached is indicated. In this example, we use apredetermined Notes form (VERS00). Finally, the fields that belong to this form are filled in.It is important to note that the DocCode must be unique and must be specified in theRapportUrl.

Page 22: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

3

The result is as follows:

RequirementsTo use the NotesDB access engine it is necessary to specify the directory in which thenotes.ini and the notes.exe are found in your search path. This can be done in the controlpanel system. Go to environment and add a user variable ‘path’ with a value equal to thesystem variable path plus the extra directories. For example (for Windows NT)‘C:\WINNT\system32;C:\WINNT;k:\notes\data;c:\notes’. See for more information Walker,1997.

OZ applicationThe last few years OZ has used Lotus Notes as a framework for publishing managementinformation on our intranet. Mainframe extracts are periodically generated and processed intodenormalised data sets within the data warehouse. The data sets are the source of overviewsthat are generated by scheduled jobs and automatically published on our intranet.

2. Using Lotus Notes to e-mail SAS

Information in the data warehouse that is regularly requested by users, can be automaticallydistributed through e-mail in and outside the organisation. In this way, a lot of paper can beavoided and the distribution simplified. Likewise, electronic filing takes place automatically.

Example: sending E-mail from the DATA StepImagine that there is a data set “insured persons” which includes updates. This data, withassociated text, can be sent to the pharmacy clearing-house for example.

The following data set is used:

libname seugi 'd:\seugi';datadatadatadata seugi.seugi; input nr 1-1 naam $ 3-18 adres $ 19-40 woonplts $ 41-60; cards;1 Erwin van Dongen Bessie Smithstraat 13 Rotterdam2 Han Tanis Geldelozepad 76 Dordrecht3 Piet Jansen Dorpstraat 10 Breda4 Henk Pietersen Grote weg 89 Hendrik Ido Ambacht5 Jacqo Bos Langstraat 127 Middelburg;runrunrunrun;

Page 23: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

4

This data set can be sent through e-mail as follows:

FILENAME mymail EMAIL "Han Tanis/I en A/OZNotes" SUBJECT="Insurees at date &SYSDATE" ATTACH ="g:\users\dongen_e\seugi2.sd2";

DATADATADATADATA _NULL_; FILE mymail; PUT 'Dear Han,'; PUT ' '; PUT 'Hereby I send you the dataset with the current insured persons.'; PUT ' '; PUT 'Kind regards,'; PUT ' '; PUT ' '; PUT 'Erwin';RUNRUNRUNRUN;

RequirementsWhen using Lotus Notes as your e-mail facility the same requirements apply as mentionedearlier. Beside those options on the operating system de following statements must be addedto your config.sas.

" EMAILSYS VIM" EMAILID "your email ID"" EMAILPW your email password

The first option depends on what you are using for sending e-mail (for Lotus Notes VIM isthe correct setting). See the SAS companion for the Microsoft Windows Environment formore on this subject.

OZ applicationThere are many reports that are periodically sent from SAS. Many users receive informationweekly or monthly by e-mail. Usually it is SAS output that is attached to the e-mail. Otherusers receive Excel-files that are filled in by SAS so that they can further develop thespreadsheet. Finally, files are distributed weekly to external parties by e-mail. These filescontain information on persons who have started or cancelled their insurance that week. Thisinformation is organised in such a way that the receiver can automatically process thisinformation in his or her system.

3. Connecting SAS and Lotus Notes through ODBC

If the intranet (or internet) environment consists of several Notes databases, then it is possibleto have them communicate with SAS through a OBDC connection. Applications can becreated in this way which use a SAS data set that is accessed by Lotus Notes through ODBC.

Example: reading a SAS Data set using ODBCThis is illustrated by the situation in which an insured person’s policy number is filled in theHTML page and his name and address appear. In this example the SAS data set ‘seugi.seugi’from the previous section is used. In order to access this SAS data a PROC ODBC has to berun. By creating an ODBC data source which uses the SAS ODBC driver, SAS and the PROCODBC can be automatically started when called (through the macro %SASODBC). See formore information the SAS users Guide and Programming Reference.

The SAS data can be accessed in Lotus Notes using Lotus Script through ODBC. Thefollowing Lotus Script code is used:

Page 24: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

5

Sub Initialize ' Used objects

Dim WEBSession As New NotesSession Dim WEBDocument As NotesDocument Dim SASConnection As New ODBCConnection /* Define the connection object */ Dim Query As New ODBCQuery /* Define the query object */ Dim SASResult As New ODBCResultSet /* Define the result object */ Dim SQLStatement As String

' Initialize

Set WEBDocument = WEBSession.DocumentContext

WEBDocument.Message = "" WEBDocument.Name = ""

/* Define the SQL statement. Test is the defined libname in the ODBC data source. Seugi is the name of the dataset and nr is the name of the varaiable in the SAS-dataset that is used for the search (an index is recommended when using large datasets). KeyNumber is the name of the variable defined in the Web-page. */

SQLStatement$ = "SELECT * FROM test.seugi WHERE NR = '" & WEBDocument.KeyNumber( 0 ) & "'"

' Connect to SAS

If Not SASConnection.ConnectTo( "sasodbc" ) Then /* If there is no connection then give a message and quit. */

WEBDocument.Message = "No connection..." Goto ReturnToUser End If

Set Query.Connection = SASConnection /* Do the actual search */ Query.SQL = SQLStatement$ Set SASResult.Query = Query Call SASResult.Execute

' Show the result to the user

If SASResult.IsResultSetAvailable Then /* Retrieve the results of the query. */

SASResult.NextRow tmp = SASResult.GetValue( 2) WEBDocument.Name = tmp tmp = SASResult.GetValue( 3) WEBDocument.Address = tmp tmp = SASResult.GetValue( 4) WEBDocument.City = tmp Else

WEBDocument.Message = "No record found..." End If

' Disconnect from SAS

Call SASResult.Close Call SASConnection.Disconnect

' Save the Notes-document and return to the user

ReturnToUser:

Call WEBDocument.Save( True, True ) Print "[/seugi/SASInquiry.NSF/dbluid/" & WEBDocument.universalID & "?EditDocument]" /* Show de WEB-page with the result of the query. */End Sub

De Web pages belonging to this example appear as follows:

Page 25: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

6

OZ applicationOZ uses this functionality when health care providers consult the insured persons file. Thehealth care providers can check if the insured person is entitled to the health care.Furthermore, it is important that his billing file contains the correct data to avoid that it will beautomatically rejected by OZ. In addition to the possibility of checking if a policy number iscorrect, advanced search keys are provided to find the correct number. Momentarily, it ispossible to search on the basis of name/birth date, zip code/house number/birth date, and forhospitals their own patient number. Performance is good for all search keys because indexesare used.

4. Calling SAS programs in Lotus Notes

There is the possibility of letting Lotus Notes run a SAS program. This is a helpful tool forSAS programs in batch that many users are able to request without outside help. They are ableto specify certain parameters, according to their own information needs. Users are thus able toactivate SAS programs easily (with a browser) using parameters they specify themselves. Theresults can be shown on the intranet.

Example: running a SAS-program with parameters from Lotus NotesIn this example, a SAS data set, with the insured person’s number and the amount he hasdeclared, is used. The SAS program calculates the total amount that has been declared by theinsured person that has been specified. The output consists of a file with the name and addressof the insured person and the amount that he or she wants refunded.

The following Lotus Script calls the SAS program.

Sub Initialize

' ============================================= ' Start a SAS-program. ' =============================================

Dim WEBSession As New NotesSession Dim Document As NotesDocument

Set Document = WEBSession.DocumentContext

Parameters$ = "-SYSIN d:\seugi\applicatie.SAS -INITSTMT '%let a=" & Right$( Document.QUERY_STRING( 0 ), 1 ) & ";'"

RunStatus = Shell( "C:\SAS\SAS.EXE " & Parameters$ )

If Not ( RunStatus = 33 ) Then Print "Can't start SAS-program." Else Print "The SAS-program is started." End IfEnd Sub

With the Shell-command SAS can be started. By entering the program-name in the –SYSINoption en the %LET-statement in the –INITSTMT option (which may contain any SAS-codeto be run before the program) the program will run and the macrovariable &a is definedcorrectly.

Page 26: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

7

The following SAS program executes the tasks described above. The macro &a is the variablethat is provided when the program is started and provides the policy number of the insuredperson whose data we want to access.

libname seugi 'd:\seugi';procprocprocproc summary data=seugi.seugi2 (where=(nr eq &a)) nway; class nr; var bedrag; output out=hlp (drop=_type_ _freq_) sum=;runrunrunrun;

datadatadatadata hlp; merge hlp seugi.seugi; by nr;runrunrunrun;

filename txtout 'd:\seugi\output.txt';datadatadatadata _null_; set hlp; file txtout; put 'Summary of payed amounts' /; put 'Name:' @30 naam; put 'Adress:' @30 adres; put 'City:' @30 woonplaats; put 'Payed amount:' @30 bedrag;runrunrunrun;

The text file that is created by this program is collected by a Lotus Notes agent (macro) andpublished in HTML-format.

OZ ApplicationA large number of health care bills are paid through external integration. These files areuploaded by health care providers (through internet/extranet). The file is checked by SAS tosee if it corresponds to the accompanying information that is filled in during uploading. Thebilling file is then split into two files, one with correct data on insured persons and the otherwith incorrect data. A processing report is generated on the file with incorrect information.This report and the incorrect bills are published on the extranet or internet through LotusNotes. The health care provider receives feedback on his bill within an hour. He canimmediately download the incorrect bills to correct them.

Conclusion

We feel that combining the facilities of SAS and Lotus Notes offers the possibility of solvingmany business problems in a simple way. Storing output in a Notes database, that isaccessible through intranet, extranet and internet, and mailing specific output to a user leadsto less paper and automatic digital filing. Furthermore, accessing SAS data sets throughODBC offers the possibility of central storage that can be accessed through the intranet.Finally, running SAS programs from a Lotus Notes environment, in which a number ofparameters are specified, is a good solution when batch programs have to be accessible tomany users.

Page 27: Creating synergy by integrating SAS and Lotus Notes synergy by integrating SAS® and Lotus Notes ... (ODS in version 8 is far more easy ... Creating synergy by integrating SAS! and

8

References

Walker, Jamie (1997) Integrating Lotus Notes! with the SAS! system, SAS instituteIncorporated

SAS companion for the Microsoft Windows Environment, SAS OnlineDoc V8, SAS instituteIncorporated

SAS users Guide and Programming Reference, SAS OnlineDoc V8, SAS instituteIncorporated


Recommended