Kourier Integrator Online Help
SUBROUTINE KCL.UPDATELOGT(FILE.POINTER, KEY)
This subroutine can be used to maintain the Kourier Net Change file associated with an application file that has a UniData or UniVerse trigger subroutine.
Before you can use this subroutine in an RDBMS trigger it must be cataloged in each account where users log in to your system or globally cataloged.
FILE.POINTER |
You must pass a file pointer to the Kourier Net Change file associated with the application file where a trigger has been added. There are two techniques that can be used from UniBASIC to do this: OPEN or OPENPATH. The OPEN method requires that each account where a users logs into has a VOC pointer to the KT_CHGLOG file. The OPENPATH method allows the KT_CHGLOG file to be opened by specifying its path without having to create a VOC pointer in each account where users log into. |
KEY |
The item-id of the record to be written to the application file. |
FILE.POINTER |
Unchanged |
KEY |
Unchanged |
If your trigger program updates other files (e.g., a trigger on ORDER.LINES updates the file ORDER) and you meet any of the following conditions:
AND you need to track Net Change on the updated file (e.g., ORDER), you will need to:
In this example, the application file TERRITORY has an RDBMS trigger and we are using the OPEN keyword.
*
* MYFILE is the current filename.
*
* RECORD.ID is the current record ID.
*
* --------------------------------------------------------------------
* This part goes in the initialization section of the Trigger program
*
CALL KCL.OPENLOG(MYFILE,F.KCLLOG,KCL.LOGFILENAME,KCL.ERR,KCL.PARAMS)
KCL.ISOPEN = (KCL.ERR = '')
*
* End of initialization section
* --------------------------------------------------------------------
* This line goes at the end, just after all other trigger-related
* work is completed.
*
IF KCL.ISOPEN THEN CALL KCL.UPDATELOGT(F.KCLLOG,RECORD.ID)
*
* End of final section
*