Previous Topic: JR70TVA1 Control Statements

Next Topic: JR70TVA2 Report Sample


JR70TVA1 Execution Description

The control statements used in JR70TVA1 are described below. Complete descriptions of all CA JARS Wizard control statements can be found in the CA JARS Wizard Reference Guide.

PARAMETER

This control statement specifies options for a CA JARS Wizard run. XREF creates a cross reference of the data fields used in the run and the statements they are found in. This cross reference listing is printed in addition to the control statements and the report for the run.

INPUT

The INPUT statement identifies the CA JARS Wizard glossary or the input files for the run. In JR70TVA1, the INPUT statement lists the JR70CBF glossary as the glossary for the primary input file for the run.

DEFINE

11 DEFINE statements are given in JR70TVA1. Each define a field for the run.

The first nine DEFINE statements define fields for the debit record:

1. OFILL1:

One byte field. Initialized as a blank.

2. ODEBIT:

Eight byte field. Initialized as DEBIT. This field identifies the statement as a DEBIT statement.

3. OCPUID:

One byte field. Initialized as a blank: used to identify the CPU.

4. OUSERID:

Eight byte field. Initialized as blanks: used for user identification.

5. ODATE:

Six byte field. Initialized as blanks: used for the date (YYMMDD).

6. OJOB:

Eight byte field. Initialized as blanks: used for the job name.

7. OTIME:

Six byte field. Initialized as blanks: used for the time (HHMMSS).

8. PROGRAMMER:

Twenty byte field. Initialized as blanks: used to identify the programmer.

9. ODEBITAMT:

Six byte field. Initialized as zero: used for the debit amount.

The remaining DEFINE statements are

10. RENTDAYS:

Six byte field. Used to hold the number of seconds of tape volume usage.

11. USEDAY:

Six byte field. Used to hold the number of days of tape volume usage.

SELECT

SELECT statements indicate which records in the primary input file are to be processed. JR70TVA1 uses the JR70CBF glossary for combined billing. In JR70TVA1, the SELECT statement identifies the record type to be processed (T) and the subrecord type to be processed (M). This identifies the JR70CBF record type and subrecord type for the TVA billing records.

COMPUTE

Four COMPUTE statements are executed in JR70TVA1:

The first COMPUTE statement evaluates the value of the account number contained in the billing record. It also defines a new field, OACCT (16 bytes), and assigns a value to it based on the results of the evaluation. If the account number is blank, OACCT is assigned the value of MISC.ACCOUNT. Otherwise, OACCT is assigned the value of the account number.

Notice the (P) suffix code appended to the first compute statement. This suffix indicates that the COMPUTE should take place before the primary input file is sorted. This is needed since the SORT occurs on OACCT field.

The remaining three COMPUTE statements assign values to the fields: RENTDAYS, USEDAYS, and ODEBITAMT. RENTDAYS is assigned the value of the total number of seconds of tape volume usage for an account. USEDAYS is assigned the value of the total number of days of tape volume usage for an account; it is computed using RENTDAYS divided by the number of seconds in a day (86400). ODEBITAMT is assigned the charge for tape volume usage.

SORT

This statement identifies the sequence in which the input records should be sorted prior to processing. Here the sort is performed on OACCT (the account number) and T.VOLUME/SERIAL (the tape's volume serial number).

BREAK

This statement is used to define logical group of records. Here data is split into groups by OACCT. Records with the same account number is grouped together.

HEADING

HEADING specifies a title for the report. The title for this report is TOTAL TAPE SYSTEM CHARGES BY ACCOUNT.

LIST(SUM)

A summary listing is requested with the output file. Each line of the summary listing lists the debit information for a different account. The LIST(SUM) statement identifies the date fields to be summarized and printed. This data includes the:

OUTPUT

One debit record is produced for each unique account. All records are written to the file identified by ddname CAIJWOP. The OUTPUT statement lists the fields to be included in each debit record.