You are previewing Transitioning: Informix 4GL to Enterprise Generation Language (EGL).
O'Reilly logo
Transitioning: Informix 4GL to Enterprise Generation Language (EGL)

Book Description

In this IBM Redbooks publication, we describe how Informix customers can upgrade their 4GL application development environment to the Rational Software Development platform, and, more specifically, transition to the Rational Enterprise Generation Language (EGL).

EGL provides just the right balance of simplicity and flexibility, and enables application developers to focus on solving business problems rather than expending time and energy on technology.

For example, Informix 4GL developers who are unfamiliar with Java can use EGL to quickly build data-driven Web applications and business logic. They can then write and debug their applications in EGL, and the Java code will be generated for them. So they can then build dynamic Web applications without having to learn the Java language. This provides significant advantages, enabling clients to minimize application development time and resource requirements.

We give you an overview of EGL, its concepts and operations, and walk you through a step-by-step tutorial to develop an simple Web application. Included is an overview of the 4GL to EGL migration process and a sample application migration. You will be alerted to potential migration issues, and given the information to resolve them.

We also include guidance for working with special database behavior and requirements, JasperReports, and a number of advanced EGL topics for developing robust and individualized applications.

Table of Contents

  1. Notices
    1. Trademarks
  2. Preface
    1. The team that wrote this redbook
    2. Become a published author
    3. Comments welcome
  3. Part 1: Introduction and overview
    1. Chapter 1: Introduction
      1. Contents abstract
      2. IBM Enterprise Generation Language (EGL)
    2. Chapter 2: IBM Informix 4GL
      1. History of IBM Informix 4GL
        1. Informix SQL (ISQL)
        2. ISQL and IBM Informix 4GL
        3. Time lines
      2. IBM Informix 4GL source code review
        1. 4GL form files
        2. 4GL program types
        3. 4GL data entry screen form program
        4. Thematic review of 4GL screen form program
        5. Code review: 4GL data entry screen form program
        6. Code review: lessons learned
        7. 4GL report program
        8. Thematic review of the 4GL report program
        9. Code review: 4GL report program
        10. Code review: lessons learned
    3. Chapter 3: Rational Software Development Platform
      1. Top down IBM
        1. IBM and the Rational brand
        2. EGL integration
        3. IBM EGL value proposition
        4. Who uses IBM EGL?
        5. History of EGL
      2. Summary of IBM EGL tooling
    4. Chapter 4: Installing and configuring RAD
      1. System requirements
      2. RAD 6.0 installation
        1. Installing RAD from an electronic image
        2. Install from the CD-ROM
      3. RAD interim fix installation
        1. Installation prerequisites
        2. Online interim fix installation
        3. Offline interim fix installation
        4. Offline multiple interim fix installation
      4. 4GL to EGL conversion tool installation
        1. Online 4GL to EGL CT installation
        2. Offline 4GL to EGL CT installation
        3. Offline RPU installation
      5. IBM Informix JDBC™ driver installation
        1. Installing IBM Informix JDBC driver in graphical mode
        2. Installing IBM Informix JDBC driver in console mode
        3. Installing IBM Informix JDBC driver in silent mode
    5. Chapter 5: Redbook 4GL reference application
      1. The Stores demo database
      2. The 4GL forms in reference application
      3. The 4GL modules in a reference application
      4. Remaining reference application files
  4. Part 2: EGL basics and a simple EGL Web application
    1. Chapter 6: Introduction to IBM EGL
      1. IBM EGL Projects
      2. IBM EGL packages, folders, and files
      3. EGL parts
      4. Other EGL language elements
    2. Chapter 7: EGL language concepts
      1. Prerequisites for this chapter
      2. Setup to run the code in this chapter
        1. Creating a new EGL (non-Web) Project
        2. Creating EGL Packages
        3. Adding an EGL Data Parts
        4. Adding an EGL Program to our EGL Project
        5. Generating, compiling, and running our EGL Program
        6. Configuring our program to include JDBC client libraries
      3. Sample EGL character based data entry screen
        1. Demonstration of sample character based program
        2. Contents of the sample character based program
    3. Chapter 8: The EGL build environment
      1. The code generation process: the big picture
        1. Source development
        2. Generate
        3. Build or compile
      2. EGL build descriptor files
        1. Build descriptor options
      3. Project properties
        1. Accessing project properties
        2. EGL Build Path
        3. EGL Default Build Descriptor
        4. Java Build Path
      4. Generate and build in the IDE
      5. Summary
    4. Chapter 9: Simple Web application setup
      1. Prerequisites
      2. How this chapter is organized
      3. Setup tasks: Part 1
        1. Launching Rational SDP
        2. Default workspace
        3. Dismissing the Welcome screen
        4. Rational SDP main screen
        5. Instructing Rational SDP about our role
        6. Creating an IBM EGL Web Project
        7. Configuring application server: adding our EGL Web Project
        8. Setting the path to Informix JDBC client libraries on the application server
        9. Adding an authentication alias to the application server
        10. Adding a data source to the application server
      4. Checkpoint
      5. Setup tasks part 2
        1. Setting up the JDBC data source for use by the EGL compiler
        2. Creating Data Parts
        3. A sub-task to create a database connection resource
        4. Returning to the Data Parts creation task
        5. Results of the Data Parts Wizard
        6. EGL statements Library: Package, Import, and Use
        7. Creating our own EGL Package and Library
      6. Final checkpoint
      7. Alternate means to create JDBC data source
    5. Chapter 10: Simple Web application
      1. Prerequisites
      2. Demonstration of a simple business application
        1. Display of our sample list page
        2. Display of our sample detail page
      3. Creating the Simple Web application: JSP page 1
        1. New Faces JSP file
        2. Specifying a page template
        3. Working static Faces JSP page
        4. Working with properties
        5. Viewing a served page
        6. Viewing a served page with other Web browsers
        7. Managing the embedded Mozilla Web browser
        8. Preparing to alter a page from static to dynamic content
        9. Creating Page Data variables
        10. Placing Page Data variables on the page
        11. Accessing the associated Page Handler
        12. Running the page with dynamic content
        13. Alternate or preferred syntax for the solution
        14. Adding a Link from list page to detail page
        15. Specifying parameters for data aware hyperlink
        16. Serving the list page with Links
      4. Creating the Simple Web application: JSP page 2
        1. Allowing a writable page
        2. Enhancing the Model portion of our existing code
        3. Detailed code review of Model portion
        4. Modifying Page Handler of UpdateCustomer.jsp
        5. Detailed code review of Controller portion
        6. Associating a visual page control with a Page Handler function
        7. Testing and final results
        8. Final modifications
      5. Checkpoint
  5. Part 3: Informix 4GL to EGL conversion
    1. Chapter 11: The 4GL to EGL conversion process
      1. The conversion process: an overview
        1. Conversion benefits
        2. Conversion stages
        3. Conversion limitations
        4. C interface support and limitations
        5. Report support and limitations
        6. Screen forms support
      2. The conversion process in detail
        1. Pre-conversion tasks
        2. Conversion tasks
        3. Conversion utility command line mode
    2. Chapter 12: Converting the redbook sample 4GL application to EGL
      1. Introducing the StoresDemo4GLApp
      2. Pre-conversion tasks
      3. Conversion tasks
        1. StoresDemo4GLApp conversion
      4. Generic post-conversion tasks
        1. EGL default build descriptor and Informix JDBC driver setup
        2. Getting the converted 4GL reports to work
        3. How to set up the database connection
        4. How to integrate the external C function
        5. How to integrate the 4GL user defined message file
      5. Version specific post-conversion tasks
        1. SQLERRD[2] functionality not supported in 6.0.0.1
        2. Minor Java code generation problem in 6.0.0.1
      6. How to run the converted application
    3. Chapter 13: Special conversion topics
      1. The EGL Console User Interface
        1. CUI elements
        2. A line mode output example
        3. A simple forms/menu example
        4. How to use the openUI isConstruct option
      2. Converting 4GL reports to JasperReports
        1. The Simple4GLReport example
        2. Conversion of the Simple4GLReport to EGL
        3. The generated EGL report files
        4. Default font for 4GL report to JasperReports conversions
      3. C function integration with EGL
        1. Download the EGL stack library and application object file
        2. Compile all C code into a shared library
        3. Create a function table
        4. Create the shared library
        5. Invoking a C Function from an EGL Program: the 4GL way
        6. Receiving values from EGL
        7. Returning values to EGL
      4. 4GL shared library conversion
    4. Chapter 14: How to deploy an EGL Batch or CUI application
      1. A simple EGL batch application
        1. How to create the simple batch application
        2. The simple batch application: an overview
      2. How to deploy a stand-alone EGL application
        1. The Deployment process: an overview
        2. The Target OS preparation phase
        3. EGL application deployment: SimpleBatchApp
        4. Running the EGL application: SimpleBatchApp
        5. EGL application deployment: StoresDemo4GLApp
      3. Special EGL deployment topics
        1. Curses support for EGL CUI applications on Linux/UNIX
        2. EGL runtime property settings for stand-alone applications
        3. User defined message files
    5. Chapter 15: EGL and IDS database server
      1. Database connectivity
        1. IBM Informix JDBC driver considerations
        2. IBM Informix Dynamic Server supported versions
      2. Database object name considerations
      3. EGL and database transaction
        1. Specifying transaction with SysLib.beginDatabaseTransaction
        2. Specifying a transaction in a project build descriptor
        3. Specifying a transaction with SysLib.connect
      4. EGL and database isolation level
        1. Changing the isolation level using the EGL execute command
        2. Changing the isolation level using EGL sysLib.connect
        3. Changing the isolation level using a JDBC connection URL
        4. Changing the isolation level in the Web deployment descriptor
      5. EGL and database lock mode
        1. Changing the lock mode using the EGL execute command
        2. Changing the lock mode using a JDBC connection URL
        3. Changing the lock mode in the deployment descriptor
      6. Data type considerations
        1. DECIMAL data type
        2. BYTE data type
        3. ROW data type
        4. Complex data type
      7. Executing stored procedures in EGL
      8. Temporary tables and database connection pool
    6. Chapter 16: EGL and JasperReports
      1. How JasperReports integrates with EGL
      2. The EGL/JasperReports report creation process
      3. How to create an EGL report with JasperReports
        1. Create the JasperReports design file
        2. Create EGL report applications: overview
        3. An EGL report with a SQL Query in the report design file
        4. EGL report that supplies a SQL query via a function call
        5. An EGL report that supplies the data to the Jasper framework
      4. EGL report handler (callback functions)
        1. EGL report handler structure and integration with Jasper
        2. How to create a new EGL report handler
        3. How to implement the simple demo EGL report handler
        4. How to modify the report design file to use the report handler
        5. How to run the modified EGL report with the report handler
    7. Chapter 17: Changing database server in the EGL application
      1. General considerations
        1. Planning
      2. SQL considerations
        1. SELECT statement considerations
        2. Quotation marks and character strings
        3. Substring notation
        4. Concatenation behavior
        5. Implicit casting
        6. Built-in functions
        7. Database transactions
        8. Isolation level
        9. Lock mode
        10. Temporary tables
        11. SQLCA structure
      3. JDBC considerations
        1. DB2 JDBC type 2 driver
        2. DB2 Universal JDBC driver
        3. DB2 JDBC type 3 driver
  6. Part 4: From character based to Web / advanced EGL
    1. Chapter 18: Web enhancements to the Example_01 application
      1. Enhancing the migrated application
      2. General principles of application reuse and reengineering
      3. Migrated artifacts
      4. The project phases: a high level view
        1. Recommendations and best practices
      5. Development infrastructure and design
        1. Source control
        2. Project artifact standards
      6. Application modeling: a lower level view
        1. Object and database modeling
        2. EGL DataItems: extending application semantics
        3. Creating new EGL DataItems
        4. EGL DataTables: static in-memory tables
        5. EGL records and data access functions
        6. EGL SQL record definition: best practice
        7. EGL SQL statement add/add into: read operations
        8. Forward engineering considerations
        9. Iterative development
        10. Page Modeling
        11. Adding custom graphics to your project (and Web pages)
        12. Creating or modifying template pages
        13. Modify an existing .HTPL file
        14. Add a new .JTPL template page
        15. Create the Web site model
      7. Iterative development
        1. Create the index page
        2. Create the customer search page
        3. Customer orders page
        4. Analyzing data requirements (iteratively)
        5. Order update page
        6. EGL, JSF, and ClientSide JavaScript validation code
        7. Setting cursor focus initially on page load into the browser
        8. Date validation (order_date) Client/Side JavaScript
        9. Checking the database for a customer_num value
        10. JSF data validations
        11. Populating a ComboBox from a database
        12. EGL DataItem validations
        13. Client/Side JavaScript validations
        14. Complex edits
        15. Simulate an after field edit
        16. Session variables and “last chance” bail-outs
        17. Adding a JavaScript confirm prompt
        18. Add a hidden field to a form
        19. What is left to be done?
      8. Chapter summary
    2. Chapter 19: How to enhance the converted 4GL application
      1. Project Integration
        1. Joining cells in an HTML table
        2. Add Records to the page from the converted I4GL application
        3. Table Join SQL Access
        4. Calling a converted I4GL function
        5. Making Java class files from one project available to another
        6. Invoking JasperReports
        7. Final optional example: page showing blobs as images
        8. Wrap up
    3. Chapter 20: How to deploy an EGL Web application
      1. How to prepare your EGL Web application
        1. General EGL Web deployment considerations
        2. Preparing for the external WebSphere Application Server V6 deployment
        3. Preparing for external Apache Tomcat 5.5 deployment
      2. How to deploy to an external WebSphere Application Server V6
        1. Export the EGL Web Project to an EAR file
        2. Deploy the EGL Web application
        3. Configure the data source in WebSphere Application Server
        4. Deploy the EGL application EAR
        5. Verify the deployed application
      3. How to deploy to Apache Tomcat 5.5
        1. Export the EGL Web Project to a WAR file
        2. Deploy the WAR file to the Tomcat application server
        3. Configure the application data source
        4. Restart your Tomcat application server
    4. Chapter 21: Additional EGL features
      1. EGL and WebSphere MQ support
        1. WebSphere MQ: an overview
        2. WebSphere MQ and EGL
        3. MQ connections
        4. Include MQ messages in transactions
        5. How to use WebSphere MQ in an EGL application
      2. External file access in EGL
        1. Serial record type
        2. Indexed record type
        3. Relative record type
        4. Resource associations and file types
        5. The SimpleFileApp EGL application
      3. Export/Import relational database tables
        1. SysLib.unloadTable()
        2. SysLib.loadTable()
    5. Appendix A: 4GL/EGL syntax comparison
      1. Data types
        1. Special data casting
        2. Definition and declaration statements
        3. Storage manipulation statements
        4. Program flow control statements
        5. Compiler directives
        6. 4GL Forms to EGL Console User Interface
        7. 4GL report execution statements
        8. 4GL report driver statements
        9. Built-in 4GL functions, variables, and constants
        10. Built-in and external SQL functions and procedures
        11. Operators
        12. SQL cursor manipulation statements
        13. SQL data definition statements
        14. SQL data manipulation statements
        15. SQL dynamic management statements
        16. SQL query optimization statements
        17. SQL data access statements
        18. SQL data integrity statements
        19. SQL stored procedure statements
        20. SQL client/server connection statements
        21. SQL optical subsystems statements
        22. Environment variables
    6. Appendix B: EGL functions for database developers
      1. Overview of sub-topics in this appendix
      2. EGL error handling and recovery overview
      3. Access to SQLCA structure
      4. EGL abstract SQL
      5. EGL embedded SQL and SQL/J
      6. Other built-in EGL commands or libraries
      7. Access to SQL prompt inside of Rational SDP
    7. Appendix C: EGL and Cloudscape
      1. Overview
      2. JDBC configuration
        1. Cloudscape embedded using the Cloudscape JDBC driver
        2. Cloudscape Network Server using the Universal JDBC driver
        3. Using Cloudscape Network Server
        4. Additional Cloudscape tools
    8. Appendix D: Additional material
      1. Locating the Web material
      2. Using the Web material
        1. How to use the Web material
    9. Glossary
    10. Abbreviations and acronyms
    11. Related publications
      1. IBM Redbooks
      2. Other publications
      3. Online resources
      4. How to get IBM Redbooks
      5. Help from IBM
    12. Index
    13. Back cover