Skip to Content

L3 – Report Listing with Output Database Updating

Datafile Software

L3 – Report Listing with Output Database Updating

This report, also commonly known as the ‘Sort & Slot’ report, is in some ways a combination of the standard report listing previously discussed and the global update option to extract between database records.

Standard reports may become complicated if you require sub-totals only; for instance a month-by-month analysis of sales performances, sub-divided by product group. This report option allows you to create a new file which is effectively a summary of information for an existing file. In this example the summary file would contain a record for each sales person / product group with a data item for each month for the full year. The report could then be run monthly, summarising the transactions from the sales invoices for each sales person / product group and showing the details updated.A separate report can then be run as required on the summary database.

Screen 1 – Introduction

The first screen has no parameters; instead it displays a summary of the procedures required in configuring this report definition.

Screen 2 – Update Parameters

Which Database Number to be Updated

Select the database number, from within the applications location of files, which is to be updated.

Omit Printing of the Report Listing

The report printed as part of this update is based on the input file whereas you may be running this procedure to create a report on the outputfile in a following procedure. Set this option to omit the print of the report listing if not required.

Only Update Output if New Record

Set to only update the output file if a new record is to be created.

Create New Records

If Merge, Create New if No Match

If Create, Erase Existing Records

The update of the output file may take the form of creating new records (setting the first prompt) or updating existing records (leave the first prompt unset). If updating the existing file then you can set to create new records if there is no record available to update (setting the second prompt). If creating new records you may want to erase any existing records in this file (setting the third prompt) or leave blank to append the new records to the output file.

Only Copy = Items if Creating New Record

Copy items set later can copy directly from the input file to the output file replacing the existing value or, when copying numeric values, can be added or subtracted from/to the existing value on the output file. Set to only copy the = (replacing) items on creation of a new output record.

Update at Sub-Total Level

Leave blank to update the output file for each input record (subject to usual selection criteria options).Set to update the output file for each subtotal (as set on the report definition) on the input file.

Input Data Item for Output Prime Index

Reference the data item on the input file that is to be used as the output file prime-index (used for determining whether to create a new record or update an existing record).

Use System Slot for New Index Created

Input Item for Slot Ref

As an alternative to creating a new index based on an item on the input file you can create based on an incremental reference set on a slot number. You can set either the slot number (1-16) to be used against the first prompt or, alternatively, reference an input on the input file that contains the slot reference to use. Note that if using a slot reference an output record would be created for each input record (or sub-total if set), and new records would be created (no match/merge).

Audit the Updated Database when Complete

Usually set when using an indexed (either prime or secondary index) output file.

Update Database Item-No for Date Added

Update Database Item-No for Date Updated

These options allow update of the input record with the current date when it is used to either create or update an output record.

Allow Item Updating to be by an Offset

Prompt for "Offset Number” this run

Highest Offset Number Allowed

Offset from Data Item Number (not keyboard)

When analysing values into a summary file you will often want a separate total for each month / period.For example if analysing turnover for a particular salesperson you might want total sales for January, February, and so on. This option allows this facility.

To update by offset set the first parameter. The second parameter allows for input of a keyboard prompt, offered to the operator at run-time, to ask for the offset to be used on this run – i.e. ‘Enter period number to update’. The third parameter asks for a maximum offset allowed (if offset value used is greater than this then the set highest offset is used in processing). The fourth parameter allows, as an alternative to prompting the operator for the offset, the referencing of a data item on the inputfile to take the offset number from.

Screen 3 – Update Copy Items

Here the items to be updated are specified, a maximum of 32 items can be defined. For each item you need to enter the data item on the input file to be copied, the operation to be carried out (=, + or -), the item on the output file to be updated and whether this item is to be updated on an offset or not.

From-Item

Select the item on the input file that is to be copied. <F4-Select> is available. If updating on a sub-total level you can enter $REC-COUNT for the total number of records that are being updated.

Oper

Set how the input value is to be processed:

= Copied directly to the output file replacing any existing value.

+ input value is added to existing value in the output file

- input value is subtracted from the existing value in the output file

# when updating at sub-total level update item on outputfile from last n records on the

input file (where n is number of records set on the update parameter screen).

Update Item

Select the item on the output file to be updated. <F4-Select> is available. If to be updated on an offset basis then reference the first in the consecutive range of data items that are to be updated.

Offset

Set to Y if this item is to be update on an offset basis. If the offset value is 1 (or 0) then the selected item is updated, if 2 then the next item on from the selected data item is updated, and so on.

Note

The remainder of the specification matches that of the Standard Report Listing discussed earlier. Remember though that the sorting / subtotal items would usually be set based on the input data item you are using as the output prime index.

  • Release ID: Standard