Previous Topic: INPUT Command-Input File NameNext Topic: LINECOUNT Command-Set Lines Per Page


INVOICE Command-Produce a Tabular Invoice Report

The INVOICE command produces a tabular invoice report using the cost factors you specify. A separate invoice is created for each identifier included in the report.

Each invoice:

When using the INVOICE command, use the COST command to specify a cost factor for each variable you want included in the invoice. Then, following the INVOICE command, specify each variable twice, once without the COST option and once with it.

You can include a summary page showing the total value and cost for each variable for all identifiers in the report. To include this information, specify the variable REPORT COST TOTAL as the last variable with the INVOICE command.

This command has the following syntax:

INVOICE [idoption[(identifiers)]] variable [options] [HDR(text)] [SORT order]
 [AND,variable [options] [HDR(text)]] [AND,...]
idoption(identifiers)

Includes any ID option that is valid for the variables you specify. You can specify one or more identifiers (separated by commas) to limit the report to a subset of the identifiers associated with the ID option. You can use generic characters when specifying identifiers.

variable

Includes any Report Writer variable. Each invoice in the report includes a row for each variable you specify.

options

Specifies any valid variable options. To get complete invoices, specify each variable once without the COST option and once with it. For more information about the COST option, see the COST Command in this chapter.

HDR(text)

Overrides the default description for the row for a variable. Replace text with the new description.

SORT order

Sorts the report. Replace order with one of the following:

AND,

Signals that another variable is being specified. The comma after AND lets you continue to the next line.

Example: INVOICE Command

The following commands create an INVOICE report containing one page for each of the transaction identifiers. Because the variable REPORT COST TOTAL is specified, the report also includes a summary page showing the total costs for all transactions.

INPUT(TAPEIN)
  COUNT 400
  COST TRAN USE  .01
  COST TRAN TCPU .25
  INVOICE TRANID TRAN USE  AND,
                 TRAN LIFE AND,
                 TRAN USE  COST AND,
                 TRAN TCPU COST AND,
                 REPORT COST TOTAL
  END
  RUN