Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

AREC - Write user accounting record

&pagelevel(3)&pagelevel

General

Application area:

Accounting; see "Accounting"

Macro type:

S-Typ, MF-Format 1:
31-bit interface: standard/L/D/E form; see "S-type macros"


The accounting system compiles accounting data on the usage of data center resources and writes this data to the accounting file in the form of accounting records. The following are examples of accounting data:

  • CPU time used, I/O data volume, working set integral, device and volume reservation data;

  • system services used (user dumps etc.);

  • memory reservation on pubsets.

The accounting file is evaluated using a special evaluation routine.
Basic structure of an accounting record:

Record description

Record ID, time stamp, ...

User description

User ID, account number, analyzed user task, ...

Basic information

Standard data

Variable record portion

Record extensions

A detailed description is provided in the “Accounting records” manual [13 (Related publications)].

Macro description

The AREC macro initiates the writing of a user accounting record to the accounting file.

An accounting record can be one of the following:

  • a UDAT accounting record with a record extension

  • a UACC accounting record with a record ID

  • an accounting record (freely) defined by the user

The DSECT operand enables the user to generate the basic structure for accounting records. For user-defined accounting records it is advisable to adhere to this structure.

Notes

  • The user must use appropriate programs for evaluating accounting records (see the “Introduction to System Administration” manual [10 (Related publications)]).

  • System administration can limit the number of user accounting records per task for each user (MAX-ACCOUNT-RECORDS parameter in the user catalog). This limit applies to the whole command mode of a task (outside of program runs). Default value: MAX-ACCOUNT-RECORDS = 100; maximum of 100 accounting records in the command mode of a task.

  • The writing of a freely defined accounting record to the accounting file requires the authorization MAX-ACCOUNT-RECORDS=NL (no limit).

Macro format and description of operands

AREC

{DSECT=RECORD /

,DATA=addr / (r) /

,ID=addr / (r) /

,RECORD=addr / (r)}

,MF=S / L / (E,...) / D

,P=I / p

DSECT=RECORD
A dummy section (DSECT) that reproduces the basic structure of an accounting record is generated.
A prefix P (P = 1 letter) may be specified.
The MF operand may not be specified.

DATA=
This describes the address of the record extension (data string) that is entered in the UDAT accounting record. The length of the following text should be specified in bytes 0-1 of the data string.
Length of text <= 255 bytes.

addr
Symbolic address (name) of the field containing the data string.

(r)
Register containing the address value “addr”.

ID=
This describes the address of a character string (data string) that is entered as a record ID in the UACC accounting record.
Length of the character string <= 8 bytes.

addr
Symbolic address (name) of the field containing the data string.

(r)
Register containing the address value “addr”.

RECORD=
This describes the address of the accounting record (freely) defined by the user.
The record ID and the user description must also be supplied with values by the user in the accounting record.
Record length <= 496 bytes.

The operand is only permissible for users with MAX-ACCOUNT-RECORDS=NL (in the user catalog).

addr
Symbolic address (name) of the field containing the accounting record.

(r)
Register containing the address value “addr”.

MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see "S-type macros". The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.

If MF=D, a prefix P (P = 1 letter) can be specified, as shown in the macro format.

Return information and error flags

R15:

+---------------+
|   |   |   |   |
|b|b| | | | |a|a|
+---------------+

A structured return code (aa=primary return code, bb=secondary return code) relating to the execution of the AREC macro is transferred in register R15.

X'bb'

X'aa'

Meaning

X'00'

X'00'

Function executed normally

X'04'

X'00'

The record was not written because accounting was deactivated

X'08'

X'00'

The record was not written because the relevant record type was deactivated

X'00'

X'04'

Address error (parameter list)

X'00'

X'08'

Invalid function code (for SVC 99 or for AREC)

X'00'

X'0C'

The function is not allowed for this user

X'00'

X'10'

Address error (DATA, ID or RECORD operand)

X'00'

X'14'

Invalid record ID

X'00'

X'18'

Max. record length exceeded

X'00'

X'1C'

Number of permissible records exceeded

X'00'

X'20'

Invalid register

X'00'

X'24'

System or resource error; more information in the secondary return code

X'04'

X'24'

No memory available

X'08'

X'24'

No job information

X'0C'

X'24'

CLTF error: error on writing a record

Basic structure of an accounting record

           AREC  DSECT=RECORD
1          MFCHK DNAME=ARLDS,MF=D,PREFIX=I,MACID=ARL,DMACID=ARL
2 IARLDS   DSECT ,
2                *,##### PREFIX=I, MACID=ARL #####
1          DS    0F                      AREC PARAMETER LIST
1 ****************************************************************
1 *             GENERAL LAYOUT OF ACCOUNT    RECORDS             *
1 ****************************************************************
1 IARLRHDR DS    0F                      RECORD HEADER
1 IARLRL   DS    Y                       RECORD LENGTH
1          DS    XL2                     RESERVED
1 IARLID   DS    CL4                     RECORD ID
1          DS    FL8                     RESERVED (TIME STAMP)
1 IARLLUS  DS    Y                       LENGTH OF USER HEADER
1 IARLLBI  DS    Y                       LENGTH OF BASIC INFORMATION
1          DS    XL4                     RESERVED
1 *
1 *
1 IARLUSER DS    0F                      USER HEADER
1 IARLUSID DS    CL8                     USER IDENTIFICATION
1 IARLACNT DS    CL8                     ACCOUNT NUMBER
1 IARLTSN  DS    CL4                     TSN
1 *
1 *
1          ORG   IARLID+X'1000'
1 IARLBI   DS    0F                      BASIC INFORMATION
1 *
1 *
1          ORG   IARLID+X'2000'
1 IARLEXT  DS    0H                      VARIABLE EXTENSION PART
1 IARLEXTH DS    0H                      EXTENSION HEADER
1 IARL#EXT DS    H                       NUMBER EXTENSIONS
1 IARLDEXT DS    0H                      START LIST OF DISTANCES
1 *
1          ORG   IARLID+X'3000'
1 IARLSEXT DS    0H                      STRING EXTENSION
1 IARLSEXI DS    CL2                     EXTENSION ID
1 IARLLSEX DS    Y                       LENGTH OF STRING
1 IARLSEXB DS    0C                      BEGIN OF STRING
1 *
1          ORG   IARLID+X'3000'
1 IARLAEXT DS    0H                      ARRAY EXTENSION
1 IARLAEXI DS    CL2                     EXTENSION ID
1 IARLAEX# DS    X                       NUMBER OF ELEMENTS
1 IARLAEXL DS    X                       LENGTH OF ONE ELEMENT
1 IARLAEXB DS    0H                      BEGIN OF FIRST ELEMENT