Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Configuration) Guide


2.6.3 JP1/AJS3 database tables

This subsection describes the databases used by the scheduler control, job execution control, and agent management control.

For details about the database for QUEUE jobs and submit jobs used by the submit job execution control, see 7.1.3 Database for QUEUE jobs and submit jobs.

Organization of this subsection

(1) Scheduler database

The following table describes the information stored in the scheduler database used by the scheduler control and job execution control.

Table 2‒48: Tables in a scheduler database

Table name#1

Contents

Row length#2

(bytes)

Variable-length rows#2

(bytes)

Number of indexes

Index length#2

(bytes)

Definition table

AJSUNIT

Unit management

408

(640)#3

None

2

Primary keys: 4

Sub-keys: 36

AJSARROW

Unit relationship definition

52

None

1

12

AJSBODY

Unit definition

1,024

4 to 64,000

1

4

AJSSCH

Schedule definition

148

(208)#3

4 to 8,192

1

8

AJSCAL

Calendar definition

1,540

None

1

8

AJSRELS

Release definition

1,180

None

3

Primary keys: 36

Sub-keys: 8

Sub-keys: 8

Execution table

AJSSTAT

Unit status

1,540

(1,720)#3

None

1

12

AJSENTRY

Registration for execution

764

None

1

8

AJSGEN

Generation management

124

4 to 32,000#4,

4 to 64,000#4

1

8

AJSPERF

Statistics

120

None

2

Primary keys: 4

Sub-keys: 8

AJSID

ID management

76

None

1

8

AJSJINF#5

Job information

320

1 to 15,728,640

1

16

Management table

AJSDBOWNER#6

Database management

28

None

1

4

#1

Default names in the JP1/AJS3 environment settings. If the database in use is an external database, AJS in table names changes to AJS1.

For an embedded database or an external database, the index has a table name followed by INDEX1 for the primary key (including tables with no sub-keys), and INDEX2 and INDEX3 for the sub-keys.

#2

The row length given for a variable-length table is the size of the fixed-length portion at the beginning of each record. If the database in use is an external database, the row length might become shorter than the value shown in the table, depending on the data.

Note that in addition to this size, the table region on the disk includes a management area and therefore does not match the table size given above.

For an embedded database, a JP1/AJS3 database has a maximum variable-row length of 64,000 bytes, and contains one field for data plus another variable-length field. The variable-length field (maximum 64,000 bytes) has two VARCHAR fields. If the variable-length data to be stored in one of the two fields does not exceed 32,000 bytes, zero-length data (SQLLEN = 1) is set in the second VARCHAR field.

#3

The value enclosed in parentheses is used when the scheduler database has been set up by using the ajsembdbsetup command with the -e sjis option specified. For details, see ajsembdbsetup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

#4

Two variable-length areas are defined in the generation management table.

#5

This table exists only when the backup enhancement function is enabled in JP1/AJS3 - Manager or when an external database is used.

#6

This table exists only when JP1/AJS3 - Manager uses an external database.

The following describes the number of records in each table and how the variable-length records are used.

The tables for the scheduler database can be divided into definition tables, which store unit definitions, execution tables, which store execution schedules and results of jobnets and jobs, and management tables, which are used to manage the database.

(a) Definition tables

The following describes the record count and variable-length records for each type of definition table.

Unit management table (AJSUNIT)

The number of records is the number of JP1/AJS3 units (total number of job groups, jobnets, and jobs).

Unit relationship definition table (AJSARROW)

The number of records is the number of relationships established among jobnets.

Unit definition table (AJSBODY)

The number of records is the total number of job definitions and jobnet definitions.

Except for schedule information and calendar information, unit definition information including command statements and script file names is stored.

Schedule definition table (AJSSCH)

Multiple information items are stored in the schedule definition.

The number of stored records is equivalent to the number of records containing the following information:

  • Schedule information

    The number of records is the total number of jobnets plus the total number of scheduling rules defined for them. The table stores the common schedule information and scheduling rule information.

    The common schedule information (names of units referencing the calendar) and scheduling rule information (scheduling rules) are stored as variable-length data in the same format as the parameters in the unit definition file.

  • Jobnet connector information

    The number of records is equivalent to the number of jobnet connectors plus the number of connection-destination jobnets. The full path name of the connection-destination jobnets, the connection-destination host names, and the connection-destination scheduler service names are saved as variable-length data.

  • Wait information

    The number of records is equivalent to the total number of units with wait conditions plus the total number of wait conditions set for all units. Both common wait information and information about units targeted for waiting are saved.

    For the information about units targeted for waiting, the unit complete names of the units targeted for waiting are saved as variable-length data in the same format as the parameters in the unit definition file.

Calendar definition table (AJSCAL)

The number of records is the number of job groups plus the number of years defined in the calendar.

Release definition table (AJSRELS)

The number of records is the number of jobnets registered for release plus the number of times each jobnet has been registered for release. As JP1/AJS3 automatically deletes these records depending on the status of the jobnet registered for release, the number of records might be different from the calculated figure.

(b) Execution tables

The following describes the record count and variable-length records for each execution table.

Unit status table (AJSSTAT)

The number of records necessary for each registered root jobnet is root-jobnet-and-total-number-of-nested-jobnets-and-jobs x (number-of-logs-to-keep + number-of-scheduled-generations-registered-for-fixed-execution + 1), where the number of logs to keep includes sub-generations created when start conditions are satisfied.

Calculations are made for all registered root jobnets, and the sum becomes the total number of records.

Registration for execution table (AJSENTRY)

The number of records necessary for each registered root jobnet is number-of-logs-to-keep-for-the-root-jobnet + number-of-scheduled-generations-registered-for-fixed-execution, where the number of logs to keep includes sub-generations created when start conditions are satisfied. Calculations are made for all registered root jobnets, and the sum + 1 becomes the total number of records.

Generation management table (AJSGEN)

The number of records and amount of information stored as variable-length data differs depending on whether start conditions are used for the registered root jobnets and whether wait conditions are used.

For a root jobnet without a start condition, an item of information with a length of ((number-of-logs-to-keep + number-of-scheduled-generations-registered-for-fixed-execution) + 1) x 8 bytes is stored as variable-length data (4 to 64,000).

number-of-release-IDs-release-registered-for-root-jobnets x 4 bytes of information is stored as variable-length data (4 to 32,000).

In the same way, for a root jobnet that has a start condition, an item of data with a length of ((number-of-logs-to-keep + number-of-scheduled-generations-registered-for-fixed-execution) + 1) x 8 bytes is stored as variable-length data. In addition, information about the number of sub-generations, calculated as number-of-sub-generations-created-every-time-a-start-condition-is-satisfied x 8 bytes is stored as variable-length data (4 to 64,000).

If a unit with wait conditions is already registered, records equivalent to number-of-registered-units-with-wait-conditions x number-of-logs-to-keep are added. For each record, information equivalent to number-of-set-wait-conditions x 56 bytes is stored as variable-length data (4 to 32,000).

Calculate the number of records for all the registered root jobnets and all the registered units with wait conditions. The total is the total number of records.

Statistics table (AJSPERF)

The number of records is the total number of units registered for execution.

ID management table (AJSID)

The number of records is the number of records in all the active units.

Job information (AJSJINF)

The number of records is calculated from the following expression: Number-of-logs-to-keep x (number-of-all-jobs-subordinate-to-the-root-jobnet-(including-event-jobs) x 2 + number-of-all-event-jobs-subordinate-to-the-root-jobnet)

(c) Management tables

The following describes the number of records in management tables.

Database management (AJSDBOWNER)

The number of records is 1.

(d) Supplementary notes about the scheduler database

If the scheduler service does not stop as planned due to a power failure or other reason, processing resumes when the service next starts, and the KAVS0211-W message is output to the Windows event log or syslog. Check the job status as jobs might have stopped before completion.

(2) Agent management database

The agent management database is used by the agent management control. This database manages definition information about execution agents and execution agent groups. The following table describes the database tables in an agent management database.

Table 2‒49: Tables in an agent management database

Table name

Contents

Row length

(bytes)

Variable-length rows

(bytes)

Number of keys

Number of indexes

Index length (bytes)

AJSEXECAGT

Execution agent definition

952

None

1

1

4

AJSAGTEXECCNT

Maximum concurrent jobs definition

20

None

1

1

8

AJSEXECAGTGRP

Execution agent group definition

696

None

1

1

4

AJSLINKAGT

Connected execution agents definition

20

None

1

1

8

AJSAGTDBOWNER#

Database management

28

None

1

1

4

#

This table exists only if the database in use is an external database.

The number of records in each table is as follows:

Execution agent definition (AJSEXECAGT)

The number of records is the number of defined execution agents.

Maximum concurrent jobs definition (AJSAGTEXECCNT)

The number of records is number-of-defined-target-agents x 48.

Execution agent group definition (AJSEXECAGTGRP)

The number of records is the number of defined execution agent groups.

Connected execution agents definition (AJSLINKAGT)

The number of records is the total number of execution agents connected to each execution agent group.

Database management (AJSAQGTDBOWNER)

The number of records is 1.