The Aubit ACE compiler can take standard Informix ACE style reports and convert them to 4GL or PERL.
Once converted to 4GL - the ACE reports can then be run against any of the supported platforms making this an ideal way
to port ACE report to new database backends, as well as develop new reports on these platforms.
Compiling ACE reports is simple. Ensure you are setup to connect to the database then run:
$ aace somefile.ace>
This will generate a file containing the compiled report which can be used for subsequent operations
Generating 4GL code is then very simple :
$ aace_4gl -C -o somefile.4gl somefile
Where somefile.4gl is the name of the file you wish to generate, and somefile is the name of the
report you compiled.
Eg.
$ aace systables.ace
$ aace_4gl -C -o systables.4gl systables
Full options :
-C | Use ACE report compatibility mode for aggregate values (may be slower) |
-I | Generate code that uses Insert cursors |
-B # | Flush the insert cursor every # inserts |
-F FunctionName | Generate function 'FunctionName' rather than MAIN |
Compiling to PERL
It is also possible to generate PERL code which will then use PERLs DBI module to connect to the database.
Code generated requires two special modules 'report.pm' and 'using.pm' in order to run.
These can be found in the compilers/ace/perl_runner directory and should be copied into a directory where PERL will look for its modules.
(eg. /usr/local/lib/site_perl/report.pm)
The aace_perl compiler will compile directly from your ACE report and will automatically compile it first.
$ aace_perl somefile.ace
By default this will generate a file called 'somefile.run.pl' which can then be executed by PERL
$ aace_perl systables.ace
$ perl systables.run.pl
Note:
If you get an error similar to :
Can't locate report.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 ...)
then the PERL program cannot find the report.pm and/or using.pm perl modules!
|