Maintaining an Audit Trail

Maintaining an audit trail is often desirable when printing checks or generating invoices. The @C print code makes it possible to track the forms created with a forms generation statement by maintaining a separate audit file that contains information about each form. This is done by assigning a serial number to each form as it is generated. An @C print code does two things:

Instead of printing the specified attribute value on the form at the location specified by the x- and y- coordinates, it stores the value in the audit file.

It prints the serial number on the form at the location specified by the x- and y- coordinates.

These serial numbers uniquely identify each form and make it possible to track forms individually or as a group. Serial numbers are used as item-IDs for items in the audit file.

When a forms generation statement includes an @C code, the system prompts for the name of the audit file and the starting serial number. If the name of the audit file is not input, the system will not generate the forms. If a starting serial number is not input, 0 (zero) is assumed. If the serial number is not to print on the form, replace the x- and y- coordinates with (–1).

To create an audit trail:

  1. Create the audit file before entering the forms generation statement. The audit items are added to this file as the forms are generated.

  2. In the forms generation statement, use the @C print code with the attributes to track. The data for these attributes is stored in the audit file, but does not appear on the forms. When more than one attribute is tracked the system generates only one serial number per form.

  3. Specifying x- and y- coordinates with a @C-formatted attribute, the serial number is:

  4. Suppress the display of the serial number on the form and maintain it in the audit file by entering -1 in place of the x- and y- coordinates.

  5. Audit file items have the format:

    Part of Item

    Contents

    Item-ID

    Serial number.

    Attribute 1

    0

    If this page is not the last page of the form.

    1

    If this page is the last page of the form.

    A

    If this page was part of the printer alignment process.

    Attribute 2

    Current system date in internal format.

    Attribute 3

    Current system time in internal format.

    Attribute 4

    Data for the first @C-formatted attribute in the forms generation statement.

    Attribute 5

    Data for the second @C-formatted attribute in the forms generation statement.

    Attribute n + 3

    Data for the nth @C-formatted attribute in the forms generation statement.

    If a serial number already exists as an item in the audit file, the system overwrites the old item with the new one. Otherwise, new items are added to the file.

Example

In this example, we print employee checks and create an audit trail of the weekly payroll.

The audit file items must contain the ID number of the employee receiving the check (ID#) and the amount of the check (NET-PAY). The checks will be serialized according to the numbers automatically generated by the system. These serialization numbers print on the checks in place of the employee ID#.

To accomplish this, use the forms generation statement:

>SFORMS EMPLOYEES BY LAST-NAME @C(9,5):ID# @C(-1):NET-PAY @(51,5):DATE

 @(12,10):FULL-NAME @(48,10):NET-PAY @(3,12):NET-PAY-SPELLED (BP)

Background File & Item>CHECK.FORM

Audit File>PAY.AUDIT

Starting Number>4500

Notice that the attribute NET-PAY must be entered twice in the SFORMS statement. The first print code, @C(–1):NET-PAY, includes the amount of each check in the audit file; the (–1) which prevents the serial number from being printed a second time on the form. (The serial number is printed using the print code @C(9,5):ID#). The second print code, @(3,12):NET-PAY, prints the check amount on the form.

The checks print in ascending order by employee last name. The data for two attributes is recorded in the audit file (ID# and NET-PAY), but the serialization number appears on the forms only at the location specified for ID#.

The printed checks contain:

The forms generation statement also includes the B option and specifies a background form for the checks called CHECK.FORM, and the P option, which sends the checks to the printer. The audit file is called PAY.AUDIT and the starting serialization number is 4500.

The system prints the checks and creates the audit file items. A sample audit file item might look like this:

   4504

001  1

002  7438

003  180467

004  133326

005  54789

This PAY.AUDIT item corresponds to the fifth check printed (#4504). 7438 is the system date and 180467 is the system time, both in internal format. Line 4 contains the employee’s ID# (133326), and line 5 contains the amount of the check ($547.89).

The 1 in line 1 indicates that this check was the last check generated for this file item. When a file item generates multipage forms, each page gets a unique serial number with a corresponding audit file item. For example, if a file item generated a three-page form, the audit file items for the first two pages would have a zero in line 1. The third and last audit file item would have a 1 in line 1.

See Also

Special Features of Forms Generation

Creating a Background Form

Aligning the Printer