Upload
tabitha-dumbleton
View
218
Download
0
Embed Size (px)
Citation preview
ww
w.gensystem
s.com
WEB-ENABLINGlegacy 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
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
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
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
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
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
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
ww
w.gensystem
s.com
Environment- EntireX
• Use EntireX to communicate
Web Server NATURAL Session
EntireXBroker
ww
w.gensystem
s.com
Environment- Interface
• And have it interface
Web Server
NEE-CGI
NATURAL Session
NEE-WEB
(run-time)
EntireXBroker
ww
w.gensystem
s.com
Environment- Attach Manager
EntireXBroker
NEE-ATM(Attach Manager)
• Long transactions– Holding database records over pages
ww
w.gensystem
s.com
Environment- HTML
• HTML pages
HTMLTemplates
Web Server
NEE-CGI
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)
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
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
ww
w.gensystem
s.com
ww
w.gensystem
s.com
ww
w.gensystem
s.com
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
ww
w.gensystem
s.com
ww
w.gensystem
s.com
ww
w.gensystem
s.com
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)
ww
w.gensystem
s.com
ww
w.gensystem
s.com
ww
w.gensystem
s.com
Statements
INPUT/MAP
REINPUT
*PF-KEY
WRITE/DISPLAY
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
ww
w.gensystem
s.com
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
ww
w.gensystem
s.com
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
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
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
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
ww
w.gensystem
s.com
ww
w.gensystem
s.com
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
ww
w.gensystem
s.com
ww
w.gensystem
s.com
ww
w.gensystem
s.com
Web Execution Process
Walkthrough…
ww
w.gensystem
s.com
• Invoke HTML on server– HTTP://www.gensystems.com/NEE/NEELOGON.HTML
ww
w.gensystem
s.com
• CGI script invoked– Userid & Password validated by NATURAL
Security
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
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
ww
w.gensystem
s.com
ww
w.gensystem
s.com
NATURAL Engineer’sWeb-enabling Process
NaturalEngineer
Repository
NaturalApplication Load
Extract ImpactAnalysis Modification
HTMLScreenHTMLScreenHTML
Application
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
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
ww
w.gensystem
s.com
NATURAL Engineer- New Developments
• XML using Tamino
• Short and long transaction interaction
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
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
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