Previous Topic: COMMENT Command—Add a Comment LineNext Topic: COUNT Command—Define Number of Records


COST Command—Provides Charge-back Statistics

The COST command makes charge-back statistics available for any resource.

The following list provides usage information for the COST command:

This command has the following syntax:

COST [variable cost-factor [idoption(identifiers)]
     [RANGE(min,max)][SELECT(name)]]
     [variable cost-factor [DEFERRED]]
     [DISTRIBution value]
variable

Specifies any valid variable keyword. You can use variables defined with the DEFINE command when you specify the DEFERRED operand.

cost-factor

Specifies the monetary value associated with this resource. This value can include up to five decimal positions.

idoption(identifiers)

Includes any valid ID option specified with any valid identifiers.

RANGE(min, max)

Allows multiple cost factors for the same resource based on specified value ranges.

(min, max)

Defines the value range. Specify a separate COST command for each range.

SELECT(name)

Applies a period specified with an INCLUDE or EXCLUDE command.

name

Specifies the name assigned by the ID operand of the INCLUDE or EXCLUDE command. This operand functions similar to the SELECT option.

For more information, see the section SELECT Option—Specifying a Time Period for a Variable in the chapter “Tabular Reports.”

DEFERRED

By default, the cost-factor is applied to the data immediately as each record is read. Specifying DEFERRED causes the Report Writer to apply the cost factor after all the data has been read. If you specify DEFERRED, you cannot specify the idoption, RANGE, or SELECT operands.

DISTRIBution value

Creates a distributed cost report.

value

Defines the cost you want the report rows to total.

Specify the REPORT COST DISTRIBution variable to include a column in your report. This report shows the adjusted total cost for each row, with all rows adding up to the amount defined by value.

Example: Cost Commands

The COST commands in this example define the following cost factors:

The TAB command uses the two cost factors, creating a tabular report with a column showing the value of each variable for each transaction. The HDR1 and HDR2 operands assign those columns appropriate headings. The last variable, REPORT COST TOTAL, creates a column that shows the sum of the costs for each row in the report.