Progress/400
Product Guide
How Progress/400 Maintains Word Indexes
Progress/400 word indexes are maintained by a Progress-supplied trigger program and the Progress-supplied Word Index Support Processor. When you create a word index for a physical file, triggers are added to the file using the OS/400
ADDPFTRG
(Add Physical File Trigger) command. The Progress PROWISTRG program then becomes the trigger program for after-insert, after-delete, and after-update events. This ensures the maintenance of any Progress/400 word indexes defined for a physical file whenever the file is changed. DB2/400 triggers are used because they greatly minimize the impact on your existing AS/400 applications. DB2/400 triggers provide a method that Progress uses to “hook” into your file updates.DB2/400 triggers are fired before or after a record is created, updated, or deleted. This allows the Progress/400 trigger program to be called whenever a word index update is required. Triggers are not fired when a transaction is rolled back using any OS/400 ROLLBACK operation or the Progress UNDO statement; however, Progress handles all ROLLBACKs properly. The process used to maintain Progress/400 word indexes depends on whether commitment control is in effect:
- If commitment control is not in effect, the word index update is performed in the trigger program before control is returned to the application program. This operation is synchronous. Therefore, control is not returned to your program until the trigger program completes its work.
- If commitment control is in effect, the trigger program updates the Progress-supplied Trigger Transaction file and the Word Index Support Processor, then performs the actual word index updates. Control is returned to your program after the Trigger Transaction file record is written.
NOTE: If the trigger program detects that commitment control is active but the Word Index Support Processor is not running, the trigger program sends an escape message to the application program indicating that the trigger program failed. If your application does not handle this escape message properly, your application might fail. If your application uses commitment control, files that are opened under commitment control cannot be updated if the Word Index Support Processor is not running.The Word Index Support Processor
The Progress/400 Word Index Support Processor updates Progress/400 word indexes if the physical file is opened for update with commitment control active. The Word Index Support Processor consists of two perpetual jobs that are started using the Progress-supplied STRWISPRC utility. (For details, see its description in AS/400 Utilities.") Once these jobs are running, they process all transaction COMMITs that your application performs that affect DB2/400 files with Progress/400 word indexes built over them:
These jobs use a Progress/400 library called the Word Index Work Library.
NOTE: If the AS/400 crashes, you might not be able to restart the word index processor. If this occurs, call Progress Technical Support.The Word Index Work Library
The Word Index Work Library is created when Progress/400 is installed on your AS/400. You are prompted for a library name (the default is PROWISWRK), then the install process creates the named library and places into it the objects required by the Word Index Support Processor.
NOTE: Do not rename, delete, move, or change these objects in any way or word indexing will not work.The objects in the Word Index Work Library include the following:
These objects are static and are always in the Work Library. In addition, some dynamic objects are placed in this library while the Word Index Support Processor is running.
Multiple installations of Progress/400 can share the Word Index Work Library.
Preventing Word Index Corruption
Certain OS/400 commands will corrupt a Progress/400 word index or cause Progress/400 word indexing not to function when they are run against:
If you run these commands, you must follow specific recovery procedures to fix the problems that they cause. Table 2–8 documents the commands, the resulting problems, and the recovery procedures.
For descriptions of the utilities noted in the recovery procedures, see AS/400 Utilities."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |