Com-plete Accounting Facility

#### Search Results

Search

# Com-plete Accounting Facility

This section describes the Com-plete accounting facility.

This document covers the following topics:

- Overview

- User ID Accounting Block

- SMF Records

- SMF Record Contents

## Overview

The Com-plete accounting facility provides data that can be used to distribute the costs of the teleprocessing system back to the user (terminal user, department, etc.).

Com-plete accumulates user resource utilization information on a user-by- user basis and writes this information to the System Management Facilities (SMF) file. All records are optional. You must specify which records to create and/or not to create by using the SMFRECORDS sysparm.

## User ID Accounting Block

The user ID accounting control block is created immediately after a user ID successfully logs onto Com-plete. The information from the logon information block is used to initially create this block.

The user ID account control block is maintained for the duration of the user ID's logon cycle (until *ULOG OFF). Information from this control block is used to create the SMF accounting control records.

Please refer to thedeliverd Com-plete source copy book CCUAB for details of the contents of this control block and the offsets of the various fields.

## SMF Records

The SMF accounting control records contain information about the resources used by a user ID during the life of the user ID cycle from *ULOG ON to *ULOG OFF. The information in each control block is initially taken from the user ID accounting control block.

Five types of resource utilization records can be written to the SMF file:

- The ULOG ON Record

- The Program Termination Record

- The Checkpoint Record

- The ULOG OFF Record

- The User Record

For assembler programs, the accounting records are mapped by member CCCSMF in the distribution source library.

### The ULOG ON Record

This record is written after each successful ULOG ON operation. It contains the standard SMF prefix and the following information:

- Terminal Identification number;

- User ID;

- Account number;

- Control status;

- Authorization code;

- Message and printout spooling class codes.

### The Program Termination Record

This record is written each time an application program or Com-plete utility program terminates. It contains the standard SMF prefix and the following information:

- Terminal Identification number;

- Thread number;

- User ID;

- Account number;

- Control status;

- Privileged program indicator;

- Abnormal termination indicator;

- Time program was invoked;

- Program name;

- Total CPU time since ULOG ON;

- Total thread occupancy time;

- Total number of EXCPs since ULOG ON. For z/OS systems, the SMF record contains the number of SIOs instead of the number of EXCPs. The number of SIOs is the number of times the z/OS channel scheduler was entered;

- Total count of data, in bytes, transferred to and from the terminal since ULOG ON;

- Total count of data in bytes, sent via message switching or printout spooling since ULOG ON;

- Total number of transactions for the session (number of times in the thread) including the use of the rollout function.

### The Checkpoint Record

This record is written once every n minutes for each user logged onto Com-plete, unless a program termination record has been written in the last n minutes or no activity has occurred for the user ID in the last n minutes. The checkpoint record contains the same information as the program termination record.

The checkpoint interval n is an installation variable defined at Com-plete initialization time using the SMFsysparm.

COM-PASS also produces a checkpoint record whenever a program is suspended. The checkpoint record can be examined at offset 63 (decimal). A "blank" (X'40') indicates a normal checkpoint. An "S" (X'E2') indicates a COM-PASS suspend record.

### The ULOG OFF Record

This record is written after a user issues a ULOG OFF. The ULOG OFF record contains the same information as the program termination record.

### The User Record

This record contains the standard SMF prefix followed by a freely definable area available for your use. The first half-word of this area must contain the length of this user-specific area (incl. length field).

In order to write the user SMF record, you must call (via TCALL) entry point ALSRBSMF (in COMREG) with the following registers:

Register |
--- | ---
0 | User SMF record (will be appended to common part before being written).
1 | 4 (user record indicator).
2 | COMREG.
4 | THCB.
5 | TIB.
13 | 18-F/W save area.
14 | Return address.
15 | Entry point.

## SMF Record Contents

This section describes the fields and their contents that are written in the Com-plete SMF records. The offsets of the fields in the record can be determined from the DSECT produced by the CCCSMF copybook.

- SMF Record Common Portion

- SMF Record Statistics Portion

### SMF Record Common Portion

The following fields are found in all SMF records written by Com-plete.

Field Name | Description of Contents
--- | ---
SFCRDWL | Contains the length of this record in binary format.
SFCSYSI | Contains the system ID. The following equates are available in the CCCSMF copybook and can be compared to the contents of this field to determine the operating system.
SFCOS390 | z/OS SYSTEM
SFCVSE | z/VSE SYSTEM
SFCTYPE | SMF record number as provided in the Com-plete sysparms in binary format.
SFCTIME | Time the record was written as a binary value representing the number 1/100ths of seconds since the start of the day.
SFCDATE | As a packed decimal value representing the date in Julian format when the record was written (i.e. 00YYDDDS).
SFCESYSI | Contains the 4 byte character SMF system ID.
SFCUSERI | Contains the 8 byte Com-plete user ID of the user for whom the record was generated.
SFCACCT | Contains the twelve byte account number related to the user.
SFCAUTH | Contains the user's authorisation code as a binary number.
SFCCNTL | Contains an indicator as to the control status of the user. The following values are possible:
C | Control user
N | Noncontrol user
SFCSNEWF | Contains an indicator to determine whether the record is of the newer type written by Com-plete 4.5 and subsequent releases or not. When it contains x'ff', the record has been written by Com-plete 4.5 or a subsequent release. Otherwise it has been written by a pre 4.5 release.
SFCSMC | Contains the class codes in numeric format (i.e. 1, 2 etc.) which this user is allowed to send.
SFCRMC | Contains the class codes in numeric format (i.e. 1, 2, etc.) which this user is allowed to receive.
SFCCTYPE | Contains an indicator as to the type of Com-plete SMF record being dealt with. The CCCSMF copybook contains the following equates which can be used with this field to determine the record type.
SFCTLOGO | Logon type record
SFCTTERM | Program termination
SFCTCHKP | Check point type record
SFCTSUSP | Suspend type record
SFCTLOGF | Logoff type record
SFCTUSER | User SMF record.
SFCSUSER | Contains an indicator as to the user type. The CCCSMF copybook contains the following equates which can be used to determine the user type.
SFCMATT | Attached user
SFCMSCHD | Scheduled user
SFCMNORM | Logged on or "normal" user
SFCLUNAM | Contains the terminal name of the terminal on which the user was running. For VTAM terminals, this is the VTAM LU name, for batch users, this is the name of the batch job.
SFCPATCH | The patch character for the Com-plete where this user was running.
SFCVRM | Contains the Version, release and SM level respectively of the Com-plete from which the record was written.
SFCTID | Contains the terminal number in binary of the terminal on which this user was running.

### SMF Record Statistics Portion

The following fields are only found in the program termination, checkpoint and logoff records

Field Name | Description of Contents
--- | ---
SFTPROG | Contains the eight byte alpha-numeric name of the last program the user ran. This is not applicable in the logoff record.
SFTPRIV | Contains the privileged status of the program (except in the logoff record). It can contain the following values.
P | Program was privileged
N | Program was not privileged
SFTABEND | Contains the termination status of the program. It can have the following values.
A | Program abended
N | Normal termination
S | Program suspended in COM-PASS
SFTTHRN | Contains the number of the thread in binary format where the program ran.
SFTTRANS | Contains the number of times the user has been marked as being eligible to roll out. This is not necessarily the number of user rollouts as a user program is only rolled out if another user program needs to use the thread.
SFTCPU | Contains the total amount of CPU used by the user in 1/100ths of seconds.
SFTCPUTU | Contains the total amount of CPU used by the user in machine timer units.
SFTELAP | Contains the total length of time the user spent in a Com-plete thread 1/100ths of seconds.
SFTEXCP | Contains the total number of I/Os issued by or on behalf of the user.
SFTDATA | Contains the total amount of data in bytes which was sent to and received from the terminal.
SFTMESG | Contains the total amount of data in bytes which was spooled by this user using the Com-plete printout spooling facilities.
SFTLFTIM | Contains the time that this program was started either directly via Com-plete or via a FETCH. It is a binary number which represents the number of 1/100ths of seconds since the start of the day (i.e. time '00:00').
SFTUSER | This field is copied from the UAB field available to users called UABUSER.
SFTTRAN# | Contains the number assign to this program when it was started. When a program is started in Com-plete via a Com-plete or using a fetch, it is assigned a unique number which starts with one for the first program started.
SFTRTIME | This contains the total of all response times for this user in milliseconds. A "response time" is the time between when Com-plete has associated an incoming user data stream with a terminal (i.e. when the user presses ENTER) and the time when Com-plete determines that the output has been provided back to the user.
SFTRTIM# | This contains a count of the number of "response times" which Com-plete has seen for this user. This number is basically the number of times this user has pressed ENTER at the terminal.
SFTADAC | Contains the total number of Adabas calls that this user has issued.
SFTOPCNT | Contains the total number of Com-plete operations which this user has issued. A Com-plete operation is a MCALL or other operating system function which Com-plete has satisfied internally. An example of an operating system function which Com-plete will satisfy is a LOAD request from a user application program.
SFTADAET | Contains the total amount of time that the user has been within the Adabas link routine ADALCO. This represents the total elapse time between when the call was issued to Adabas and when the response was received back from Adabas. This number represents the time in milli seconds (1/1000ths).
SFTADATD | Contains the total amount of time the user has spent in Adabas. This field is accumulated from the ACBDUR field in the Adabas ACB for each Adabas call issued. Please refer to your Adabas documentation for more information on what the ACBDUR field represents and its format.
SFTTQTIM | Contains the total amount of time this user spent on the Com-plete ready-to-run queue in milli seconds (1/1000ths).
SFTTQCNT | Contains the number of times that this user was enqueued to the Com-plete ready-to-run queue.

### On this page

- Overview
- User ID Accounting Block
- SMF Records
- SMF Record Contents