Step ONE (Dictionary parsing)
Step ONE (Dictionary parsing)
Here's the super short overview.
To Port to SQL you follow these Steps
➢Export DCT and APP to DCTX and TXA in Clarion.
➢Magic happens in DMC resulting in a new DCTX and TXA.
➢Import generated DCTX into an New EMPTY Dictionary in Clarion.
➢Create New Application from the generated TXA in Clarion.
➢Compile & fix (eventual) errors (DMC provides helpful comments in your code)
➢Bask in the glow of your new SQL application.
How to prepare your application and dictionary
➢You MUST read this page on DMC tokens to learn how you can communicate with DMC from your dictionary and application to tweak all as per your needs.
If you haven't seen the ClarionLive webinar yet, it's a good place to start. We converted the example Invoice application (while doing the webinar) in minutes with no hand coding required. See it here.
Now, let's go through the process a bit slower.
The TXD exported from c6/5 is simply not reliable enough for this process, so it needs to be converted to c7 or c8 first.
If you have c7 or c8 then you can convert your dictionary to c7 or c8 and export it to DCTX.
All you need to do is open the Dictionary in c7 or c8 and export as above. You don't need to convert your application to c7 or c8.
If you do not have Clarion7 or Clarion 8 we'll be happy to do this for you - no charge. Just email us your dct file and we will convert it and return the DCTX.
Preparing your Solution
To prepare to Port your Application to SQL, you need to export both your Dictionary and Application to text files. Here's how:
Clarion export your DCT to DCTX
1.Make Backups of your APP and DCT
2.Create a new Project Folder (recommended)
3.Open your Dictionary in Clarion
4.Click on this down arrow and Select Export Dictionary to Text (save in the new Project Folder)
5.Close your Dictionary
6.Open your Application(s) in Clarion 6/5 or Clarion 7 or Clarion 8 (we'll get to the Application later)
7.On the Clarion Application Menu, Select Export Application to Text (save in the new Project Folder)
8.Repeat for multi-DLL applications.
9.Close your Application and exit Clarion (you won't need Clarion again until you're done)
Port to SQL in DMC
The FIRST step must be Dictionary.
DMC only works on the text files exported from Clarion (DCTX and TXA) so your .APP and .DCT files are safe.
But, just to be sure, always make backups before venturing into unknown territory. At the end of the process you'll import new TXA and DCTX files back to Clarion and you don't want to inadvertently damage your production files.
The Dictionary is the heart of most Clarion applications, so it makes sense to start here.
DMC performs a series of checks and fixes to bring your Dictionary (DCTX) into SQL compliance.
We recommend that you start by using the Predefined Default Settings GUID or IDENTITY (recommended) option for your first attempt to Port your Application to SQL. This gives you the changes to experience all the steps before getting caught up in the many details and options.
Later you may want to use the Advanced Settings - tweak all options to see and customize all the changes DMC makes. Here's more details on the Selecting the Settings.
Here's what DMC does for this step.
•Table, Key and Column Names are checked for SQL Reserved Words. A detailed LIST is offered with suggested replacements you can change.
•AutoInc Keys are changed to SQL controlled incrementing
•You can add a new unique GUID to every table (SQL optional requirement) and a NEW Primary key on this new column
•ARRAY columns are supported
•DATE and TIME columns are ported to a DATE or a DATETIME column (optional). DMC can even detect Date/Time columns defined as Longs.
•"Pairs" of DATE and TIME columns are GROUPED under a SINGLE DATETIME column (optional)
•A wide variety of DCT "Clean-Up" steps can be done. For example, DMC can standardize all your Dates to Format @D2 and Centered. It can also fix all those annoying Decimal justified columns to Right,1 or Left,2 (user choice)
•An INCLUDE file is generated to define all OWNER and FULL PATH Names and Global Settings
This is a great exercise to do even if you don't want to Port your Application to SQL at this time. There's no better way to identify common Dictionary errors that would interfere with your ability to move to SQL in the future. DMC provides a unique peek into your tables and the formatting of your data.
Let's run through the screens and options.
When you've completed the Dictionary step, you will not have to run it again until your Data structure changes (or to also ask DMC to generate relevant Project and Profiles to then transfer your data).
DMC creates a new DCTX with all the changes applied for you to import into a NEW dictionary.
It's important to import into a NEW clean Dictionary to maintain the unique identifiers Clarion uses for each column and table.
We'll get to that step in a moment.
Reset all Flags (Button)
Allows you to erase all stored levels and start a fresh port to SQL