Kourier Integrator Online Help

Using Guide with UniData Indexes and Net Change

Kourier Integrator leverages the native UniData Index capability in order to track record-level changes to a net-change-enabled file. The OS-level UniData tool Guide ( guide_ndx ) is provided with UniData in order to check the physical and logical integrity of UniData indices. However, when running guide_ndx against a net-change-enabled file, care must be taken to prevent all records from being marked as changed.

When a UniData file is enabled for Net Change, a new UniData index is created with the name KCL_INDEX. The actual index is never populated. Instead, Kourier uses this index as a "hook" to track changed records in a separate file.

The easiest way to check UniData indexes is by using the "all" option for guide_ndx, which will check all indices for a specified file, including KCL_INDEX. For example, at the operating system shell, you could enter the command:

guide_ndx -x3,all PARTS

If your PARTS file was enabled for Kourier Net Change, the result would be that all records would be flagged as changed, and would be exported the next time the Kourier Service ran the associated Export in Net Change Mode. To prevent this from happening, the best practice is to specify the indexed fields rather than using the "all" qualifier. In order to do this, you should first determine what indices have been defined for the specified file. From ECL (TCL), execute the command LIST.INDEX filename. For example, the command LIST.INDEX PARTS could return the following:

Alternate Key Index Details for File PARTS Page 1

File.................. PARTS
Alternate key length.. 20
Node/Block size....... 4K
OV blocks............. 1 (1 in use, 0 overflowed)
Indices............... 3 (0 D-type)
Index updates......... Enabled, No updates pending

Index-Name...... F-type K-type Built Empties Dups In-DICT S/M F-no/VF-expr....
DESCRIPTION      V      Txt    Yes   Yes     Yes  Yes     S   F1
COM_CODE         V      Txt    Yes   Yes     Yes  Yes     S   F23
KCL_INDEX        V      Txt    Yes   No      Yes  No      S   SUBR('KCL.UPDATE
                                                              LOG','/dbms/live
                                                              /KFC-3.03/KT_CHG
                                                              LOG/PARTS',@ID)

In this example under Index-Name the following index-Name fields are displayed: DESCRIPTION, COM_CODE, and Kourier's Net Change index KCL_INDEX. So, best practice would be to run guide_ndx from the OS shell using the command:

guide_ndx -x3,DESCRIPTION,COM_CODE PARTS

The end result would be that all UniData indexes other than KCL_INDEX would be checked for both physical and logical integrity.

For more information about the guide_ndx tool, please see the Administrating UniData documentation for your operating system. Look in the chapter on Managing UniData Files, under UniData Detection Tools.

Related Topics: 

Kourier Integrator Setup and Administration

KT.SETUPNETCHG

Kourier TCL Commands Overview