IBM Informix 4GL to EGL Conversion Utility README

for Rational Application Developer, Version 6.0, Interim Fix 004


© Copyright IBM Corporation 2000, 2005. All Rights Reserved.

Welcome to the IBM® Informix® 4GL to EGL Conversion Utility, for Rational® Application Developer Version 6.0, Interim Fix 004.

Table of contents

1.0 About this feature
2.0 Documentation
3.0 Known limitations
4.0 Tips
5.0 Contacting customer support
6.0 Notices and trademarks

1.0 About this feature

This release contains the Conversion Utility that would assist an application conversion from InformixTM 4GL to Enterprise Generation Language (EGL).  This conversion utility requires the installation of Rational Application Developer (or Rational Web Developer) Version 6.0, Interim Fix 004 (iFix004).

This Conversion Utility provides the following capabilities:

Note: Converting an I4GL application to EGL requires many pre-conversion and post-conversion steps.  Conversion Utility users are strongly encouraged to read the IBM Informix 4GL to EGL Conversion Utility Users' Guide (User's Guide) before converting their applications with the Conversion Utility.  The User's Guide provides a list of conversion limitations.  For a complete list of temporary Conversion Utility limitations, see Section 3.0 Known Limitations below.

2.0 Documentation

IBM Informix 4GL to EGL Conversion Utility Users' Guide leads I4GL users through the Conversion Path to EGL.  This documentation is available at the root directory of this iFeature: <RAD_HOME>/egl/eclipse/plugins/com.ibm.etools.i4gl.conversion_<version>/

The information center contains extensive documentation on how to use both EGL and the full range of product features. Access the information center from the main menu by selecting Help>Rational Help.

3.0 Known Limitations

This section lists the current known limitations for EGL that are key to the 4GL support and the 4GL to EGL conversion support.  

3.1 Expressions not allowed in subscripts or substrings. 


Description
The iFix004 version of EGL does not allow expressions in subscripts or substrings.
Workaround 
After ensuring that your converted application is imported into the EGL perspective, make a Post-Conversion change by creating temporary variables and assigning the result of the expressions to the temporary variables, and then using these temporary variables instead.  

3.2 Data type compatibility.


Description
Although I4GL supports the assignment of character and numeric data types to each other, EGL does not.
Workaround 
The EGL formatNumber function can be used in assignment statements between numeric and Strings. This is a post migration effort. e.g.

charval = intval;
needs to be replaced with
charval = formatNumber(intval,”#####”);
 

However, the reverse cannot be worked around:
intval = charval
 

Documentation for formatNumber is available in the formatNumber and Assignments online help topic.

3.3 Variable declarations not allowed within certain statement blocks.


Description
iFix004 release of EGL allows variable declarations anywhere in the code except within IF/WHILE/FOR and OpenUI blocks. During conversion the Conversion Utility creates inline temporary variables for forms/windows etc. If there is a NESTED input statement, EGL validation will return an error explaining that variable declarations are not allowed within the certain statement blocks.
Workaround 
Make a Post-Conversion change by moving the variables outside of the loop.    

3.4 In EGL the IF conditions (IF ! xxx or IF xxx) and Boolean expressions are not supported.


Description
The IF conditions in "IF ! xxx" or "IF xxx"  throw validation errors.  Boolean expressions are not supported in EGL and generate validation errors. 
Workaround 
The Conversion Utility automatically converts these IF functions depending upon the context in which they are used; this limitation does not impact I4GL application conversion.  It's documented here so that I4GL users may know the support level of IF conditions when writing new applications in EGL.  

For Boolean expressions, convert the Boolean result of a condition to a numeric value of 0 or 1.

3.5 Character types are not allowed to have subscript expressions, nor it is allowed to have substring expressions on the left side of an expression or calls to functions blocks.


Description
I4GL allows subscripts for character data types.  An example:

Define Mychar char(40)
For I = 1 to 40
    Let Mychar[i] = ‘a’
End for

Subtstring operations are allowed on the left side of expressions and for passing parameters to functions.

Let Mychar[10,20] = “aaaa”
Call function1(Mychar[10,20]) returning Mychar[30,40]

iFix004 release of EGL does not have this support and will generate validation error.
Workaround 
The first loop could be replaced with a single built-in function in EGL called setSubStr. The equivalent code for the example shown above would be:

setSubStr(mychar,1,40,’a’);

For the statement , Mychar[10,20] = “aaaa” though the Conversion Utility does not provide a workaround, the following EGL built-in function could be used as a Post-Conversion change:

tmpStr = “aaaa”;
copyStr(mychar,10,20,tmpStr,1,strlen(tmpStr)); 

Similar workaround with the Call statement once converted into EGL.

3.6 Two identical resultset identifiers are not allowed in an application.


Description
An I4GL application could have the following statements:

declare c1 cursor for select * from tab1
open c1

declare c1 cursor for select * from tab1
open c1 

The Conversion Utility will convert the above codes to:

Open c1 with #sql{ select * from tab1};
Open c1 with #sql{ select * from tab1};

The iFix004 release of EGL returns a validation error when it finds a two result set identifiers with the same name.  The same validation error is returned when a pair of PREPARE statement identifiers with the same name are found. 
Workaround 
If you have two resultset identifiers with the same name, before converting your application in the Conversion utility, you should adjust the identifiers so that each one has a unique name.  Make a Pre-Conversion step by replacing the same resultset identifiers with unique namesIn some cases, the logic needs to be checked before making this change.

3.7 System variables are not allowed to be passed to functions.


Description
I4GL allows system variables such as SQLCODE to be set and passed to functions.  EGL does not.  A validation error is returned  when the converted code is opened in the IDE.
Workaround 
Make a Post-Conversion step by assigning the system variables to temporary variables and passing them to functions. 

3.8 EGL provides limited support for the I4GL INITIALIZE statement and no support for the VALIDATE statement.


Description
Initialize to null works for both individual elements and records but Initialization of record arrays to NULL is not yet supported in the iFix004 release of EGL.  

initialize a to null
will be converted to
set a null;

initialize arec.* to null
will be converted to
set arec empty;

The provision for setting an array of records is missing in EGL and generates validation error.

The I4GL VALIDATE statements is not supported in EGL.
Workaround 
Making a post-conversion step by replacing the initialize statement to a for loop which initializes each element of the array to empty. 

Convert the validate statements to individual assignments where possible.  Validate currently is being commented out with a FIXME comment around it since there is currently no provision in EGL for it.  

3.9 The Underscore character "_" is not allowed in package names.


Description
Informix 4GL can have databases with an underscore character ("_") in their names. When this gets converted in the schema extraction phase, the database names are translated into package names with an "_" character, and each table becomes a file within EGL. Package names with an “_” are not allowed in the iFix004 release of EGL, though one could have project names and file names with an “_” character. 
Workaround 
Make a Post-Conversion step by renaming the packages and removing the underscore.

3.10 The I4GL StartLog() and ErrorLog() functions not supported in EGL.


Description
In I4GL, the StartLog/Errorlog functions are be used to log runtime error message to user specified files.  In addition, once the StartLog function is called, any runtime error messages are inserted into the file defined in StartLog.  These functions are not supported in the iFix004 release of EGL. The current EGL implementation returns all of the runtime errors to the console. There is no option in the language to redirect it to a user specified file. 
Workaround 
This functionality is used primarily for logging. There are several workarounds that one can put as a Post-Conversion effort: There are several post-conversion workaround options: 1. create EGL functions in a library that do the logging, 2. callout Java code to do this or use EGL’s serial I/O capability.  All of these are described in detail in the EGL reference manual.

4.0 Tips

There are some programming tips related to the I4GL to EGL Conversion Utility:

4.1 Screen Record vs. Screen Array
In I4GL, the SCREEN RECORD keywords defined in the form file could also be referred to as SCREEN ARRAY.  This is not supported in EGL, and results in a runtime error.

4.2 Locale Settings
On Microsoft Windows machines for any non-English locale the Standards and Formats and the Languages for non-Unicode Programs tabs must be set with the appropriate locale information.

4.3 Default locale assumption by Conversion Utility
Place holder for Sridhar's text: "Default Message file in EGL does not require locale prefix, conversion tool will assume "en_US" as default locale, and all message files in this locale are converted without locale prefix, if "en_US" is not default locale then this has to be done as post migration effort."

5.0 Contacting customer support

The product home page for Rational Application Developer is http://www-306.ibm.com/software/awdtools/developer/application/index.html. For FAQs, lists of known problems and fixes, and other support information, visit the Support page on the product home page.  You can also post questions through Rational Application Developer Forum.

6.0 Notices and trademarks

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this documentation in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this documentation. The furnishing of this documentation does not give you any license to these patents. You can send license inquiries, in writing, to:

IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:

IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:

Intellectual Property Dept. for Rational Software
IBM Corporation
3600 Steeles Avenue East
Markham, Ontario
Canada L3R 9Z7

Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.

The licensed program described in this documentation and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples may include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces.

Each copy or any portion of these sample programs or any derivative work, must include a copyright notice as follows:

(C) (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. (C) Copyright IBM Corp. 2000, 2005. All rights reserved.

If you are viewing this information softcopy, the photographs and color illustrations may not appear.

Programming interface information

Programming interface information is intended to help you create application software using this program.

General-use programming interfaces allow you to write application software that obtain the services of this program's tools.

However, this information may also contain diagnosis, modification, and tuning information. Diagnosis, modification and tuning information is provided to help you debug your application software.

Warning: Do not use this diagnosis, modification, and tuning information as a programming interface because it is subject to change.

Trademarks and service marks

The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product or service names, may trademarks or service marks of others.