52
www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

Embed Size (px)

Citation preview

Page 1: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

WEB-ENABLINGlegacy NATURAL

using HTML with EntireX

Steven Price

Page 2: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

About Us

• Steven Price– Product Director NATURAL Engineer– SAG products since 1981

• GSL (Generation Systems Ltd) & Software AG– SAG Alliance Partner– Develop engineering solutions for Adabas & Natural

• Business– Software and data re-engineering

• Globally on-site and through services• Conversions (e.g. Report to Structured) and version upgrades

– Technical solutions• Adabas, Natural and other SAG products• HTML processing

Page 3: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Why Web-Enable?

• Services: On-line web-enabling services– NATURAL Engineer must execute on the web

• License: Add-on to NATURAL Engineer– web-enable your own applications on site in

your own time and with your own resources

Page 4: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Web-Enabling Approach

• Architecture– Implement using a flexible and future-proof architecture

suitable for most sites– Viable long-term web-enablement solution

• Resulting Web Applications– Must be maintainable

• Simple and understandable– Must be enhanceable within a flexible and user-friendly

structure– Reuse existing logic

• Logic must not be duplicated

• Automated process– Reduce time and resources– Maintain integrity and accuracy

Page 5: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Web-enabling Requirements

• Legacy application

• Support long transactions

• Application logic must be reused and not duplicated

• Enhance application with web-styling and functionality – no scraping

Page 6: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Resultant Approach

• Application gateway: EntireX

• Runtime objects– Create runtime objects for ease and simplicity

of implementation

• HTML page maintenance– by existing industry software

e.g. MS FrontPage

• NATURAL application maintenance– Limit application changes required

Page 7: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Conversion of NATURAL Engineer

• NEE works in both Mainframe and Windows environments– Most legacy code is on the mainframe– Mainframe: Structured– Windows: Graphical but dialogs

Mainframe

327032703270

World

Browser

Page 8: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment - Web

Web Environment NATURAL Environment

• How does NATURAL talk to the web?

User/s

HTTP://SERVER/

NEECGI.EXE/applicn

Web Server

IIS/Apache

• For a Browser, we need a web server

Page 9: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment- EntireX

• Use EntireX to communicate

Web Server NATURAL Session

EntireXBroker

Page 10: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment- Interface

• And have it interface

Web Server

NEE-CGI

NATURAL Session

NEE-WEB

(run-time)

EntireXBroker

Page 11: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment- Attach Manager

EntireXBroker

NEE-ATM(Attach Manager)

• Long transactions– Holding database records over pages

Page 12: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment- HTML

• HTML pages

HTMLTemplates

Web Server

NEE-CGI

Page 13: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Environment Summary- NATURAL Engineer Web Environment

Web Environment NATURAL Environment

User/s

HTTP://SERVER/

NEECGI.EXE/applicn

HTMLTemplates

Web Server

IIS/Apache

NEE-CGI

NATURAL Session

NEE-WEB

(run-time)

UserApplicn

NATURAL Session

NEE-WEB

(run-time)

UserApplicn

NATURAL Session

NEE-WEB

(run-time)

UserApplicn

EntireXBroker

NEE-ATM(Attach Manager)

Page 14: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

The Process

• Generate HTML pages for NATURAL presentation– Automatic generation from MAP or other

presentation statements

• Create new subprogram per presentation– EntireX commands

• Modify application for web execution– as a long transaction - minimal changes– Insert CALLNAT to new subprogram HTML

Page 15: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

The Process- Generate HTML

• HTML– INPUT– MAP– WRITE…– DISPLAY

• Create HTML page– Insert environment code– Insert text and data items to HTML standard

Map

HTML

Page 16: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 17: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 18: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 19: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

The Process- Create Subprogram

• For each presentation statement, generate a subprogram for HTML support

• Does the following:– Receives all presentation data– Formats the EntireX buffer– Calls EntireX– Puts data back into PDA variables for return to

calling object

XMLData View

• Transfer to the web server– via XML format in EntireX buffer

Page 20: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 21: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 22: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 23: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

The Process- Modify Application

• Modify application for Web– Insert code into application to access browser

• CALLNAT inserted when an HTML reference is located

– Note use of *CONVID• NULL except when execution is via EntireX

XX001P01 XX001P01

(HTML)

Page 24: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 25: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 26: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements

INPUT/MAP

REINPUT

*PF-KEY

WRITE/DISPLAY

Page 27: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- INPUT/MAP

• Static HTML page

• Literals copied to HTML

• Data items placed for run-time amalgamation

NATURALSubprogram

HTMLTemplate

XMLData

HTML

NATURALMap

OriginalObject

Page 28: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 29: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- REINPUT

• Acts like a GOTO statement

• How do you replicate control for web-processing?– Copy text in REINPUT into HTML field– Set flag to bypass next INPUT statement– Execute REINPUT statement

Bypass next INPUT

Page 30: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 31: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- *PF-KEY

• *PF-KEY system variable must be modified– Runtime library function– Move web contents of NEEPFKEY into *PF-KEY

system variable

NATURAL*PF-KEY=‘ ‘ HTML PF1

NATURAL*PF-KEY=‘PF1’

Move to system variable

Page 32: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- WRITE/DISPLAY

• Report/listing output

• More complex than static HTML presentation

• Potential for lots of data to be sent which has to be inserted into the page

• Requires an HTML method to support variable data – receiving lines of data

• Additional run-time logic required

Page 33: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- WRITE/DISPLAY (cont.)

• Modify more than WRITE and DISPLAY statements– Write

– Write Title/Trailer

– Display

– At Top of Page

– At End of Page

– Newpage

• The HTML must support all the complex logic

HTML

Page 34: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- WRITE/DISPLAY (cont.)

• HTML page– Create a table– Insert data item titles– Insert data items with group names– Write Title/At Top Of Page– outside table at top

– Write Trailer/At End Of Page– outside table at bottom

– Runtime component to merge static tables and line data into final HTML

HTML

Page 35: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 36: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 37: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Statements- WRITE/DISPLAY (cont.)

• Subprogram– Use EntireX “SENDHOLD” instead of

‘CONVERSE’ (MAP)

• Original Object– Insert At-End-Of-Page logic to support HTML

‘CONVERSE’ via EntireX

Page 38: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 39: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 40: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Web Execution Process

Walkthrough…

Page 41: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

• Invoke HTML on server– HTTP://www.gensystems.com/NEE/NEELOGON.HTML

Page 42: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

• CGI script invoked– Userid & Password validated by NATURAL

Security

Page 43: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

• EntireX called for selected application– e.g. HOSPITAL

• Attach Manager called to start a new NATURAL session– Start-up program invoked

• HTML subprogram executed

Web Execution Process

Page 44: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Web Execution Process

• Runtime data placed in EntireX buffer in XML format

• EntireX Broker called– Broker passes data to CGI Script

• CGI Script– locates name of HTML template for buffer– merges HTML template and runtime data– sends HTML to Browser screen

Page 45: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Page 46: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

NATURAL Engineer’sWeb-enabling Process

NaturalEngineer

Repository

NaturalApplication Load

Extract ImpactAnalysis Modification

HTMLScreenHTMLScreenHTML

Application

Page 47: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

NEE’s Web-enabling Process- Impact Analysis

• Process Inputs (Search for inputs)

• Process Object-Builder keyword

• Generate line ranges for objects

• Process line ranges for subroutines

• Object-Builder Impact Analysis for HTML

NaturalEngineer

Repository

NaturalApplication Load

Extract ImpactAnalysis Modification

HTMLScreenHTMLScreenHTML

Application

Page 48: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Web Enhancements

• Graphical tools to improve/modify static HTML– e.g. MS FrontPage– Colour, fonts, graphics, etc

• Insert direct link to bypass HTML pages– Avoid sub-menus by direct link from margin– e.g. Hospital application left margin has ‘Add a Patient’

• Insert URL link directly for the HTML page to execute other transactions– e.g. NEEWEB application – view source code for object

in another Browser window

HTML

Page 49: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

NATURAL Engineer- New Developments

• XML using Tamino

• Short and long transaction interaction

Page 50: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Summary Advantages(1 of 2)

• Benefits to your Natural Applications– Reuses existing presentation layout– No change to existing business, processing and

database logic– Creates only one new subprogram per presentation– Applies minimal and auditable changes– Flexible EntireX Broker based architecture

– best use of existing applications– added benefits of a web environment

Page 51: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Summary Advantages(2 of 2)

• Benefits of HTML and XML– Automatically generates HTML pages– Maintain HTML pages with standard editing tools such as MS

FrontPage– HTML display may be modified to:

– improve user interface and use templates– include direct links to application functions

– XML data format transfer between NATURAL and HTML– available for further interfaces

• Communication with EntireX Broker– No software on client PC - ‘zero footprint’– Effective mainframe communications and excellent speed of

execution

Page 52: Www.gensystems.com WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price

ww

w.gensystem

s.com

Demonstration

• Test System: show web-functionality– Execute application and show functions

• NEE: On the web– Web-enable simple system to show process