Home » Categories » Solutions by Business Process » Profiler

G1 – Global Update to a Database

Datafile Software

G1 – Global Update to a Database

The global update process allows you to process and update all records in the database, subject to selection criteria and test conditions, in one process. Over 160 entries you nominate the data item you wish to process, how you want it to be updated and with which value, and set conditions on when the update is to be applied.

The update definition is in several stages, the first of which allows you to define the items to be updated.

Data Item

Select the data item to be processed. <F4-Select> is available as required.

Calc

Set automatically to ‘=’ for non-numeric values, for numeric items (K, L, M, N and J item types) you can also select whether values are to be subtracted, added, multiplied or divided.

‘=’ updates the selected data item directly with the entry within the ‘From Item / Value’

‘-‘ subtracts the ‘From Item / Value’ from the current value within the data item.

‘+’ adds the ‘From Item / Value’ from the current value within the data item.

 ‘/’ divides the current value within the data item by the ‘From Item / Value’

 ‘*’ multiples the current value within the data item by the ‘From Item / Value’

Type From Item / Value

This option asks for the type of update for this entry and the values to be used for updating.Various types are available including:

K – Keyboard Entered Value. The text / value entered in the From / Item Value is updated into the selected data item (or used to multiply etc. the value in the selected data item as appropriate). Note that whilst an item may be selected for update more than once you can only specify one keyboard value per individual data item.

D – Data Item. Allows you to select another data item on the record as the ‘From Item / Value’.Data items must be consistent in type – you can’t update a numeric item from a text item etc.

B – Blank a Data Item Value.Allows you to clear the contents of the data item (or reset to zero for numeric items)

L – Lookup Item. Similar to item ‘D’ above in that you are updating the selected data item from another data item. In this case, however, you are updating from another database for which a lookup relationship is defined within the Data File Profiles. When you choose an ‘L-Lookup’ Type you will be prompted for the database you wish to update from.

C – Check Digit. This option allows for the generation and validation of a Modulo-10 Check Digit against an X/Y-type data item. The check digit generation takes the data item, checks that all values (apart from the last) are numeric, and reading from left-to-right adds up the alternate digit values and multiplies the result by 3. The remaining values are then added together and the two totals added together. The check digit is then generated from the last significant value of the total subtracted from 10. The updated data item then has the check-digit appended to the existing value (replacing the last value as appropriate).

S – Sequence Number. A sequential number will be written to all the records processed in the global update.The starting number is held in the definition and will be the next prompt. After a global update the new number is written back to the definition file.

F – Fixed Lookup. Similar to the ‘L’ lookup above allowing the item to be updated from another database. The Lookup option relies on the item set in the Data File Profiles as the lookup key (the update coming from the data item on the lookup database that has a matching value to that of the lookup key). This option allows you to select the lookup key to use where more than one lookup key is recorded on the database.

U – Convert to Upper Case. Converts the content of a text data item into upper case characters.

$ - System Wide Slot Number. Similar to the S-Sequence option above except that the values is incremented per record rather than run and the base value is held in a separate file that holds up to sixteen references that can be accessed in various options throughout the system. When you select this type you are prompted for the slot number (1-16) to be used.

M – Master Data Item. Only available when the global update is being run against a detail file this option allows you to select a data item from the master file to be used when updating the data item.

Condition

Allows you to restrict the update entry to only apply under set conditions. <F7-Option> shows the conditions available. The conditions are defined against the database within the Application Profile and were discussed earlier in this manual.Conditions could be used to allow you to update the same data item more than once within a single definition – each entry only being processed once depending on the condition.

Each entry screen allows up to twelve entries to be defined. Once the 12th is complete, or you’ve pressed the <End> or <Page-Down> keys you will be prompted for the entry you wish to update.

The entry number for the next screen is prompted for you to accept if required – or you can overtype with another entry number as required – on <Enter> the system will then (re)display the data item entry screens.

Each entry is processed in turn on an update so you can need to add / delete entries within the list so that updates are processed in the ‘correct’ order. <F5> on the data item allows you to insert a blank entry within the list, moving subsequent items down one line. <F6> on the data item deletes the current entry and moves the following items up.

To complete the data item entry press the <Escape> key.

‘Yes’ moves you on to the next section of the update definition, ‘No’ returns you to the first entry in the data item update, whilst ‘Cancel’ exits the definition without saving.After the data item section the procedure moves on to the ‘File Processing’ section.

Item Name to Flag Record as Updated?

Select a data item from the input file, X-type or ?-type, that is to be updated with a ‘Y’ to show the record has been processed. This is then used, by default, in subsequent runs of the global update to not process the record again.

Omit File Lock on Database

When running a global update the system locks out the database preventing other operators accessing it whilst the update is proceeding to ensure data integrity. As an alternative to a file lock when a database is in general use you can apply a record lock, the system then proceeds on a record-by-record basis locking a record, updating the changes, releasing the record lock and then moving on to the next record. Locking individual records will however increase the time taken to process the global update.

If record locking you should use the ‘flag’ option above to identify whether a record has been processed or not (the update may be rejected for individual records if another operator is using them at the time).

Custom Point No (if applicable)

Enter custom parameter number as advised by your Datafile reseller otherwise leave blank.

The next section allows you to set and use record number ‘slots’ within the update. These ‘slots’ are counters stored against the database and can be used to increase the speed of an update, so historical records aren’t reprocessed and to speed subsequent follow-on procedures.

Each database has 10 slots that can be used – but note that the standard applications will be using these slot numbers also (the sales transaction file for example uses slots 1-8 as part of general processing) so care should be taken when using this option on standard application databases.

Store Highest Record Number Updated in Which Slot (1-10)

Set the slot number to be updated with the highest record processed. Once saved this can be used in the next prompt as the starting point for the next update run.

Start from Record Number in which Slot Number (1-10)

Set the slot number for which to start processing the update from (in fact it starts from this value plus ‘1’ to start on the next record). It is usual to set both this and the previous parameter to the same slot number where no subsequent procedures are to use the same set of records.

Store First Record Processed in Slot Number (1-10)

When running a series of procedures that are going to be reporting/updating the same set of data it can speed subsequent processes if you record the first record processed on the update into the slot numbers. This can then be used as the starting point in subsequent procedures.

Run-Time Prompts

The next section allows three-lines of text that are to be displayed to the operator recording the procedure that is to be run and show any required warning messages.

The next section of the global update definition controls whether the operator is allowed to make changes to the update at run-time.

Allow User Changes at Runtime to Above Updates

Set to allow the operator to make changes to the update definition when using the procedure at run-time.

Save Any Changes

Set, if allow changes, whether the changes made are to be saved and offered by default on the next update run.

The final section allows you to define criteria that are to be applied to the update as a whole.

Specify Search Criteria

Set up to six lines of criteria that are to be applied to the update definition – no record will be processed that doesn’t match the criteria specified here. The criteria are defined in the normal manner.

Allow Runtime Changes to Search

Set if the operator is to be allowed to change criteria at run-time

Save Any Changes

If the operator is allowed to make changes to the criteria set to save these changes for use on the next update run.

After the above are confirmed you are prompted

Respond ‘No’ to save the update definition, ‘Yes’ to go back to the data items to amend the definition or <Esc> to abandon without saving

Custom Fields
  • Release ID: Standard
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
User-Defined Report - Update Report Date to Constants
Viewed 1203 times since Mon, Nov 25, 2013
Links to Application Company / Ledger Enquiry Extra Applications
Viewed 1433 times since Mon, Jun 11, 2012
Configuration - User Defined Report Set-up
Viewed 1388 times since Fri, Jun 29, 2012
T – Table Updating
Viewed 696 times since Fri, Jun 29, 2012
Launch Web Browser from User-Defined Report
Viewed 2451 times since Tue, Jun 12, 2012
Database Utilities
Viewed 1267 times since Fri, Jun 29, 2012
Report ‘List Records’ Options
Viewed 1157 times since Wed, Jun 13, 2012
Copy Items Back to Lookup File (9902)
Viewed 1236 times since Fri, Jun 29, 2012
C – Constants Update
Viewed 762 times since Thu, Jun 28, 2012
Generate Stock Transactions (9909)
Viewed 1209 times since Fri, Jun 29, 2012