I do the billing for all of my machines from an OpenVMS platform.  Here are
a few additional tools that are used to do this, starting with the seat
records from the Unix machines. 

NOTE:  Define a logical SEAT that points to the directory where all of 
these tools are located, and where the raw2sum, sum2pay, and pay2cost
executables are found.

COST.DAT              Contains the cost per minute for the pay2cost program.

APPEND_GROUP.COM      Look up the group for each user and append it to the
                      end of each line for a RAWMINUTE, SUMMINUTE, 
                      PAYMINUTE, or BILLING file (all .DAT).
                      P1 is infile, default is BILLING (logical or BILLING.DAT)
                      P2 is outfile, default is infile

GROUP_FOR_USER.COM    Look up the group for each user and replace the user
                      field with that group (or "unknown") in a 
                      each line of a RAWMINUTE, SUMMINUTE,
                      PAYMINUTE, or BILLING file (all .DAT).
                      P1 is infile, default is SUMMINUTE
                          (Logical or SUMMINUTE.DAT)
                      P2 is outfile, default is infile

BILL_BY_GROUP.COM     Starts with SUMMINUTE.DAT, replaces all users by 
                      groups, runs that through sum2pay to merge all 
                      group records, then through pay2cost to get the final
                      charges.
                      P1 is infile, default is SUMMINUTE
                          (Logical or SUMMINUTE.DAT)
                      P2 is outfile, default is GROUP_BILLING (.DAT)

BILL_BY_USER.COM      Starts with SUMMINUTE.DAT, runs that through sum2pay
                      to merge all group records, then through pay2cost to
                      get the final charges.
                      P1 is infile, default is SUMMINUTE
                          (Logical or SUMMINUTE.DAT)
                      P2 is outfile, default is BILLING (.DAT)
