What I noticed
I was promoting a Connect CDC model from a development environment to production. The hosts were different. The schemas were different. I opened the Director, made a copy of the model, changed the host and server propertiesand then ran straight into the wall every practitioner eventually hits. The Connect CDC Director does not have a global replace facility for library or schema names. There is no find-and-replace. There is no bulk edit. Every table definition had to change, and the Director's GUI offers no shortcut for that.
RSL is a very useful tool especially when promoting models from development/test to quality assurance or UAT to production. In many organizations, these environments are similar and just on different hosts, so model promotion can be as simple as saving a copy and changing the host and server information. When the libraries or databases are different, they must be changed via RSL because the Connect CDC Director does not have an edit facility such as a global replace for library or schema names.RSL is a set of statements used to create a Connect CDC model. You can use RSL instead of the Connect CDC Director to create a model, as well as in combination with the Connect CDC Director. Creating a model involves three steps: defining, validating, and committing the model. Using RSL statements, you can generate the same model entitieshosts, servers, shared tables, and table mappingsas you can using the Director.
The promotion process is structured and deliberate. The steps that matter most are in the right order:
Open the model in the Director. Execute Save as from the File menu and create a new copy of the modelsave it in a new directory, change the name from old to new, then exit the Director UI so the Director closes the original model name and opens the new one. Edit host and server properties to point to the new hosts and servers. Now is the time to change their labels so you do not have to do them in the RSL edits below. Items that may need to change include the DB2/400 metabase library and the DBMS instance port. Test the connections and install metabases as necessary. If the schemas are the same, validate and commit. If they are not the same, proceed to Export RSL.Use the Export RSL option from the File menu or the toolbar. RSL will append _X to the model name for all exported files. The _X file is a driver file to import the RSL files into a new model in the correct order. The _X_HOSTS file has the definitions for hosts, database servers, database user IDs, and DB2 change selectors if the source is DB2. The _X_TBLS file has the RSL for the individual source and target table definitions organized by server name. Change the schema or database names globally across these files. The _X_METHS file contains the user-defined data enhancement and data transformation methods. The _X_MAPS file contains the source to target table mappings including expressions. The _X_DISTS file contains the distributions and their associated requests.
That last file_X_DISTSis the one that carries the distribution structure, including the requests tied to each distribution. The distribution IDs survive the promotion intact because they come from the RSL export of the original model, not from a fresh build. Nothing is regenerated unless you change it.
After editing, close the new model file. Select New from the File menu or the New tool. Select Import RSL. Note: you may have messages regarding table mappingthese messages are the same ones that were displayed when using the Director GUI and context menus. Save the modelyou can use the same name as the copy you made earlier. Validate, commit the model, and start it with monitoring and control.
Why this design works
- Predictability: Each RSL file has a fixed and documented scopehosts in
_X_HOSTS, tables in _X_TBLS, mappings in _X_MAPS, distributions in _X_DISTS. You know exactly which file to edit and what will change when you do.
- Reliability: The Connect CDC Director and RSL are completely compatible. You can create a model in the Connect CDC Director and export it to RSL, or you can create a model using RSL and import it into the Connect CDC Director. The best way to master RSL is to build a base set of model entities using the Connect CDC Director, export the model to RSL, and use the generated code as an example to build upon.
- Operational Safety: Changing host and server labels before exporting to RSL eliminates one class of errorlabel mismatches between environments that would otherwise require manual edits inside the RSL files after export.
What's different for DB2/400 and schema-different environments
There is one extra step.
- For environments where only the hosts differ, RSL export and reimport may not be needed at allediting host and server properties directly in the Director is sufficient.
- For environments where the libraries or schemas differ, global replace in the
_X_TBLS file is the only reliable path. The Director has no equivalent tool for this.
- The
_X_HOSTS file specifically includes DB2 change selectors if any source is DB2such as OS/400, z/OS, or UDB. These must be reviewed and updated alongside the host and server definitions when the source environment changes.
Why this matters in production
Promoting a model without RSLby manually editing table by table in the Directorworks in small models. It stops working reliably as soon as the model has dozens of tables, multiple distributions, or schema names that differ between DEV and PROD. A single missed table reference does not fail at promotion. It fails at replication start, or worse, silently during the first copy.
The _X_DISTS file is the protection for distribution IDs. Because the distributions are exported and reimportednot recreatedthe IDs remain stable. Request names, distribution names, and the request-to-distribution relationships all carry over.
If you ever see a model that validates in DEV but breaks distribution reference errors in PROD, it is not random. It is Connect CDC applying exactly what you importedand the import is missing the global schema change that the Director could not make for you.
What changed for me
I used to treat RSL as an advanced scripting tool for edge cases. I now treat it as the standard promotion mechanism whenever schemas differ between environments. Editing three or four text files and running a global replace is faster, safer, and auditable in a way that point-and-click GUI edits never are. I keep the exported RSL files version-controlled alongside the model. If something breaks in PROD, I know exactly what changed and when.
Takeaway
RSL model promotion in Connect CDC is not optional for schema-different environmentsit is the only supported path for making global library or schema name changes. The export produces five clearly-scoped files. Each file covers exactly one layer of the model. Edit the right files, reimport, validate, and commit. Distribution IDs survive intact. The Director and RSL are fully compatible at every step.
Have you promoted a Connect CDC model using RSL across environments with different schema names, and what was the step or file that caught you off guard the first time? *Precisely Software Inc.