# PYRD - xxxxxx04

This is a series of common codes used to define arithmetic steps that can be added to existing report column definitions. For example, two columns can be added together or subtracted one from another. A column value can be multiplied by a decimal constant. Up to 5 such calculation steps (maximum) may be defined for each of the 10 columns. For example, step 1 may be to add columns 1 and 3 together and place the result in column 4. Step 2 may be to multiply column 4 by 1.234. As many common codes as are needed may be set up in the range PYxxxxxx04 - 99.

The calculation steps will be applied in the order specified in the common codes. All values specified in common codes PYxxxxxx02 and PYxxxxxx03 will be resolved first, then the calculation steps applied. The calculation steps will only be applied at the lowest level of subtotal that prints on the report. All higher-level subtotals will simply be accumulations of those low-order subtotals.

**Code Category: PYRD**

**Code Value: xxxxxx04** (Where "xxxxxx" represents the user-defined Report Name).

Short Description: Not required.

Medium Description: Not required.

Long Description: Not required.

**Associated Numeric Values**

1-5: Set to the column number that will hold the result of the calculation step.

**Associated Codes**

1-5: Calculation steps are defined in the Associated Codes. Steps may be defined two ways:

"Numeric operator between two column references

C1 + C3 (add column 1 to column 3)

C1 - C3 (subtract column 3 from column 1)

C1 * C3 (multiply column 1 by column 3)

C1 / C3 (divide column 1 by column 3)

C1 : C5 (sum of the columns 1 through 5)

Numeric operator between one column reference and a decimal constant.

C3 + 2.25 (add 2.25 to column 3)

C3 * .0056 (multiply column 3 by .0056)

Etc.Any step that results in an attempted division by zero will be noted on the report line with "Divide / 0" and the result will be treated as zero.Any step that results in a value too large to fit on the report will be noted on the report line with "size err ," though the value will be accumulated as calculated.

**Associated Descriptions**

1-5: Alternate column titles may be defined in the first 10 characters. The last step that holds any characters in those 10-character positions will replace the original column title.

The 30th character position may be used to specify the decimal precision for the column. Valid entries here are 0-5. The last step that holds any such character will be used to specify the decimal precision for the column. If not specified, the decimal precision for a column using math steps will be set to 2 places.