The DDL Converter GUI is accessed from the left-hand pane of the HCO for SQL Server main window. the DDL Converter tool may also be run from the command line. See the topic "Command Line Usage" for details.
The DDL Converter is used to create a new, or access an existing SQL script that will create objects in a SQL Server database. The DDL converter requires a transfer list (created with the Transfer List Manager tool), a database connection, a SQL Server database, and a task property. The tool also provides options for customizing the DDL.
As with transfer lists, DDL tasks can be save in a local or shared location. A DDL task can be verified for correctness in a dummy database or run against the destination database.
A schema task can be exported as a .sql script file suitable for use with sqlcmd or SQL Server Management Studio.
The ‘Script properties’ control group determines which Transfer List to use, the destination connection to operate on and the type of task to be performed. The available tasks are:
These steps describe how to create a SQL script, and the corresponding DDL Converter control.
The New script dialog box appears.
| Drop and Create Objects | Creates clean copies of all objects by dropping any existing objects with the same name and then creating a new object. |
| Restore missing objects | Repairs the destination by creating any objects that do not exist, but leaving existing objects untouched. |
At the top of the screen is a display of the selected Object List. The DDL used by a task can be customized (for example by adding storage attributes) for each object in the Object List.
When a table or view in the Object List is selected, the DDL generated by the DDL Converter tool is displayed in the upper text box. It is also shown in the lower text box, where it may be edited. Both original and customized DDL remain available.
DDL for all or individual objects may be verified, and all or individual customizations may be undone before saving.
Note:
The Execute button targets the SQL connection name that you picked in the drop-down box. The Check and Check All (Check All is located on the Customize DDL tab) buttons test the DDL script against a dummy database and do NOT use the SQL connection that you picked from the drop-down. Check and Check All use the SQL connection specified in the options for HCOSS tools called "HCO Connections/Data source to use for testing DDL". There is an option called "Name of the current/default target data source" which is used to set a default SQL connection for executing DDL. However, the user is allowed to pick whichever one they actually want via the drop-down.
HCOSS Options are accessed from the Visual Studio menu Tools/Options/Micro Focus COBOL Tools/HCO for SQL Server. If using the stand-alone .exe to bring up the tools, Options appear under the Activities pane.
You are now ready to use the Data Transfer tool to populate your objects with data.