TF - Translation of Database ID/File Number

This Natural profile parameter is used to translate the database ID/file number of a production database into the database ID/file number of a test database.

Caution
This parameter applies to user files only. It does not apply to system files.

Possible settings production-DBID 0 - 65535, except 255, or can be an asterisk (*) which stands for all DBIDs.

Note
DBID 255 is reserved for logical system files, see profile parameter LFILE.

production-FNR 1 - 65535, or an asterisk (*) which stands for all FNRs.
test-DBID 0 - 65535, except 255.
test-FNR 1 - 65535
Default setting none  
Dynamic specification yes This parameter can be specified dynamically and in the Natural parameter file NATPARM.
Specification within session no  

Notes:

  1. The translation of file number is relevant when developing an application in a production environment; it enables you to develop an application in a test database and then transfer the finished application to the production database without having to change or re-compile the application.
  2. The transfer is done by a translation of the application's database identification (DBID) and file number (FNR): with the TF parameter, you specify the production DBID/FNR and the test DBID/FNR. The Natural objects are then cataloged with the production DBID/FNR, but whenever a database access is executed, the production DBID/FNR is translated into the test DBID/FNR; that is, the test database is used. This means that testing can take place in the actual production environment, but not with production data.
  3. The asterisk (*) notation for production-DBID and production-FNR is mutually exclusive.

TF Parameter Syntax

The parameter is specified as follows:

TF=(production-DBID,production-FNR,test-DBID,test-FNR)

The TF parameter can be specified several times. Existing specifications are displayed in a corresponding list box.

If multiple TF parameters are specified, the following applies:

  • If one TF specification exists for a specific DBID/FNR and one with a wildcard also matches the specified FNR, the one with the wildcard is used.

    For example: The TF settings (5,2,3,7) and (5,*,7,8) translate 5/2 and give 7/8.

  • If one TF specification exists for a specific DBID/FNR and one with a wildcard also matches the specified DBID, the one with the exact specification is used.

    For example: The TF settings (5,4,3,7) and (*,4,3,1) translate 5/4 and give 3/7.

Notes:

  1. Production and test databases must be of the same type (Adabas/Adabas, for example).
  2. If the database type is not specified in NATPARM, the Adabas is used as default type; that is, SQL must be specified explicitly.
  3. For SQL, the file number must always be set to 1. The DBID must be in the range of 0-254.
  4. The profile parameter UDB (User Database ID) is evaluated before the TF parameter is evaluated.

TF Parameter Syntax

The TF parameter is specified as follows:

TF=(production-DBID,production-FNR,test-DBID,test-FNR)

The TF parameter can be specified several times. Existing specifications are displayed in a corresponding list box.

If multiple TF parameters are specified, the following applies:

  • If one TF specification exists for a specific DBID/FNR and one with a wildcard also matches the specified FNR, the one with the wildcard is used.

    For example: The TF settings (5,2,3,7) and (5,*,7,8) translate 5/2 and give 7/8.

  • If one TF specification exists for a specific DBID/FNR and one with a wildcard also matches the specified DBID, the one with the exact specification is used.

    For example: The TF settings (5,4,3,7) and (*,4,3,1) translate 5/4 and give 3/7.

Notes:

  1. Production and test databases must be of the same type (Adabas/Adabas, for example).
  2. If the database type is not specified in NATPARM, the Adabas is used as default type; that is, SQL must be specified explicitly.
  3. For SQL, the file number must always be set to 1. The DBID must be in the range of 0-254.
  4. The profile parameter UDB (User Database ID) is evaluated before the TF parameter is evaluated.