z/OS allows you to specify an accounting string for charging back the mainframe resources that particular users consume when connected to DB2 through StarSQL.
The Accounting variable can be set to a user-defined suffix of the full accounting record.
An accounting string contains a system-generated prefix and a user-generated suffix. Together these provide the information needed to associate resource usage with a user's access for charge-back accounting. The accounting string is passed in the PRDDTA parameter of the ACCRDB DRDA command. It is stored as an accounting record on the mainframe.
The prefix consists of 56 bytes and is generated by StarSQL. The fields are right-padded.
Field Name |
Field Length |
Description |
acct_str_len |
1 byte |
Length of the accounting string minus 1, in hexadecimal format |
client_prdid |
8 bytes |
Product ID of the driver, for example "StarSQL2" |
client_platform |
18 bytes |
Client OS, for example, "Windows" |
client_appl_name |
20 bytes |
Client application, for example, "mypgm" |
client_authid |
8 bytes |
Authorization ID of the StarSQL user |
suffix_len |
1 byte |
Length of the accounting string suffix, in hexadecimal format |
The user-defined suffix further refines the accounting record. The user enters the suffix into the accounting string field in the data source setup wizard. In the following sample accounting string, the user-supplied suffix is "SALES":
x'3C'STARSQL2Windows mypgm BARNES x'05'SALES
The next sample shows an accounting string with a null suffix. A null suffix is passed if the user leaves the accounting string field in the data source setup blank.
x'3C'STARSQL2Windows mypgm BARNES x'00
For information about interpreting the accounting record on DB2, see the "Accounting for Distributed Data" section in IBM's DB2 for z/OS Reference for Remote DRDA Requesters and Servers and the DB2 for z/OS Administration Guide.