A natural extension using the com plete http server for web enablement
This presentation is the property of its rightful owner.
Sponsored Links
1 / 67

A Natural Extension: Using the Com-plete HTTP Server for Web-Enablement PowerPoint PPT Presentation


  • 97 Views
  • Uploaded on
  • Presentation posted in: General

A Natural Extension: Using the Com-plete HTTP Server for Web-Enablement. David Wimberly Project/Program Director, University of Arkansas [email protected] Presentation Overview. The Com-plete HTTP server A Natural tool for web enablement Web-Enablement at the University of Arkansas

Download Presentation

A Natural Extension: Using the Com-plete HTTP Server for Web-Enablement

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


A natural extension using the com plete http server for web enablement

A Natural Extension:Using the Com-plete HTTP Server for Web-Enablement

David Wimberly

Project/Program Director, University of Arkansas

[email protected]


Presentation overview

Presentation Overview

  • The Com-plete HTTP server

    • A Natural tool for web enablement

  • Web-Enablement at the University of Arkansas

    • Enhancing existing applications with web technologies

  • Implementation considerations

    • Tips and techniques

    • Examples


The com plete http server

The Com-plete HTTP Server

  • A Natural tool for web-enablement

    • Com-plete 6.1 architecture

    • Natural and the HTTP server

    • Natural programmer’s view

    • System view

    • Advantages of this native MVS web and application server


Com plete 6 1 architecture

VTAM

Inter-

face

CGI

applications

Product X

Utili

ties

Spool

Telnet

Natural

HTTP

HLLI

Posix

RTS

Com-plete 6.1 Architecture


Natural and the http server

CGI

applications

Natural

HTTP

HLLI

Posix

RTS

Natural and the HTTP Server


Natural programmer s view

Natural Programmer’s View

  • Simple CALL interface

** Read user input from the web

CALL ‘HAANUPR’

#CGI-STATUS /* Return code and reason code

#CGI-ACTION /* GET-DATA or PUT-DATA

#FIELD-NAME /* HTML form field name

#FIELD-VALUE /* User input value

#FIELD-LENGTH /* Length anticipated/returned

SEPARATE…

FIND EMPLOYEE WITH…


System view

System View

  • Natural programs:

    • Run in the buffer pool

    • Access ADABAS and other resources

    • Call external module HAANUPR

      • To read HTML form inputs and controls (GET or POST)

      • To send dynamically generated HTML to the browser

  • Configuration parameters for default user ID, library, buffer sizes, etc.

  • Automatic EBCDIC/ASCII translations and url encoding/decoding


Native mvs web and application server

Com-plete v6.1

Natural

HLLI

Posix

TCP/IP

ESX

TCP/IP

ADABAS

Natural

CGI interface

(HAANUPR)

HTTP

Operating System

Native MVS Web and Application Server


Web enablement with the com plete http server

Web-Enablement with the Com-plete HTTP Server

  • Enhancing existing applications with web technologies

    • Objectives

    • Background

    • Web session examples


U of a s objectives

U of A’s Objectives

  • To enhance and extend our mainframe applications

    • Reach new audiences

      • Employees and vendors

    • Enhance the presentation of information

      • Consolidate information and dress it up

    • Simplify access for infrequent users

  • Not to replace all or even most 3270 functions

  • Not to literally move a 3270 application to the web


U of a background

U of A Background

  • Natural and ADABAS mainframe shop since 1986

  • BASIS: Business & Administrative Strategic Information Systems

    • Custom inhouse developed applications

    • Everything but student systems

  • Separate groups doing Java web development and screen scraping web deployment

    • Preference for Natural application code

  • Timing was right for the Com-plete HTTP Server


Logon

Logon


A natural extension using the com plete http server for web enablement

Menu


Browse po selection screen

Browse PO selection screen


Help for date close anticipated

Help for Date-Close-Anticipated


Help for po status selection

Help for PO status, selection


Help for po status window

Help for PO status, window


Po status returned

PO status returned


Budgetary unit help

Budgetary Unit help


Bu help search

BU help search


Browse po for status and bu by date

Browse PO for Status and BU by Date


Browse result and po selection

Browse result and PO selection


View of po top

View of PO, top


View of po bottom

View of PO, bottom


Select a po to browse invoices for po

Select a PO to Browse Invoices for PO


Browse invoices for po

Browse Invoices for PO


View invoice

View Invoice


Select a po to e mail

Select a PO to e-mail


E mail the po

E-mail the PO


Po list vendor help

PO list, vendor help


Vendor name search

Vendor name search


Select vendor

Select vendor


Po search by vendor and date initiated

PO search by vendor and date, initiated


Po search by vendor and date results

PO search by vendor and date, results


Main menu select pay activity

Main menu, select pay activity


Browse pay activity

Browse pay activity


View earnings statement

View earnings statement


Main menu select addresses

Main menu, select addresses


3270 addresses etc equivalent

3270 Addresses, etc. equivalent


Addresses etc

Addresses, etc


Enter changes view errors and previous values

Enter changes, view errors and previous values


Correct errors and update

Correct errors and update


Update confirmation screen

Update confirmation screen


Logoff screen

Logoff screen


Implementation considerations

Implementation Considerations

  • How to maintain state

  • Back button

  • Back button vs Return

  • Data security

  • Configuration

  • Essential JavaScript

  • Techniques for generating HTML

  • Coding tips, debugging tips, and more

  • Example HTML and Natural code


How to maintain state

How to Maintain State

  • The web is stateless

    • Each interaction (submission) is self contained

    • No provision for a continuous user session

  • To maintain state

    • Use conversational mode, or

    • Create a session ID (*TIMESTMP)

      • Place it on the form as a hidden field

      • Save and restore user session information using ADABAS


Back button

Back Button

  • Can subvert your state information

    • User reappears not from where you left him

  • We considered

    • Disabling it

    • Running in a window without the toolbar or menubar

    • Issuing errors if they used it

  • Limit the state information you maintain

    • Not the active position within a READ loop

    • Instead, hide the first and last ISN on a page

  • Have one entry point -- a dispatcher program

    • action=“uwowdis”


Back button vs return

Back Button vs Return

Browse A objects at level 1

Browse B objects at level 2

Browse C objects at level 3

As

1 - 10

Bs

1 - 10

Cs

1 - 10

Object selection or Paging

Cs

11 - 20

Bs

11 - 20

Back button

Return

Bs

21 - 30


How to return

How to Return

  • Save program hierarchy information in hidden fields

  • Our browse functions stack for each level:

    • Program ID

    • Search type in effect

    • ISN and MU/PE occurrence of first record on the screen

    • Whether page back was valid

  • A Return

    • Pops one of these from the stack

    • Executes the program and re-initiates the browse


Data security

Data Security

  • Sensitive data requires encryption

    • Com-plete HTTP server does not do SSL

    • Proxy server introduced to do all encryption and decryption

  • To avoid mixing document types and client side warnings

    • Style sheets and graphics are delivered from a separate web server using HTTPS


U of a s environment

U of A’s Environment

HTTPS

HTTP

Proxy Server for SSL encryption

IBM OS/390 running ADABAS, Natural, and Com-plete 6.1

Client with SSL enabled Web Browser

Web Server for *.gif and *.css files


Com plete http server configuration

Com-plete HTTP Server Configuration

  • HAANCONF

    • SERVPOOL=YES

      • Uses a shared logon or session

    • NATLIB=default library

      • Natural CGI programs in other libraries require an implicit logon

    • HTTPUSER=default user ID

  • URL processing user exit

    • Restrict access to specific hosts or domains


Essential javascript

Essential JavaScript

  • Cursor placement

  • Selection processing and linking to different services

    • Set hidden form element to selected value

    • Submit form

  • Window management

    • Open and Close windows

    • Pass and return values


Techniques for generating html

Techniques for Generating HTML

  • Output your HTML to the Source Work Area

    • Use Natural ISPF macros

      • But macros cannot be invoked directly as a Natural CGI program

    • Use Natural

      DEFINE PRINTER (1) OUTPUT 'SOURCE'

      FORMAT (1) PS=0 LS=133

      EJECT OFF (1)

      SET CONTROL 'Z‘

      WRITE (1) NOTITLE …

  • Send the generated HTML to the browser

    • HNANCGIP is provided, but limited to 72 character lines

    • Create your own using longer lines via the USR1035N interface


Coding tips

Coding Tips

  • Develop an architecture and generate your Natural CGI programs using Natural ISPF macros

    • Fast delivery of new functions

    • Consistent

    • Easy to implement changes -- REGEN

  • To simplify making changes in page appearance

    • Use copy code, subprograms, constants defined in an LDA, and an external style sheet

  • HTML form fields can have dashes, but javascript cannot reference them

    • Translate them to under-scores


Haanupr tips

HAANUPR Tips

  • Field names

    • Must end with a blank character

  • Field values

    • Are not blank filled, reset them before your CALL

  • Field length

    • Passed in: the largest value you will receive

    • Returned: the actual size of the field entered

      CALL ‘HAANUPR’

      #CGI-STATUS /* Return and reason code

      #CGI-ACTION /* GET-DATA or PUT-DATA

      #FIELD-NAME /* HTML form field name

      #FIELD-VALUE /* User input value

      #FIELD-LENGTH /* Length anticipated/returned


Debugging tips

Debugging Tips

  • You can’t sprinkle WRITEs into your code

  • You can’t run the Natural debugger

  • Trap and log errors on a data base file

    • Note: *ERROR-TA always starts as HNANERR and can only be changed by an assignment statement

  • Output your debugging information with your web page using HTML

    • This may mean holding information until you reach the page <body>


Code reuse

Code Reuse

  • Develop a Natural subprogram to output the core HTML document for an object (Purchase Order, Earnings Statement, etc.)

    • Call from your Com-plete web application (Natural CGI program)

    • Call from online 3270 session to generate an HTML e-mail attachment

      • Read the source work area and send to SMTP using ESS’ PROCESS WRITE-SPOOL

    • Call from batch to generate an HTML e-mail attachment


Html for uwomenu part 1

HTML for UWOMENU, part 1


Html for uwomenu part 2

HTML for UWOMENU, part 2


Natural code uwcsbh

Natural code, UWCSBH


Natural code output action

Natural code, output Action


Natural code output table of services

Natural code, output table of Services


Natural code read html form fields

Natural code, read HTML form fields


Enhancement proposal 958

Enhancement Proposal 958

  • Efficient browsing of ADABAS data (no wasted I/O)

    • Forward or backward (descending)

    • Possible due to STARTING WITH ISN

    • Regular descriptors

    • MU type descriptors

    • Unique PE type descriptors

  • It is not possible with non-unique PE type descriptors!

  • Vote for FIND DESCENDING, enhancement proposal 958


Presentation review

Presentation Review

  • The Com-plete HTTP server

    • A great run time environment for Natural, and now an enabler for Natural based web applications

  • Web-Enablement at the University of Arkansas

    • Examples of what can be done with the Com-plete HTTP server

  • Implementation considerations

    • Tips and examples from the University of Arkansas


Thank you

Thank You!


  • Login