Generating and editing a conversion setup file

This topic includes the following sections:

 

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 the conversion setup file.)

Conversion setup files are used when you regenerate a system catalog and enable you to

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 the conversion setup file from DBA below and Generating the conversion setup file from the command line.
2. Make any necessary changes to the conversion setup file. See Editing the conversion setup file.
3. Using the conversion setup file, regenerate the system catalog. See Regenerating the system catalog.

Generating the conversion setup file from DBA

1. Open the system catalog in DBA. (See Opening a 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.

1. Specifying the path and filename for a conversion setup file.

Specifying the path and filename for a conversion setup file

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. See Regenerating the system catalog.

Generating the conversion setup file from the command line

To generate a conversion setup file from the command line, do one of the following:

dbr SODBC_DBA:xfdba.dbr -c connect_string -g filename
$ 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 Command line options.)

Note

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 the conversion setup file

Using a text editor, you can modify the conversion setup file in the following ways:

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.

IN | OUT

(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.