I am pleased to announce that we have just released a new version of CodeGen (5.1.9) that contains some new features that were requested by customers. The changes in this release are as follows:
- We added two new structure expansion tokens <FILE_ODBC_NAME> and <FILE_RPS_NAME> that expands to the repository ODBC table name or structure name of the first file definition that is assigned to the structure being processed.
- We made a slight change to the way that the multiple structures command line option (-ms) is processed, allowing it to be used when only one repository structure is specified. This allows for templates that use the <STRUCTURE_LOOP> construct to be used when only one structure is being processed.
- We also fixed an issue that was causing the <FIELD_SPEC> token to produce incorrect values for auto-sequence and auto-timestamp fields. Previously the value 8 would be inserted, now the correct value i8 is inserted.
This version of CodeGen was built with Synergy/DE 10.3.3c and requires a minimum Synergy runtime version of 10.1.1. You can download the new version directly from the CodeGen Github Repository.
We are pleased to announce that Professional Services has just released CodeGen 5.1.7. The main feature of the release is the addition of experimental support for generating code for the MySQL and PostgreSQL relational databases. Developers can use a new command line option -database to specify their database of choice. This causes the SQL-compatible data types that are injected by the field loop expansion token <FIELD_SQLTYPE> to be customized based on the chosen database. The default database continues to be Microsoft SQL Server.
Before we consider support for these new databases to be final we would appreciate any feedback from developers working with MySQL or PostgreSQL to confirm whether we have chosen appropriate data type mappings. Additional information can be found in the CodeGen documentation.
I am pleased to announce that we have just released a new version of CodeGen with the following enhancements:
- We modified the way that key loops are processed so that if a repository structure has a mixture of access keys and foreign keys defined, the foreign keys are ignored when processing key loops.
- We added a new key loop expression <IF FIRST_SEG_NOCASE>.
- We added four new field loop expressions <IF AUTO_SEQUENCE>, <IF AUTO_TIMESTAMP>, <IF AUTO_TIMESTAMP_CREATED> and <IF AUTO_TIMESTAMP_UPDATED> which can be used to determine if fields are defined as auto sequence or auto time-stamp fields.
- We added two new key loop expressions <IF AUTO_TIMESTAMP_CREATED> and <IF AUTO_TIMESTAMP_UPDATED>.
- We added two new key segment loop expressions <IF SEG_AUTO_TIMESTAMP_CREATED> and <IF SEG_AUTO_TIMESTAMP_UPDATED>.
- We changed the behavior of the field loop expansion token <FIELD_TYPE_NAME> when used in conjunction with auto-sequence and auto-time-stamp fields.
This version of CodeGen is built with Synergy/DE 10.3.3a, requires a minimum Synergy runtime version of 10.1.1, and can be downloaded from here.
We are pleased to announce that we have just released CodeGen V5.1.4. The main change in this version is an alteration to the way that CodeGen maps Synergy time fields, i.e. TM4 (HHMM) and TM6 (HHMMSS) fields, to corresponding SQL data types via the <FIELD_SQLTYPE> field loop expansion token. Previously these fields would be mapped to DECIMAL(4) and DECIMAL(6) fields, resulting in time fields being exposed as simple integer values in an underlying database. With this change it is now possible to correctly export time data to relational databases.
We also made a small change to the CodeGen installation so that the changes that it makes to the system PATH environment variable occur immediately after the installation completes, meaning that it is no longer necessary to reboot the system after installing CodeGen on a system for the first time.
This version of CodeGen is built with Synergy/DE 10.3.3a and requires a minimum Synergy runtime version of 10.1.1.
For some time now we have published various examples of how to replicate ISAM data to a relational database such as SQL Server in near to real time. Until now however, all of these examples have required that the ISAM files that were to be replicated needed be modified by the addition of a new “replication key” field and the addition of a corresponding key in the file. Generally this new field and key would be populated with a timestamp value that was unique to each record in the file. While this technique guarantees that every ISAM file can be replicated, it also made it hard work to do so because the record layout and key configuration of each ISAM file needed to be changed.
However, almost all ISAM files already have at least one unique key, and when that is the case one of those existing those keys could be used to achieve replication without requiring changes to the original record layouts or files. When this technique is combined with the capabilities of I/O hooks it is now possible to achieve data replication with only minimal effort, often with no changes to the ISAM files being replicated, and with only minimal modification of the original application code.
I am pleased to announce that I have just published a new example of doing exactly that. You can find the example code on GitHub at https://github.com/SteveIves/SqlReplicationIoHooks. Of course if you are interested in implementing data replication to a relational database but need some assistance in doing so, then we’re here to help; just contact your Synergex account manager for further information.
Tomorrow morning I’m heading back home to California having spent the last two weeks in the United Kingdom. The second week was totally chill time; I spent time with family and caught up with some old friends. But the first week was all about work; I spent a few days working with Richard Morris (it’s been WAY too long since that happened) and I can tell you that we worked on some pretty cool stuff. I’m not going to tell you what that is right now, but It’s something that many of you may be able to leverage in the not too distant future, and you’ll be able to read all about it in the coming weeks. For now I wanted to let you know that we found that we needed to add some new features to CodeGen to achieve what we were trying to do, so I am happy to announce that CodeGen 5.1.3 is now available for download.
It seems like since we moved CodeGen from CodePlex to GitHub there has been some confusion about how to download the latest version. The latest version will always be available at:
We have just released a CodeGen update that includes a fix for a problem that was discovered recently related to the processing of enumerated fields. If your repository includes enumerated fields and you use the field selection loop token <SELECTION_VALUE> (or the Symphony Framework custom token <SYMPHONY_SELECTION_VALUE>) then we recommend that you update to the new version and re-generate your code. As a reminder CodeGen recently moved to GitHub, you can find the new release at https://github.com/Synergex/CodeGen/releases.
Today we are announcing that we have moved the open source CodeGen project from it’s former home on CodePlex to a new home on GitHub. We made the decision to do this for several reasons, not least of which is the fact that GitHub has effectively become the de-facto standard place for hosting open source projects. Even Microsoft, who built and operate the CodePlex site using their own Team Foundation Server source control technologies seem to have lost interest in it; in the last 18 months or so they have moved pretty much all of their own considerable number of open source projects to GitHub also! GIT also has several very nice features over and above what TFS has to offer, and also has the benefit of being very considerably faster to use. Related to the move is a new version (CodeGen 5.1.1), but the only changes in the new version are related from the move from CodePlex to GitHub; there is no new functionality in the new release over the 5.1.0 version that was released a few days ago.
If you don’t already have one we encourage you to create a GitHub account and once logged in to “watch” CodeGen. If you wish to receive notifications about new CodeGen releases you can also subscribe to the CodeGen Releases Atom feed. CodeGen is still distributed under the terms of the New BSD License. For the time being we plan to leave the CodePlex environment intact, but no new changes will be checked in there and no new releases will be published there.
Here are a few useful GitHub URLs related to our new home:
Just a quick note to announce that we have today released CodeGen 5.1. This release has but one new feature, but it does allow me to solve a challenging problem that I faced while working on a customer project recently. I have dubbed this new feature conditional processing blocks. Essentially it is the ability to conditionally include (or exclude) parts of a template file based on the presence or absence of identifiers that can be declared on the command line. It allows you to achieve the same kind of results that you would when using .DEFINE, .IFDEF and .IFNDEF in DBL source code, but within template files. For example a developer could include code like this in a template file:
The developer would then have the ability to choose whether to include or exclude the code that assigns the I/O hooks object to the channel that was opened at the time that they generate the code. By default the I/O hooks code would not be included; if it was needed the developer would define the ATTACH_IO_HOOKS identifier as they generate the code. They would do this by using a new –define command line option:
codegen –s EMPLOYEE –t FILE_IO_CLASS –r –define ATTACH_IO_HOOKS
This may seem like a very simple change, and it is, but my mind is now racing thinking about all of the new possibilities it opens up.
Just a quick note to let all of you CodeGen users out there that a new version (CodeGen 5.0.5) has just been released. You can get more information about the changes and download the release from https://codegen.codeplex.com/releases.
If you would like to receive email or RSS notifications when new CodeGen versions are released then there are links on the above mentioned page to allow you to set that up, and we encourage you to do so.
I finally got around to something that I have been meaning to do for a while, creating some short training videos for CodeGen. Just five videos right now, but I have a growing list of subjects for future videos.
You can view the videos on the Synergex Channel on YouTube.
Please subscribe to the YouTube channel to receive notifications when new videos are added.