Try OpenEdge Now
skip to main content
Programming Interfaces
Change Data Capture ABL references : ABL procedure to dump : Understanding the structure of a .cd file
 

Understanding the structure of a .cd file

When you open the .cd file, the following contents appear:
*First row — Contains information of a single CDC table policy. This row has an identifier or tag called “Table” as a prefix to identify that the policy is a CDC table policy. The value at the end of the row indicates the number of field policies associated with the CDC table policy.
Each column in the first row appears in the following oder:
Column
Description
Table
The identifier or tag to identify that the policy is a CDC table policy.
Policy Name
The name of the table policy.
Description
The description of the policy.
State
The internal state of the policy.
The values are 0 and 1 for Active and Inactive respectively.
Instance
The policy on the source table.
The values are 0, 1, and 2 for Current policy, Previous policy, and Pending policy respectively.
Source Table
The name of the source table.
Source Table Owner
The name of the owner of the source table.
The source table can be a PUB or non-PUB table.
Data Area
The storage area where the change table.
Index Area
The storage area where the change table indices are created.
Identifying Fields
Indicates if the Identifying fields are available for the policy.
The values are Yes and No.
Level
The level of data that is captured on the source table.
The levels are:
*Minimal(0)
*MinimalWithBitMap(1)
*Medium(2)
*Maximum(3)
Change Table
The name of the change table.
Change Table Owner
The name of the non-PUB or PUB owner of the change table.
Encrypt Policy
The encryption policy used for the change table.
The values are Yes and No.
Misc Fields
This is an extent [16] field and the values are non-editable.
All values of _Misc fields for _Cdc-Table-Policy are dumped.
Field Policy Count
The number of field policies available for a table policy.
A value of zero (0) indicates that there are no field policies available for that table policy.
For a CDC table policy in a .cd file, the following fields are ignored:
*_Policy-Id
*_Last-Modified
*_ObjectId
*_First-User-Field
Though the _Policy-Instance field is dumped, it can be overridden when loading the .cd file.
Note: You cannot set the _Policy-Instance field value directly. To set the required _Policy-Instance field value, you must change the _Policy-State field value during the loading process.
In the _Cdc-Table-Policy table, the name of the source table is identified from the _Source-File-Recid, and the data and index areas are identified from the _Area-Ianum and _Index-Area-Ianum fields.
*Subsequent rows — Contain information of the field policies associated with the CDC table policy. These rows have an identifier or tag called “Field” as a prefix to identify that the policies are field policies, followed by the name of the CDC policy name that they belong to.
Each column in these rows appears in the following order:
Column
Description
Field
The identifier or tag to identify that the policy is a CDC field policy.
Policy Name
The name of the corresponding CDC table policy.
Field Name
The name of the field.
Identifying Fields
Indicates if the Identifying fields are available for the policy.
The values are from 1 to 15.
Misc Fields
This is an extent [16] field and the values are non-editable.
All values of _Misc fields for _Cdc-Field-Policy are dumped.
For a CDC field policy in a .cd file, the following fields are ignored:
*_Policy-Id
*_Field-Position
*_Field-Recid
In the _Cdc-Field-Policy table, the name of the field is identified from the _Field-Recid field.
*Trailer — Contains information of the .cd file such as its name, the number of CDC table policies available in the file, the name of the database from which the policies are dumped, time and date when the dumping process completed, and format of the code page.
Each row in the trailer appears in the following order:
Row
Description
filename
The name of the .cd dump file.
records
The number of CDC table policies available in the dump file.
ldbname
The name of the database from which the policies are dumped.
timestamp
The time and date when the policies are dumped.
numformat
The numeric format
dateformat
The format of the date when the policies are dumped.
cpstream
The format of the code page in which you want the CDC policies to be dumped.
The following example displays the contents of a sample .cd file:
"Table" "cust" ? 0 0 "Customer" "PUB" "Order Index Area" "Order Index Area" no 0 ? "PUB" no ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0
"Table" "pol" ? 0 0 "Order" "PUB" "Order Index Area" "Order Index Area" no 1 "myCT" "PUB" no ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2
"Field" "pol" "Carrier" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
"Field" "pol" "Cust-Num" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
.
PSC
filename=sptest
records=0000000000002
ldbname=sptest
timestamp=2016/11/24-21:06:42
numformat=44,46
dateformat=mdy-1950
cpstream=ISO8859-1
.
0000000377