Skip to content

Getting Started

The material in this chapter supplements Chapter 2 of the Databridge Client Administrator's Guide. Most of that material applies equally to the Flat File Client. This chapter simply points out the differences between two clients. As mentioned previously, the Flat File Client uses Client control tables in exactly the same way as relational database clients do. These control tables are common to all clients and they have exactly the same layout. See Databridge Client Control Tables in the Databridge Client Administrator's Guide for a complete description of these tables.

Before you clone a DMSII data source, you must create the Client control tables. Once they're created, you can populate them with DMSII information sent by the Databridge Engine and create the data files that will store your cloned data. The resulting data files are based on information from the Client control tables and any additional customizations you make.

To customize how DMSII data sets get mapped to their corresponding relational database tables, you can use the Client Configurator or you can write user scripts in SQL. The Client Configurator is compatible with command-line operations and can help make reorganizations easier to handle. For more information on the Client Configurator, go to the Help menu in the Client Console. Writing and testing user scripts is typically time-consuming and requires a bit of trial and error. For instructions, see Customizing with User Scripts in the Databridge Client Administrator's Guide.


Creating Client Control Tables

The material in the corresponding section in Chapter 2 (Creating Client Control Tables) of the Databridge Client Administrator's Guide applies to the Flat File Client, except that the command line client has no -W option and the configuration file parameter use_nt_authen is not supported. If you are using a Microsoft SQL database, you can use integrated Windows Authentication when creating the ODBC data source. Because it has no bulk loader, the Client does not need this option.

The Flat File Client has a dbfixup program that updates your control tables to the current version. It works exactly the way the relational database clients do.


Defining a Data Source

Refer to the material in Chapter 2 of the Databridge Client Administrator's Guide, Defining a Data Source. All information applies to the Flat File Client except for the data table creation and index creation user scripts (these don't apply because no relational database tables are involved).

The Databridge Client Administrator's Guide section on Decoding DMSII Dates, Times, and Date/Times applies to the Flat File Client except for this: the dates are written out using the format specified by the span_date_format parameter in the [PCSpan] section of the client configuration file.

The Databridge Client Administrator's Guide section on Creating Indexes for Tables does not apply to the Flat File Client.

The Databridge Client Administrator's Guide section on Adding a Non DMSII Column applies to the Flat File Client; in fact it supports more types of external columns than the relational database clients do in order to remain compatible with DBSPAN. The table below shows the values for all the external column types supported by the Flat File Client.

Note

The value for the Bit column in this table is equal to the value in the dms_subtype column of the DATAITEMS Client control table. The exception is bit 14, which results in a dms_subtype of 0. Bits are numbered from right to left; the right-most bit is 1.

Bit Value User Column Name Description
1 1 update_type Database update type, as follows:
  • 0 for extract
  • 1 for create
  • 2 for delete (bit 10 must also be enabled)
  • 3 for modify
NOTE: You cannot use this value at the same time as bit 11.
2 2 update_time Time the update was written to the flat file.
3 4 update_ts N/A
4 8 audit_ts DMSII audit file timestamp. This column is set to NULL during the initial clone.

NOTE: You cannot use this bit at teh same time as bit 13.
5 16 audit_filenum Audit file number
6 32 audit_block Audit block serial number (ABSN)
7 64 source_name Data source name
8 128 source_id Data source identifier as defined in the DATASOURCES Client control table
9 256 my_id N/A
10 512 deleted_record N/A
11 1024 update_type Expanded database update type as follows:

0 for extract
1 for create
2 for delete
3 for modify

NOTE:
  • If you reuse the key for this record, inserting the new duplicate record removes the key.
  • You cannot use this value at the same time as bit 1 or bit 10. Bits 10 and 11 are compared in Preserving Deleted Records.
  • This bit and bit 1 work in the same way, except that this bit preserves the deleted image.
12 2048 source_id Data source identifier as defined in the DATASOURCES Client control table (key item)
13 4096 audit_ts Expanded audit file time. This column contains the DMSII audit file timestamp during updates and the starting time of the data extraction during extraction.

NOTE:You cannot use this bit at the same time as bit 4.
14 8192 user_column1 Generic user column whose entry is left as NULL.
15 16384 sequence_no N/A
16 32768 delete_seqno N/A
17 65536 create_time Time when the record was created in the flat file (PC time).
18 131072 user_column2 Generic user column whose entry is left as NULL.
19 262144 user_column3 Generic user column whose entry is left as NULL.
20 524288 user_column4 Generic user column whose entry is left as NULL.
21 1048576 change_code The one letter change code for an update A=Add, D=Delete, M=Modify
22 2097152 strnum The structure number for the data set.
23 4194304 strname The data set name.
24 8388608 rectype The record type for variable format data sets.
25 16777216 modflag A flag that indicates if an update is part of a MODIFY BI/AI pair. A value of 1 for an ADD or a DELETE, indicates that the ADD was originally the AI or DELETE was originally the BI of a MODIFY BI/AI pair.
26 33554432 mode The mode of the data set as stored in the `ds_mode` column of the DATASETS Client control table. 0=CLONE, 1=FIXUP, 2=UPDATE.
27 67108864 fmt_level The format level for the data set.
28 134217728 audit_seg The segment number of the audit location within the audit file (audit_seg column in DATASETS Client control table)
29 268435456 audit_inx The index of the audit location within the segment of the audit file (audit_inx column in DATASETS Client control table)
30 536870912 stacknbr The stack number of the corresponding task on the MCP.

Note

Values for All the Externals Column Types Supported by the Flat File Client


The Process Command

The process command is the main command of the Databridge Flat File Client. It creates the flat files for all data set tables whose active column is 1 in the corresponding entries of the DATASETS Client control table. Since the define command initializes the ds_mode column, all the selected data sets are cloned the first time you run a process command.

Note

If you do not select specific data sets in the data set global mapping script, the Databridge Client automatically clones all data sets except for remaps, the restart data set, and the global data set. This operation may take a very long time and require a lot of disk space.

You can schedule the process command to update the Databridge flat files. The schedule becomes effective after you run the process command for the first time. For more information, see Scheduling Updates in the Databridge Client Administrator's Guide.

To create the Databridge extract, fixup, and update files using the command line Flat File Client's process command, you must first make sure that the current directory is set to the working directory you created for this data source. If you start the run from the Client Console, you do not have to deal with such details. You simply initiate a process command using the Data Source menu.

The remainder of the material in The Process Command section of the Databridge Client Administrator's Guide applies to the Flat File Client. You can control the locations of the flat files using the [PCSpan] section parameters extract_dir, fixups_dir and update_dir. By default, all files are written to the working directory. If you want to keep them separate, you can specify different directories such as "extracts", "fixups" and "updates". The names normally will be relative to the working directory. Thus in the above example, the client would create three subdirectories in the working directory. The files will have similar names, which can be made to include some metadata by using the file name mask. See the filename_mask parameter described in Appendix A.


The Clone Command

Refer to The Clone Command in Chapter 3: Cloning a DMSII Database of the Databridge Client Administrator's Guide for more information.