Fully automatic transformation of RPG source code into C# sources and a compilation-ready Visual Studio 2010 project.
Developed and distributed in cooperation with Habel Lohn.
- All of the core RPG runtime features are implemented in a reusable library written in pure C#.
- Your RPG source code is transformed into a number of generated C# classes, built upon the C# library.
- Out of the box, the transformed project will read from and write into flat files, just like RPG does.
- Input/output file specifications are transformed into separate C# classes, allowing easy reusing and replacing.
- Support for the .DAT and .DBF/.NDX file formats is included in the form of specialized reader and writer classes.
- The reader and writer classes rely on simple interfaces, making it easy to switch them out for your own custom implementation e.g. database integration.
The transformation covers a large subset of the IBM RPG II and Lattice-RPG dialects. Including, but not limited to:
- The RPG execution cycle with primary and secondary input files.
- Input, update and output files.
- Match fields and record identification codes.
- Chained input files, internal and external tables.
- Code specifications with operands, result fields and conditioning and resulting indicators.
- Declaration and invocation of subroutines.
- Various special fields, e.g. PAGE and UDATE.
- Output via detail, total and exception records.
- Output formatting using edit codes, edit words and packed fields.
A number of in-house development tools have been created, available on demand as well.
- Eclipse plugin for RPG source editing, supporting syntax highlighting, section outlining, language-aware search and automatic problem reporting.
- Continuous Integration support for RPG-based test cases (transforming the RPG sources into C# project, compiling into CLR executable, running executable with test data, comparing actual output against expected output).
- Web application for transforming RPG sources into downloadable C# projects on demand.
- Various helper and statistics scripts operating on RPG sources.
- Transformation of 10KLOC of RPG source code takes about 1s.
- Runtime performance of the transformed application is optimized by doing disk I/O on demand when possible and caching when reasonable.