New flexibility in charges

With V7 of RA introduces three new types of charges:


Image - users can be charge for running a specific program. Charge rates for programs can be different for prime/nonprime and interactive/batch.

Monthly fixed charge - a new field in the client.dat file can contain a dollar amount that will be added to the users charges each month.

User defined fixed charges - a new dcl level utility has been added that allows you to enter your own charges into RA’s accounting data. For example, the utility can be added to DCL menus to add a charge when specific menu items are executed. It is also possible for a privileged user to add fixed charges for any account.

Each of these new charge types is explained in detail in this section.


Image charges

There are two steps that must be taken before image level charging can be included in your RA reports. For purposes of this section assume that we want to charge a user any time they run the DCL Differences utility. The two steps necessary to set this up are:

Adding the images to the RA image charge rate file
Installing the images with the /accounting flag

Adding images to the RA image charge rate file

Any images can be added to this file. The charge rate maintenance program is entered from the RA menu; at this time charges cannot be added from the DCL level. Charge rates are in dollars and can be entered to four decimal places. Before starting the program you should determine the following:


       the image file (complete path), in our case SYS$SYSTEM:DIFF.EXE
       the image (name portion only), in our case DIFF
       who should be charged, charges can be defined for specific usernames, accounts or groups; wildcards can be used
       what the charge rate should be, up to four different rates can be entered: prime-interactive, prime-batch, nonprime-interactive and nonprime-batch

An example of a  completed form for the differences program follows. Notice that the nonprime batch usage is charged $0.0000.


By adding the charge as an asterisk (*) at the username level any entries for this image under account or group will be ignored. If the charge were added at the group level entries for account or username would take precedence. If the charge were added the the account level entries for username would take precedence. In this case any users running the differences program in batch after hours would not be charged.
To add this entry:

$ ra /menu
select “Modify Image File”
type “A” to Add an entry, the completed entry would look like this:

after hitting the <return> key the screen will show all the current entries.


Enabling accounting for a specific image

The Install utility in OpenVMS supports image level accounting on specific programs. The overhead associated with this is significantly smaller than enabling image accounting system wide. For our example we added the differences command:



Determine the exact image name:
    $ dir sys$system:*diff*.exe

    Directory SYS$COMMON:[SYSEXE]

    DIFF.EXE;1     

    Total of 1 file.

Define a symbol for install that will start the utility in command mode and then run install

    $ install :== $sys$system:install.exe /command_mode
$ install
INSTALL>

Check to see if the image is already installed by listing it

    INSTALL> list sys$system:diff.exe

    DISK$ALPHAVMS015:<SYS0.SYSCOMMON.SYSEXE>.EXE
       DIFF;1           Open Hdr

If the image is found issue the REPLACE command to add the account flag. If it is not found use ADD instead of REPLACE.

INSTALL> replace sys$system:diff.exe /open /head /account

List the image again to verify that the account flag has been properly set and then exit back to the DCL level.

    INSTALL> list sys$system:diff.exe

    DISK$ALPHAVMS015:<SYS0.SYSCOMMON.SYSEXE>.EXE
       DIFF;1           Open Hdr                               Acnt
    INSTALL> exit

From this point until the next system reboot anytime a user runs the differences command an accounting record will be created. During processing whenever RA encounters an image level accounting record it will check the image charges data file and add those charges. Any image accounting records that do not match an image in the image charges data file will be ignored.

You should edit sys$manager:ra_site_logicals.com (this file does not get replaced during RA installations or upgrades) or sys$manager:ra_startup.com (this file does get replaced during installations and upgrades) to include the install commands necessary to add or replace the accounting entries whenever your system is rebooted.
Reporting Image Charges
All RA V7 reports have been modified to include the image charges in the reports. A single charge amount is reported in its own column or row depending on which report has been selected. The account and revenue reports group image charges in with processing charges. A new image charges report has been added that shows details of each users image charges. A sample of this new report is included in Appendix E.


Monthly Fixed Charge

The client.dat file contains a new monthly fixed charge field in the user charges record. Any amount entered in this field will be included in that users charges for the month.

RA normally omits any users that have no OpenVMS accounting records when processing data and generating a save file; this means that any users that don’t have disk charges and haven’t logged in are excluded from reports. To guarantee that users with a monthly fixed charge are included in RA reports, whether or not they have other resources charges, a new command procedure has been added; RA_COM:RA_MONTHLY_CHARGE.COM. Execute this command procedure at the DCL level and you will be prompted for a queue. The job will then run and resubmit itself to run everyday; it includes a check that will prevent it from adding duplicate charges.

All RA V7 reports have been modified to include the fixed charges in the reports. A single charge amount is reported in its own column or row depending on which report has been selected. The account and revenue reports group fixed charges in with processing charges. A new fixed billing report has been added to provide details on each users fixed billing charges. A sample of this new report is included in Appendix E.

User Defined Fixed Charges

RA V7 includes a utility that allows fixed charges to be added from the DCL level. Unlike the monthly fixed charge feature any number of these charges can be generated for a user. The utility was primarily added at the request of sites that don’t charge for resource usage but wanted the ability to charge users according to what options they chose within a menu system. A new report that shows details of these charges for a user or users has been added. The syntax of the command to add these charges follows, if an item is enclosed in square brackets “[]” it is optional:

$ RA_CHARGE -    command verb
[/USERNAME=USERNAME] -    user charge is for
    [/DESCRIPTION= “TEXT DESCRIPTION”] -    description of charge
    /CHARGE=0.00    dollar amount to be charged

If username is not specified the current username will be used (ie: in menu systems the username qualifier does not need to be included). If the description is omitted it will be considered blank and the fixed charges detail report will not contain a description for this charge. The /charge qualifier is not optional; any command that does not include it will generate a DCL level error. Only users with sufficient privileges to access the ra_dat directory and the SYSUAF file are abke to add charges for a username other than their current username.

All the standard guidelines for DCL commands apply: if the text description includes spaces or nontext characters it should be enclosed in double quotes, the command may appear on one line or multiple lines as long as it doesn’t exceed 256 characters, the qualifiers may be specified on the command line in any order and the command is not case sensitive. If you did not install the RA command in DCLTABLES during the installation/upgrade you will receive the following error message when you try to add charges:

    %DCL_W_IVVERB, unrecognized command verb _ check validity and spelling
     \RA_CHARGE\

If this error is received an entry to make the command verb available needs to be added to either your menu, user login.com file for users that will be calling the utility or your system wide login sylogin.com. This entry would be:

$ set command ra_cdu:ra_charge

This makes the ra_charge command verb available to the process that gives the command until the user/process logs out.