OpenVMS Source Code Demos

DCL_Apache_Read_HTML_demo.com

$!=======================================
$! title  : transaction_log_viewer.com
$! author : Neil Rieck
$! created: 2003-08-21
$!=======================================
$ set noon					! don't stop
$ say :== write sys$output
$ debug = 0					! enable to debug
$ if debug .eq. 1
$ then
$	say "Status: 200"			! start of HTTP header
$	say "Content-Type: text/plain"		!
$	say ""                                  !
$	say ""					! end of HTTP header
$	set verify				!
$ endif
$!
$!~~~   temps = "''WWW_REQUEST_METHOD'"		! purveyor method
$!~~~   temps = "''REQUEST_METHOD'"		! apache method (using default settings)
$ run csmis$exe:read_html_apache.exe		! this app creates DCL symbols (and sets $status to 1 if ok)
$ my_status = $STATUS				!
$ if ((my_status .and. 1) .ne. 1)		! oops, some kind of error
$ then
$	say "Status: 500"			! start of HTTP header
$	say "Content-Type: text/plain"		!
$	say ""                                  !
$	say ""					! end of HTTP header
$       say "error: ",my_status			!
$ else						!
$	run csmis$exe:transaction_log_viewer.exe ! this program outputs a webpage
$ endif						!
$ if debug .eq. 1				!
$ then
$	say "***** symbols/local *****"
$	sho sym/local   *
$	say "***** symbols/global *****"
$	sho sym/global  *
$ endif
$ exit                                          !
$!=================================================================


Back to OpenVMS
Back to Home
Neil Rieck
Kitchener - Waterloo - Cambridge, Ontario, Canada.