Report with Output Database Updating – Wait Record Locking for Update Database


Datafile Software

Report with Output Database Updating – Wait Record Locking for Update Database

The option ‘Report with Output Database Updating’, more commonly referred to as the ‘Sort & Slot Report’ exclusively locks the ‘to-record’ during the update process.This new option allows use of a transaction style lock process to control access to the ‘to-record’ allowing other users to continue using this record in other processes. This option is only applicable where the ‘to-database’ is a standard Datafile application database with a transaction file (such as the Sales, Purchase or Stock applications).

Installation

ProFiler Application – Location of Files

The transaction database used for the wait lock must be included within the application location of files. For example, if updating the stock file using the sort & slot report then you would also include the stock transaction file within the list of files.

ProFiler Application – User Facilities Definition

Within the definition parameters for the ‘Sort & Slot’ report the new option for the wait lock has been added to the report totalling parameters. The first parameter screen, however, does contain some important parameters that should not be set to avoid exclusively locking the ‘to-database’ file completely, these are:

Create New Records – leave blank to only merge records

If Merge, Create New if No Match – leave blank to only merge existing records

Update at Subtotal level – leave blank to update on a record-by-record basis

The report totalling parameter screen contains the new parameter following two existing parameters controlling the file locking process.

Flag Input Records as being Processed (Y) – Item Name – This option asks for a data item (required) on the input file to control record locking. The record is updated ‘Y’ if successfully updated.

Lock Records as Required (Otherwise will Lock File) – set to apply locking to input and output file on a record by record basis.

Control by "Wait” Locking an associated File Number – set the file number for the transaction file to be ‘wait’ locked when updating the ‘to-record’. When set the system only places a ‘U-Use’ lock on the to-record and places a ‘W-Wait’ File Lock on the transaction file to prevent update clashes in the same manner as standard application transaction procedures. Note that if the ‘to-record’ is ‘L-exclusively Locked’ then the process will skip that update until next run.


Custom Fields

Article ID: 282
Created On: Wed, Jun 13, 2012 at 11:26 AM
Last Updated On: Tue, Jun 20, 2023 at 5:44 PM

Online URL: https://kb.datafile.co.uk/article/report-with-output-database-updating--wait-record-locking-for-update-database-282.html