southampton university computing services implementing web data access using sirweb.cgi by dave...

20
Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Upload: candice-bryan

Post on 30-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Implementing Web data access using sirweb.cgi

By

Dave Doulton

University of Southampton

Page 2: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Agenda

• Install SIR2000.

• Install PWS.

• Copy files from SIR2000 to PWS.

• Demonstrate web access.

• Demonstrate General Purpose Web Access

• Summary

Page 3: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Install SIR2000

• Run Setup.exe.

• Install licence file.

• Add SIR2000 to path in autoexec.bat.

Page 4: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Install Personal Web Server -1

• Run setup.exe in either

• c:\windows\options\cabs\pws

• or

• \add-ons\pws on Windows 98 CD

Page 5: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Install Personal Web Server -2

• Choose typical install

• Leave default directory as suggested.

• Install

• Reboot system

Page 6: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Install Personal Web Server -3

• If mstdcw causes a fault on reboot

• run msconfig from run button

• choose startup tab

• unclick entry MSTDC mstdcw -start

• restart machine

Page 7: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Copy files from SIR2000 to PWS.

• Copy sirweb.cgi from SIR2000 directory to c:\inetpub\wwwroot\cgi-bin

• Copy red.gif from SIR2000\images toc:\inetpub\wwwroot\images

• Copy your html and your pql files to c:\inetpub\wwwroot

Page 8: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 1

• Click on publish icon, check server running.

• Start web browser

• enter http://localhost/cgi-bin/sirweb.cgi?sirapp=sysproc.cgi.go&sirmem=Run&sirtxt=descrip

• localhost can be machine’s name

Page 9: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 2

• More friendly to make a form and allow to choose what to run.

• Using simple HTML

Page 10: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 3

<html><head><title>SIR demo </title></head><body><form action="/cgi-bin/sirweb.cgi" method="post"> <input type="hidden" name="sirmem" value="Run"> <input type="hidden" name="sirapp" value="sysproc.cgi.go"> <select name="sirtxt" size="1"> <option value="fcache">flush cache</option> <option value="default">default</option> <option value="stdout">stdout</option> <option value="hello">hello</option> <option value="call">call</option> <option value="menupic">welcome picture</option> <option value="splash">splash</option> <option value="runfile">run file</option> <option selected value="descrip">descriptive</option> <option value="entry">data entry</option> <option value="report1">report</option> <option value="freport">full report</option> <option value="table1">table</option> <option value="tables">tables</option> <option>excel</option> <option value="spss">spss</option> </select> <p>File to execute <input type="text" size="20" name="RUNFILE"> </p> <p><input type="submit" value="submit"> </p></form></body></html>

Page 11: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 4

• Most useful option is sysproc.cgi.runfile

• uses parameter RUNFILE to specify source PQL

call sysproc.tools.htmlcodeprogramwrite(cgi)'<h3> <sirver> <date>

<time> </h3>'end program

Page 12: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 5

• Simple form to run file<html><head><title>Run SIR PQL </title></head><body><form action="/cgi-bin/sirweb.cgi" method="post"> <input type="hidden" name="sirapp"

value="sysproc.cgi.runfile"> File to execute <input type="text" size="20"

name="RUNFILE"> <input type="submit" value="submit"> </form></body></html>

Page 13: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 6

• You can have a form that does not look like a form and always does the same thing

<HTML><HEAD><TITLE>Run Descriptive </TITLE></HEAD><BODY><A HREF="javascript:document.forms[0].submit()">run

desciptive</A><BR> <form name=descrip method=post action="/cgi-bin/sirweb.cgi"><input type=hidden name=sirapp value=sysproc.cgi.go><input type=hidden name=sirmem value="Run"><input type=hidden name=sirtxt value="descrip"></form></BODY></HTML>

Page 14: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Demonstrate web access - 7

• Source of descripRETRIEVALPROCESS CASES ALL. PROCESS REC EMPLOYEE. GET VARS CURRPOS. PERFORM PROCS. END PROCESS RECEND PROCESS CASESDESCRIPTIVE VARIABLE=CURRPOS / FILENAME=CGI/END RETRIEVAL

Page 15: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

ServicesDemonstrate General Purpose Web Access -1

• Based around idea from data sysproc.cgi.entry

• Has two versions show and update based on hidden value on form

• DB_WR=yes means update

• anything else just show

Page 16: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

ServicesDemonstrate General Purpose Web Access -2<HTML><HEAD><TITLE>General Purpose SIR2000 Database Access Forms </TITLE></HEAD><BODY><form method=post action="/cgi-bin/sirweb.cgi"><table><tr><th>Database Name</th><td><input type=text name=DB_DB></td></tr><tr><th>Password </th><td><input type=password name=DB_PW></td></tr><tr><th>Read Security</th><td><input type=password name=DB_RS></td></tr><tr><th>Write security</th><td><input type=password name=DB_WS></td></tr><tr><th>Database Prefix</th><td><input type=text name=DB_P></td></tr><tr><th>Database Master</th><td><input type=text name=DB_MS></td></tr></table><input type=submit value=Go><input type=hidden name=sirapp value=sysproc.cgi.runfile><input type=hidden name=RUNFILE value="edit.pql"><input type=hidden name=DB_WR value="yes"></form></BODY></HTML>

Page 17: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

ServicesDemonstrate General Purpose Web Access -3<HTML><HEAD><TITLE>General Purpose SIR2000 Database Access Forms </TITLE></HEAD><BODY><form method=post action="/cgi-bin/sirweb.cgi"><table><tr><th>Database Name</th><td><input type=text

name=DB_DB></td></tr><tr><th>Password </th><td><input type=password name=DB_PW></td></tr><tr><th>Read Security</th><td><input type=password

name=DB_RS></td></tr><tr><th>Write security</th><td><input type=password

name=DB_WS></td></tr><tr><th>Database Prefix</th><td><input type=text name=DB_P></td></tr></table><input type=submit value=Go><input type=hidden name=sirapp value=sysproc.cgi.runfile><input type=hidden name=RUNFILE value="edit.pql"></form></BODY></HTML>

Page 18: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Summary - 1

• Install SIR2000

• Install PWS

• Set up files

• Test forms

Page 19: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

Summary - 2

• Check security

• Be careful with sirweb.isa

• Check sysproc.cgi.runfile for source of files

• Make site available

Page 20: Southampton University Computing Services Implementing Web data access using sirweb.cgi By Dave Doulton University of Southampton

Southampton UniversityComputing

Services

The End

• End of presentation

• Any Questions?