C H A P T E R  10

Accounting

Accounting is the practice of systematically collecting, recording, interpreting, and presenting user account information. Operating systems usually provide the ability to track users' activities for purposes such as billing, performance management, capacity planning, and includes ensuring proper usage of the computer system.

This chapter includes the following topics:

Operating system accounting enables you to obtain resource utilization information based on user actions, such as process execution, file access and logging on. Third party packages vary in their degree of information processing, but generally provide more information and facilities than the basic operating system accounting. Certain products, like transaction servers, require their own accounting facilities because they work on behalf of many individual users.


UNIX Accounting

In the UNIX environment, the information collected for each user account usually consists of computer resources. Most systems provide a process accounting option. When enabled, the kernel writes an accounting record each time a process terminates. These accounting records are typically 32 bytes of binary data with the name of the command, the amount of CPU time used, the user ID, group ID, the starting time, and so on. The accounting records correspond to processes, not programs.

The sa command is used to summarize the accounting files for purposes such as billing. You can also use it to search for users who consume excessive amounts of CPU time or for long-running jobs such as password-cracking programs.

When called with no arguments, sa produces a summary for each command on the system:

Your system might have other facilities.

The accounting information generated by the operating system is sufficient if you perform all work under your user ID, so that all system resources that you use can be accounted for. However, if you communicate with another application that is running under a different user ID, the resources used by the application program in performing your request are accounted for under the other user ID. This requires a different method of accounting.


When to Use a Third-Party Accounting Package

Although operating system accounting is sufficient for some site requirements, a production site that has many users and applications running on one or more systems in a network environment requires a more sophisticated accounting facility. In addition to gathering information, sophisticated accounting packages analyze system usage and produce reports that aid in performance and capacity planning.

Packages that provide tools to produce extensive analysis include SAS, SPSS, ARSAP, and IQ.

Because applications run on multiple platforms (mainframes, UNIX systems, PCs), you need to consider all platforms in order to perform comprehensive capacity planning. You can program third party packages to recognize many different file formats in order to extract data for capacity planning. Normally, you must program these statistical packages to meet your site's requirements.


Sun MTP Accounting

Sun MTP is a transaction server that performs work on behalf of one or more users. The Sun MTP transaction server executes under its own user ID. If you need information about the resources used by a transaction, Sun MTP must generate an accounting record containing the user ID and the system resources used to process the transaction.

For every transaction executed, you can indicate whether or not you want to generate an accounting record. You can specify the conditions for which accounting records are generated, and whether to generate an accounting record based on a specific user ID or on the transaction itself.

All accounting records are written to an accounting journal. You can specify one or more accounting journals and control how these journals are archived.


Enabling Accounting

The following procedure lists the tasks to perform to enable accounting for a region. See the referenced sections for more information about the tasks.


procedure icon  To Enable Accounting

1. Start the region where you want to enable accounting.

2. Specify the appropriate accounting options in the following tables:

The options control how and when an accounting record is generated. You can also indicate which journals to use for accounting by specifying a file ID. See Accounting Options.

3. Type the file IDs you specified in Step 2 into the Journal Control Table (JCT).

This maps the file ID to a file and enables you to specify a journal size.

4. Modify the kixjournal shell script to archive the accounting journal when it reaches its file size.

See kixjournal Shell Script.

5. Shut down and restart the region to activate the options you set in Steps 2 and 3.

6. Optionally, you can convert the raw data from the accounting journal to ASCII file format by using the kixjas program.

See Using the kixjas Accounting Conversion Program.

Accounting Options

You can specify accounting at the transaction or user level, to set default values and to turn accounting on or off regardless of previous settings. You specify the accounting options in the system tables. The accounting options hierarchy is shown in the following figure.

  FIGURE 10-1 Accounting Options Hierarchy

Diagram showing the accounting hierarchy as controlled by various Sun MTP tables and options.

The SIT is at the top of the accounting hierarchy. If the SIT's Accounting field is set to N, no accounting takes place, regardless of any other settings. If you set the Accounting field to Y, accounting will be enabled for the region the next time it is started. You must also specify a two-digit File ID, which is used as the default File ID. If you do not specify a File ID in the JCT, a default journal file is created in the form JRNLxx, where xx is the default File ID.

The MCT, which is at the next level in the accounting hierarchy, indicates the default values for generating accounting records based on user (SNT) or transaction (PCT). The default settings allow you to include or exclude user ids and transactions based on your current needs.

To specify accounting options, follow these guidelines:

The same guidelines apply to the Default User Accounting option.

Be careful when setting these default options because you can generate much more accounting information than you need. For example, if the Accounting option in the SIT is set to Yes, the Default TRANID Accounting option is set to Yes, the Default User Accounting option is set to Yes and no other accounting options are set, an accounting record is generated for every transaction processed, and for every transaction a user submits. This generates two accounting records for each transaction.

The PCT and SNT are at the lowest levels in the accounting hierarchy. These tables allow you to set accounting options for individual transactions and users.

The Acct field in the PCT allows you to specify accounting for a particular Trans ID.



Note - When you add a transaction in the PCT, accounting is automatically set to D(efault).



The SNT contains specific information about users that is used by the system sign-on transaction CESN. The accounting option specified in the SNT allows you to generate accounting information based on user ID.



Note - When you add a transaction in the SNT, accounting is automatically set to D(efault).



There are some cases that are not obvious. TABLE 10-1 indicates the settings and results.


Accounting Journals

An accounting journal is the file where the accounting records are written. When you specify an accounting option, you can associate an accounting journal with it.

You associate an option with a File ID, which is associated with a journal file in the JCT.

You can also specify the size of the journal file in the JCT. An alternate file is associated with every journal file defined in the JCT. The alternate file has the same name as the journal file but contains the suffix .jnl. When the original journal file reaches its size limit, it is moved to the alternate file, the original file is cleared, then the accounting records are written to the original journal file.

When the journal file is moved to its alternate, the kixjournal shell script is called with the alternate file name as the argument. The standard shell script does not perform any functions on the alternate file. However, you can modify the shell script to process the journal file according to your site's requirements. For example, you can write the journal file to tape for later processing. See kixjournal Shell Script.



Note - The journal file should be large enough to hold accounting records for several hours of processing, allowing enough time for the processing of the alternate file.



You can selectively partition accounting records to different journals. TABLE 10-2 shows how the File ID field determines the journal file to which an accounting record is sent.

The following table lists the accounting options that are set for the Default User, User1, User2, User3 and User4 and for the Default TRANID, Tran1, Tran2, Tran3, and Tran4. It also indicates the journal that contains the accounting records.

TABLE 10-2 Selective Partitioning

Table

Accounting Option

File-Id

Journal

Journal Contents

SIT

Accounting

Yes

03

JOURNL03

Accounting records for Tran3 and Tran4, which are posted to this journal because the PCT entries for these Trans IDs did not specify a File ID, and JOURNL03 is the accounting journal specified in the SIT.

Tran3 accounting is set to Def. It still generates accounting records because the MCT accounting option for TRANID is Yes.

MCT

Default TRANID

Yes

 

 

 

MCT

Default User

No

 

 

 

SNT

User1 Accounting

Yes

04

JOURNL04

Accounting records for all transactions executed on behalf of User1, for example, transactions Tran1, Tran2, Tran3 or Tran4. Here, there are two accounting records written to different journals; i.e., if User1 executes Tran1, a transaction record is written to JOURNL07 and a user record is written to JOURNL04.

SNT

User2 Accounting

Yes

05

JOURNL05

Accounting records for all transactions executed on behalf of User2.

SNT

User3 Accounting

No

 

 

 

SNT

User4 Accounting

Yes

06

JOURNL06

Accounting records for all transactions executed on behalf of User4.

PCT

Tran1 Accounting

Def

07

JOURNL07

Accounting records for transactions Tran1 and Tran2.

PCT

Tran2 Accounting

Def

07

JOURNL07

PCT

Tran3 Accounting

Def

 

 

 

PCT

Tran4 Accounting

Yes

 

 

 


You can direct accounting records to specific journals depending on your site's requirements. Do not intermix user journal records (records produced from the application) and region accounting records; assign each to its own journal file.

Accounting Journal Format

The following table describes the accounting journal file, which contains three types of records.

TABLE 10-3 Accounting Journal File Records

Record

Description

Physical write header record (PWHR)

The PWHR is a C structure that describes the physical block that was written on the journal file. You can determine the structure definition from the $UNIKIX/src/trans directory in the file statrcrd.h. The structure name is jct_rcd.

Accounting header record (AHR)

The AHR is a C structure that describes the type of data being processed and the conditions under which the record was produced. You can determine the structure definition from the $UNIKIX/src/trans directory in the statrcrd.h file. The structure name is acntg_hdr_type.

Accounting data record

The accounting data record follows the AHR whenever the AHR type is user or tranid. The accounting data record structure is defined in the $UNIKIX/src/trans/statrcrd.h file as structure acntg_body_type.


Six types of AHRs can appear on an accounting journal.

TABLE 10-4 Accounting Header Record (AHR) Types

AHR Type

When/Where Appears

0005

At the beginning of every journal file.

0006

Appended to the journal as the first record written to every accounting file after the region starts up following a region or system crash.

0015

At the end of a journal when the size of the journal is exhausted.

0016

As the last record when the region performs a normal shutdown.

0002

When an accounting record is written on behalf of a user ID. This includes any conditions based on options specified in the SNT. This record is followed by the Data Record that contains the specific information about the user ID.

0001

When an accounting record is written on behalf of a transaction. This includes any conditions based on options specified in the PCT. This record is followed by the Data Record that contains specific information about the Trans ID.


The PWHR always precedes AHR types 0005, 0006, 0016, and 0015. It also precedes one or more AHR types 0001 and 0002. A flag in the PWHR verifies that the data following the record is Sun MTP accounting information. The following figure illustrates the accounting journal record format.

  FIGURE 10-2 Accounting Journal Record Structure

Diagram showing the record structure of an accounting journal.

For Sun MTP accounting records, the following rules apply:


Recovering Accounting Journals

When a system or region crash occurs, the accounting journals are left as they were at the time of the crash. The last record in the journal is always a complete accounting record. The journal does not contain a partial record. When the region is restarted, it writes an AHR type 0006 at the end of all accounting journals that were active at the time of the crash. The AHR type 0006 indicates that a system or region crash occurred.

At the time of the system or region crash, all accounting records might not have been written to their respective journals. These records, which are maintained in the internal buffers, are lost.


Using the kixjas Accounting Conversion Program

The accounting records in the journal file contain header information specific to the journal file and accounting data that is a mixture of ASCII and binary data. The conversion program, kixjas, reads a journal file and outputs an ASCII file containing the same information, but excluding the header information. kixjas can extract specific types of accounting records, either Transid records (Record type 0001) or User records (Record type 0002). The Sun Mainframe Transaction Processing Software Reference Guide describes the kixjas program.

kixjas processes each journal file, then generates a report that shows the total number of record types processed on each journal file. After all journal files are processed, kixjas generates a summary report of all record types for all journals in the format shown in the following example.

CODE EXAMPLE 10-1 kixjas Summary Report (1 of 3)

Record Types:
	Record type  1 ==> Transid record.
	Record type  2 ==> Userid record.
	Record type  5 ==> SunMTP start-up after normal termination.
	Record type  6 ==> SunMTP system crash occurred.
	Record type 15 ==> Journal file size exhausted.
	Record type 16 ==> SunMTP normal shut-down.
###########################################
JOURNAL FILE: JRNL02.jnl
Records processed:
   acct. header type  5 is skipped.
   acct. header type  6 is skipped.
   acct. header type  6 is skipped.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
   acct. header type 16 is skipped.
Total records processed:
   record-type         # of records
        1 ----------------- 0
        2 ----------------- 7
        5 ----------------- 1
        6 ----------------- 2
       15 ----------------- 0
       16 ----------------- 1
###########################################
JOURNAL FILE: JRNL05.jnl
Records processed:
   acct. header type  5 is skipped.
   acct. header type  6 is skipped.
   acct. header type  6 is skipped.
   acct. header type 16 is skipped.
Total records processed:
   record-type         # of records
        1 ----------------- 0
        2 ----------------- 0
        5 ----------------- 1
        6 ----------------- 2
       15 ----------------- 0
       16 ----------------- 1
###########################################
JOURNAL FILE: JRNL11.jnl
Records processed:
   acct. header type  5 is skipped.
   acct. header type  6 is skipped.
   acct. header type  6 is skipped.
   SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
   acct. header type 16 is skipped.
Total records processed:
   record-type         # of records
        1 ----------------- 0
        2 ----------------- 1
        5 ----------------- 1
        6 ----------------- 2
       15 ----------------- 0
       16 ----------------- 1
###########################################
JOURNAL FILE: JRNL22.jnl
Records processed:
   acct. header type  5 is skipped.
   acct. header type  6 is skipped.
   acct. header type  6 is skipped.
   SunMTP Physical Header(size: 418 bytes)
      0 type 1 record processed.
      1 type 2 record processed.
   acct. header type 16 is skipped.
Total records processed:
   record-type         # of records
        1 ----------------- 0
        2 ----------------- 1
        5 ----------------- 1
        6 ----------------- 2
       15 ----------------- 0
       16 ----------------- 1
###########################################
===========================================
Total records for all journal files:
   record-type         # of records
        1 ----------------- 0
        2 ----------------- 9
        5 ----------------- 4
        6 ----------------- 8
       15 ----------------- 0
       16 ----------------- 4
 

ASCII Record Format

The tables in this section illustrate the ASCII header record and ASCII data record formats generated by kixjas. An ASCII header record precedes each ASCII data record.

The following table describes the fields that comprise the ASCII header record. The fields are listed in the order they appear in the record.

TABLE 10-5 ASCII Header Record

Offset

Size
(Bytes)

Field

Description

0

8

Record Length

Includes header.

8

4

Record Type

Indicates whether the record was generated due to a transaction ID or a user option being specified. The record types are:

0001 transid

0002 User

0005 Start of journal file

0006 Start after system crash or region crash

0015 End of journal file after size exhausted

0016 End of journal file after normal region shut down

12

8

"unikix"

Left justified.

20

8

Sun MTP Release Number

Left justified.

0,1 Release number (for example, 08)

2,3 Update number (for example, 01, 02, ...)

4,5 Maintenance number (for example, 01, 02, ..)

6,7 Reserved

28

8

Reserved

 

36

8

System ID

Indicates which system produced the record.

44

4

Journal ID

Left justified. Indicates the journal ID to which the record was written.

48

8

Date

Format

mmddyyyy

where

mm Month

dd Day

yyyy Year

56

12

Time

Format

hhmmssdd

where

hh Hours

mm Minutes

ss Seconds

dd Hundredths of seconds


The following table lists the ASCII fields that comprise the ASCII data record. The fields are listed in the order they appear in the record.

TABLE 10-6 ASCII Data Record (1 of 6)

Offset

Size
(Bytes)

Field

Description

0

4

Transaction Identification

TRANID.

4

4

Terminal Identification

This field is null if the transaction server is not associated with a terminal or session.

8

8

userid

The user identification at transaction initiation.

16

4

Transaction Start Type

The low order byte is set to

0 Attached from terminal input

1 Attached by automatic transaction initiation (ATI) without data

2 Attached by automatic transaction initiation (ATI) with data

3 Attached by transient data trigger level

4 Attached by user request

5 Attached from terminal TCTTE transaction ID

Valid only if the record type is transaction.

20

12

Start Time of Measurement Interval

Time the TRANID attached to the transaction server. The time is represented in GMT (Jan. 1990).

32

12

Finish Time of Measurement interval

Time at which the transaction server finished the transaction. The time is represented in GMT.

44

10

Sequence Number

Sequence number of the transaction.

54

4

Operator Identification at Task Creation

Blank if the transaction server's principal facility is not a terminal or a session, or if the sign-on entry does not have an OPIDENT value.

58

8

Program Name

Name of the first program invoked at attach time.

66

20

System Name

Fully qualified name by which the originating system is known to the VTAM network. This name is assigned at attach time based on the information in the TCT system entry.

86

8

Unit of Work Name

Name by which the unit of work is known within the originating system. This name is assigned at attach time using the unit of work ID passed as part of an ISC APPC or IRC attach header.

94

4

Original Abend Code

 

98

4

Current Abend Code

 

102

4

Performance Record Type

The low order byte is:

C Record OUTPUT for a terminal converse

D Record output for a user EMP DELIVER request

T Record output for a task termination

M Record output for a semi-permanent mirror suspend

For Sun MTP, the value is always T.

Valid only if the record type is transaction.

106

10

Number of Messages

Number of messages sent to the principal terminal facility by the user task. Not applicable to ISC APPC transactions.

Valid only if the record type is transaction.

116

10

# Characters Received from Principal Terminal

Number of characters received from the principal terminal facility by the user task. Not applicable to ISC APPC transactions.

Valid only if the record type is transaction.

126

10

# Messages Received from Principal Terminal

Number of messages received from the principal terminal facility by the user task. Not applicable to ISC APPC transaction.

Valid only if the record type is transaction.

136

10

# Characters Sent to Principal Terminal

Number of characters sent to the principal terminal facility by the user task. Not applicable to ISC APPC transactions.

Valid only if the record type is transaction.

146

10

TIOA

Amount of terminal storage (TIOA) allocated to the terminal associated with this user task, if applicable.

Valid only if the record type is transaction.

156

10

# GETMAIN Requests

Number of user-storage GETMAIN requests issued by the user task.

Valid only if the record type is transaction.

166

10

Maximum User Storage

Maximum amount of user storage allocated to the user task.

Valid only if the record type is transaction.

176

10

# GET Requests

Number of file GET requests issued by the user task. This is the number of VSAM reads.

Valid only if the record type is transaction.

186

10

# PUT Requests

Number of file PUT requests issued by the user task. This is the number of VSAM rewrites.

Valid only if the record type is transaction.

196

10

# Browse Requests

Number of file browse requests issued by the user task. This number excludes the START and END browse requests.

Valid only if the record type is transaction.

206

10

# ADD Requests

Number of file ADD requests issued by the user task. This is the number of VSAM writes.

Valid only if the record type is transaction.

216

10

# DELETE Requests

Number of file DELETE requests issued by the user task. This is the number of VSAM DELETEs.

Valid only if the record type is transaction.

226

10

# File Control Requests

Total number of file control requests issued by the user task. This number excludes any request for OPEN, CLOSE, ENABLE or DISABLE of a file. This is the total of 22, 23, 24, 25 and 26.

Valid only if the record type is transaction.

236

10

# Times File Access- method Interfaces Invoked

Number of times the user task invoked file access-method interfaces. This number excludes requests for OPEN and CLOSE.

This only pertains to VSAM files.

246

10

# Transient Data GET Requests

Number of transient data GET(READQ TD) requests issued by the user task.

Valid only if the record type is transaction.

256

10

# Transient Data PUT Requests

Number of transient data PUT(WRITEQ TD) requests issued by the user task.

Valid only if the record type is transaction.

266

10

# Transient Data PURGE (DELETE) Requests

Number of transient data PURGE(DELETEQ) requests issued by the user task.

Valid only if record type is transaction.

276

10

# Transient Requests Issued by User Task

Total number of transient data requests issued by the user task. This field is the sum of transient data GET, PUT and PURGE requests.

Valid only if the record type is transaction.

286

10

# Temporary Storage GET Requests

Number of temporary storage GET(READQ TS) requests issued by the user task.

Valid only if the record type is transaction.

296

10

# Auxiliary Temporary Storage PUT Requests

Number of PUT(WRITEQ TS) requests to auxiliary temporary storage issued by the user task.

Valid only if the record type is transaction.

306

10

# Main Temporary Storage PUT Requests

Number of PUT(WRITEQ TS) requests to main temporary storage issued by the user task.

Valid only if the record type is transaction.

316

10

# Temporary Storage Requests by User Task

Total number of temporary storage requests issued by the user task. This field is the sum of the temporary storage GET and PUT requests.

Valid only if the record type is transaction.

326

10

# BMS MAP Requests

Number of BMS MAP requests issued by the user task. This field corresponds to the number of RECEIVE MAP requests that did not incur a terminal I/O and the number of RECEIVE MAP FROM requests.

Valid only if the record type is transaction.

336

10

# BMS IN Requests

Number of BMS IN requests issued by the user task.

Valid only if the record type is transaction.

346

10

# BMS OUT Requests

Number of BMS OUT requests issued by the user task. This field corresponds to the number of SEND MAP requests.

Valid only if the record type is transaction.

356

10

# BMS Requests by User Task

Total number of BMS requests issued by the user task. This field is the sum of BMS MAP, IN, and OUT requests.

Valid only if the record type is transaction.

366

10

# LINK Requests

Number of program LINK requests issued by the user task. Valid only if the record type is transaction.

376

10

# XCTL Requests

Number of program XCTL requests issued by the user task, including the transfer of control (XCTL) to the first program of the user task.

Valid only if the record type is transaction.

386

10

# LOAD Requests

Number of program LOAD requests issued by the user task.

Valid only if the record type is transaction.

396

10

# Journal Output Requests

Number of journal output requests during the user task.

Valid only if the record type is transaction.

406

10

# Interval Control START or INITIATE Requests

Number of interval control START or INITIATE requests during the user task.

Valid only if the record type is transaction.

416

10

# SYNCPOINT Requests

Number of SYNCPOINT requests issued during the user task.

426

12

Elapsed Time

Elapsed time for which the user task was dispatched. Time is represented in units according to hardware platform (for example, 16 milliseconds is the smallest unit).

438

1

Unit of Time

The byte indicates the unit of time:

Byte Content

01 16 millisecond units

02 Millisecond units

03 Micro seconds

439

8

Sun MTP System Name

Name from the SIT.

447

12

Response Time

Difference in time from when the transaction was loaded in the transaction server for execution and the first output message was sent to the terminal.

459

4

Record Type

Type Content

0001 Transaction (generated for normal input transactions)

0002 Batch (generated for standard batch or Sun MBM).

463

10

# OPEN INPUT Requests

Number of OPEN INPUT requests from batch jobs.

Valid only if the record type is batch.

473

10

# OPEN OUTPUT Requests

Number of OPEN OUTPUT requests from batch jobs.

Valid only if the record type is batch.

483

10

# OPEN I/O Requests

Number of OPEN I/O requests from batch jobs.

Valid only if the record type is batch.

493

10

# OPEN EXTEND Requests

Number of OPEN EXTEND requests from batch jobs.

Valid only if the record type is batch.

503

10

# CLOSE Requests

Number of CLOSE requests from batch jobs.

Valid only if the record type is batch.

513

10

# CLOSE WITH LOCK Requests

Number of CLOSE WITH LOCK requests from batch jobs.

Valid only if the record type is batch.

523

10

# READ Requests

Number of READ requests from batch jobs.

Valid only if the record type is batch.

533

10

# READ PREVIOUS Requests

Number of READ PREVIOUS requests from batch jobs.

Valid only if the record type is batch.

543

10

# READ Random Requests

Number of READ random requests from batch jobs.

Valid only if the record type is batch.

553

10

# WRITE Requests

Number of WRITE requests from batch jobs.

Valid only if the record type is batch.

563

10

# REWRITE Requests

Number of REWRITE requests from batch jobs.

Valid only if the record type is batch.

573

10

# START full length key Requests

Number of START equal to full length prime key requests from batch jobs.

Valid only if the record type is batch.

583

10

# START Key/Record # Requests

Number of START equal to any key/record number requests from batch jobs.

Valid only if the record type is batch.

593

10

# START > Requests

Number of START greater than (>) requests from batch jobs.

Valid only if the record type is batch.

603

10

# START >= Requests

Number of START with not less than (>=) requests from batch jobs.

Valid only if the record type is batch.

613

10

# START < Requests

Number of START with less than (<) requests from batch jobs.

Valid only if the record type is batch.

623

10

# DELETE Requests

Number of DELETE requests from batch jobs.

Valid only if the record type is batch.

633

10

# COMMIT Requests

Number of COMMIT (UNLOCK all files) requests from batch jobs.

Valid only if the record type is batch.

643

10

# ROLLBACK Requests

Number of ROLLBACK (UNLOCK all files) requests from batch jobs.

Valid only if the record type is batch.

653

1

Newline Character

 



kixjournal Shell Script

The region calls the kixjournal shell script when a journal file needs refreshing. A journal file is refreshed when it is full or during a normal region shutdown. When a journal file is refreshed, the original journal file is moved to an alternate file with the same name and a suffix of .jnl. The alternate file name is passed as the argument to the kixjournal shell script.

As delivered, the kixjournal shell script does not perform any functions on the alternate file. It does, however, contain code that writes a message to the unikixmain.log file. You can write messages to the unikixmain.log, unikixmain.err, and unikixmain.dbg logs from the shell script using the kixlog utility. Refer to the Sun Mainframe Transaction Processing Software Reference Guide for information about kixlog.

Determine your site's requirements and modify the kixjournal shell script accordingly. For example, you might have a backup and archive facility that has an interface that allows you to pass a single file to the facility. You can modify the kixjournal shell script to have your backup and archive facility archive the journal files. Subsequently, you can restore the files by time to the appropriate files and process the data.


Setting Up User Journals

In addition to the system-wide accounting journals, you can define user journals. User journals are written by the EXEC CICS JOURNAL command. To define a user journal for your region, you must specify the journal file's attributes in the JCT. Refer to the Sun Mainframe Transaction Processing Software Reference Guide for a description of the JCT fields.



Note - The .jnl extension is not added to user-defined journal files.



On region shutdown, user journals are not flushed the way accounting journals are, so be sure to allocate a file size large enough to meet your needs. The kixjas and kixjournal utilities are not used with user journals. You must provide a utility that allows you to read or flush the user journal.