Generating and editing a conversion setup file
This topic includes the following sections:
- Generating a conversion setup file from DBA
- Generating a conversion setup file from the command line
- Editing a conversion setup file
- Using a conversion setup file
Conversion setup files are text files that contain information on tables in the data files. This information includes table names, table access levels, whether a table will be part of the system catalog, data file locations, as well as information about the conversion setup file itself: name, version of DBA used to generate it, and the date it was generated. (For an example, see Editing a conversion setup file below.)
Conversion setup files are used when you regenerate a system catalog and enable you to
- change the paths and filenames for the data files.
- change the access level of a table.
- remove a table from the system catalog.
- add a deleted table back into a system catalog.
- prevent a table from being added back into a system catalog when the system catalog is regenerated. Although you can use DBA to delete a table from the system catalog, you must use a conversion setup file to keep it out of the system catalog when it is regenerated.
To use a conversion setup file,
1. | Generate the file. There are two ways to do this. You can open the system catalog in DBA and then generate it from that program, or you can generate it from the command line. See Generating a conversion setup file from the command line and Generating a conversion setup file from DBA below. |
2. | Make any necessary changes to the conversion setup file. See Editing a conversion setup file below. |
3. | Use the conversion setup file when you regenerate the system catalog. See Using a conversion setup file below. |
Generating a conversion setup file from DBA
1. | Open the system catalog in DBA. (See Opening the system catalog in DBA.) Close any open input lists or windows. |
2. | Select Catalog > Generate Conversion Setup File. |
The Generate Conversion Setup File window opens and prompts you for the name and location of the conversion setup file. If the SODBC_CNVFIL environment variable is set, this window opens with the name and location that SODBC_CNVFIL specifies. If the SODBC_CNVFIL environment variable is not set, this window is automatically populated with the following path and filename: GENESIS_HOME:SODBCCNV.INI.
3. | Enter the full path and filename for the conversion setup file you want to generate (or accept the default), and then click OK. You can use environment variables as shown in figure 1. |
|
DBA generates the conversion setup file, which reflects the current table attributes. Once you’ve created the conversion setup file, you can use this file to control the way the system catalog is regenerated.
Generating a conversion setup file from the command line
To generate a conversion setup file from the command line, do one of the following:
- At a Windows or UNIX prompt, use the following syntax:
dbr SODBC_DBA:xfdba.dbr -c connect_string -g filename
- At an OpenVMS prompt, use the following syntax:
$ XFDBA -C connect_string -G filename
where connect_string has the user_name/password/connect_filename format and filename is the full path and filename of the conversion setup file. (For information on DBA command line options, see Options .)
This procedure opens DBA, generates the conversion setup file you specify without prompting you for confirmation and then closes DBA, returning you to the command line. |
The following examples generate a conversion setup file named cnv.ini in a directory named data.
Windows:
dbr SODBC_DBA:xfdba -c DBADMIN/MANAGER/sodbc_sa -g c:\data\cnv.ini
UNIX:
dbr SODBC_DBA:xfdba -c DBADMIN/MANAGER/sodbc_sa -g /usr/data/cnv.ini
OpenVMS:
$ XFDBA -C DBADMIN/MANAGER/SODBC_SA -G DKA600:[DATA]CNV.INI
Editing a conversion setup file
Using a text editor, you can modify a conversion setup file in the following ways:
- Mark a table IN or OUT, so that it can be included or excluded from a system catalog.
- Change access level for the data tables.
- Change the file location of a table in the system catalog.
Whenever you manually change a conversion setup file, you must regenerate the system catalog for the changes to go into effect.
The following conversion setup file was generated on Windows from the sample database and was then modified—the IN/OUT setting for the VENDORS table was set to out:
; Synergy/DE xfODBC Conversion Setup File ; Setup file name: GENESIS_HOME:SODBCCNV.INI ; Generated by : XFDBA.DBR Version 10.0.3c ; Creation date : 13-NOV-2012, 07:30:42 CUSTOMERS IN ACC=100 OPEN=XFDBTUT:customer ORDERS IN ACC=100 OPEN=XFDBTUT:orders PLANTS IN ACC=100 OPEN=XFDBTUT:plants VENDORS OUT ACC=100 OPEN=XFDBTUT:customer
Each table is listed with the following:
table_name [IN|OUT][ACC=access_level][OPEN=path]
table_name
The name of a table in your Synergy data files. In the example above, the conversion setup file lists four tables: CUSTOMERS, ORDERS, PLANTS, and VENDORS.
(optional) Determines whether the table is considered when the system catalog is regenerated. If you use dbcreate with the -c option or DBA with the “Clear and recreate catalog” option, tables marked as OUT are omitted from the system catalog. (If you use dbcreate with the -x option or DBA with the “Add new tables and update existing tables” option, no table is overwritten or removed.) The default is IN.
For example, the VENDORS table will no longer be accessible to an ODBC-enabled application if the system catalog is regenerated using the file shown above and the -c option with dbcreate or the “Clear and recreate catalog” option in DBA. Note that data files will not be altered; the VENDORS table will remain as part of the database.
access_level
(optional) Access level of the table. This can be any numeric value from 0 to 255. The default value is 100. See Modifying table access levels.
path
(optional) Location and name of the data file for the table_name table. If this option is not specified or if no path or environment variable precedes the filename specified in the Open filename field of the Repository file definition, the datasource specification in the connect file is used.
Using a conversion setup file
The SODBC_CNVFIL environment variable and options for dbcreate and DBA determine whether a conversion setup file is used when a system catalog is generated and what it will affect:
- If you set SODBC_CNFIL, dbcreate automatically uses this setting (unless you also use the -i option), and this setting is used as the default when you generate a system catalog with DBA.
- With the -i option for dbcreate, you can specify a conversion setup file to use when generating a system catalog (overriding a SODBC_CNFIL setting), or you can prevent dbcreate from using a conversion setup file, even if SODBC_CNVFIL is set. See Using dbcreate to generate the system catalog for more information.
- The "Conversion setup" field in the Generate System Catalog window in DBA enables you to specify a conversion setup file when you use DBA to generate a system catalog. If the SODBC_CNVFIL environment variable is set, DBA automatically populates this field with the SODBC_CNVFIL setting. See Using DBA to generate a system catalog with level-based users for more information.
Note that for client/server configurations, the conversion setup file must be on the server.