Open Menu

Synergex Blog


CodeGen 5.2.1 Released

By Steve Ives, Posted on August 24, 2017 at 2:10 pm

We are pleased to announce the release of CodeGen 5.2.1 which includes several new features that significantly extend the possibilities for what can be generated. The core goal for this release was to introduce new features that make it possible to sub-divide the processing of large loops into smaller units of code, and by doing so make it possible to achieve new things, especially when working with very large structures.

For example, the reference code that demonstrates how to implement the replication of ISAM data to a relational database (https://github.com/SteveIves/SqlReplicationIoHooks) previously had a restriction that it could only deal with files (tables) with up to 252 fields (columns). The underlying reason for this related to the maximum number of arguments that can be passed to an external routine, %SSC_BIND in this case. The restriction of 252 available data parameters to %SSC_BIND meant that bad code would be produced for any structure with more than that number of fields. Now however, using some of the new features in CodeGen 5.2.1, the template has been re-structured so that %SSC_BIND will be called multiple times if necessary, removing the previous restriction.

But that’s just one example, there are doubtless many more. Here are the release notes for the new version:

  • We added several a new generic expression token <IF COUNTER_n_op_value> that allows you to write conditional template code based on testing the current value of the two internal template counters against a simple numeric expression. Here is an example of using this new expression:
<IF CODEGEN_COUNTER_1_EQ_10>
Code to include for every 10th item
</IF>
<IF TOTAL_ITEMS_LT_50>
Code for a small number of items.
<ELSE>
Code for a larger number of items.
</IF>
<REQUIRES_CODEGEN_VERSION>5.2.1</REQUIRES_CODEGEN_VERSION>
  • We made a minor correction to the documentation of the -f l command line option. The documentation previously stated that this option caused fields marked as “Excluded by Language” to be EXCLUDED from field loop processing, but actually such fields are excluded by default. The -f l command line option actually suppresses this behavior, causing such fields to be INCLUDED in field loop processing.
  • This version of CodeGen was built with Synergy/DE 10.3.3c and requires a minimum Synergy run-time version of 10.1.1.

The latest version of CodeGen can always be downloaded here.


Leave a Reply

Your email address will not be published. Required fields are marked *

*

Don't miss a post!

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts Tag Cloud Archives