WEB-ENABLING legacy NATURAL using HTML with EntireX Steven Price
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
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
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
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
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
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 3270 World Browser
Environment - Web Web EnvironmentNATURAL Environment How does NATURAL talk to the web? User/s NEECGI.EXE/applicn Web Server IIS/ Apache For a Browser, we need a web server
Environment - EntireX Use EntireX to communicate Web Server NATURAL Session EntireX Broker
Environment - Interface And have it interface Web Server NEE- CGI NATURAL Session NEE- WEB (run- time) EntireX Broker
Environment - Attach Manager EntireX Broker NEE-ATM (Attach Manager) Long transactions –Holding database records over pages
Environment - HTML HTML pages HTML Templates Web Server NEE- CGI
Environment Summary - NATURAL Engineer Web Environment Web EnvironmentNATURAL Environment User/s NEECGI.EXE/applicn HTML Templates Web Server IIS/ Apache NEE- CGI NATURAL Session NEE- WEB (run- time) User Applicn NATURAL Session NEE- WEB (run- time) User Applicn NATURAL Session NEE- WEB (run- time) User Applicn EntireX Broker NEE-ATM (Attach Manager)
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
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
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 XML Data View Transfer to the web server –via XML format in EntireX buffer
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 (HTML)
Statements INPUT/MAP REINPUT *PF-KEY WRITE/DISPLAY
Statements - INPUT/MAP Static HTML page Literals copied to HTML Data items placed for run-time amalgamation NATURAL Subprogram HTML Template XML Data HTML NATURAL Map Original Object
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
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
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
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
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
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
Web Execution Process Walkthrough…
Invoke HTML on server –
CGI script invoked –Userid & Password validated by NATURAL Security
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
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
NATURAL Engineer’s Web-enabling Process Natural Engineer Repository Natural Application Load Extract Impact Analysis Modification HTML Screen HTML Screen HTML Application
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 Natural Engineer Repository Natural Application Load Extract Impact Analysis Modification HTML Screen HTML Screen HTML Application
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
NATURAL Engineer - New Developments XML using Tamino Short and long transaction interaction
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
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
Demonstration Test System: show web-functionality –Execute application and show functions NEE: On the web –Web-enable simple system to show process