1 4 7 Compiling RDML

Visual LANSA

1.4.7 "Compiling" RDML

To execute a LANSA function, the RDML code is translated into an High-Level Language (HLL), which is then compiled into an executable program object. RDML is not an interpretive language. It creates a program object which is native to the execution environment so your application has optimum performance characteristics for that platform.

The RDML compile process and its generation of an intermediate HLL code is completely transparent. You do not need to see the generated High-Level Language code and should never modify this code. LANSA is not a code generator. It is a complete application development suite using a repository with a 4GL. Modification of the HLL code would destroy the integrity of your high-level application definitions in LANSA. Once you modify HLL code on a platform, you restrict the code to execution on that specific platform only.

LANSA uses different High-Level Languages depending on the targeted execution platform. For example, RPG and C/C++ provides the fastest execution for the IBM i platform. For Windows and Linux, ANSI C/C++ is used. For the Web, you might use C/C++, XHTML, XML and CGI/Apache Plug-in/IIS Plug-in. LANSA's ability to use multiple languages is key to creating a platform independent application solution.

LANSA uses platform dependant compilers to produce executable program objects and has found that these compilers differ in their ability to handle large amounts of HLL code. Under certain conditions, the compiler can hit internal limits and fail to produce an executable program. To help understand this situation, the following points should be taken into consideration:

  • To minimize the possibility of hitting a compiler's internal limits, LANSA restricts the number of lines of RDML/RDMLX code must be translated as a unit. RDML Functions are limited to 5000 lines while Components and Full RDMLX Functions are limited to 32000 lines.
  • LANSA commands generate different amounts of HLL code. Workstation commands (like DISPLAY, REQUEST and POP_UP) and I/O commands (like FETCH, SELECT and UPDATE) generate much more HLL code than commands like CHANGE, IF and BEGIN_LOOP.
  • The compiler being used. For example, a Full RDMLX LANSA Component consisting of 18000 lines of RDML was translated into a 28MB C/C++ HLL file and this file was successfully compiled by the Microsoft 32-bit compiler, but the component had to be reduced to 9000 lines in order to be compiled by IBM i's compiler.
  • Enabling RDML/RDMLX debugging. When 4GL debugging is requested, additional HLL code is produced which can cause the compiler limits to be exceeded. For example, using the HLL code produced by the 9000 lines of RDML from the previous example, IBM's IBM i C/C++ compiler failed when 4GL debugging was requested, but was successful without it.
  • Enabling observability (3GL debugging). Sometimes it is necessary to debug an executable program using the HLL code produced by LANSA. Requesting this feature can also impact the amount of HLL code that can be compiled. For example, when observability was selected, 9000 lines of RDML had to be reduced to 4500 lines before IBM i's compiler would compile successfully.

Ý 1.4 LANSA RDML