jpqdbcond
- Organization of this page
Format
jpqdbcond [-h logical-host-name] [[-m] | [[-x][-k] [-d directory-name][-p {output-destination}]]| [[{-l|-L} [-a] [[-i {output-destination}]| [-t {output-destination,unused-area-size-threshold} [-v]]]] |[-t {output-destination,unused-area-size-threshold} [-v]]]]
Description
-
Compresses unused areas and reorganizes files if the ratio of unused areas is high for the ISAM files that the job execution environment uses.
-
Outputs the ratio of unused areas, data file fragmentation ratio, and unused size for the ISAM files used in the job execution environment, to the standard output file.
You can display the ratio of unused areas for the ISAM files even while the job execution environment is using the ISAM files.
-
Outputs the following information for the ISAM files that the job execution environment uses, to the specified destination as a message:
- Information about reorganization (start and end date/time, statistics)
- Unused area size
- Whether the unused area size has reached the threshold
You can specify one or more of the following message destinations:
- Standard error output
- Windows event log or Syslog
- JP1 event
-
Checks whether the size of unused areas for the ISAM files that the job execution environment uses has reached the threshold and sets the result in the return value of the command.
-
Converts the format of the ISAM file.
Execution privileges
In Windows: Administrators privilege
In UNIX: Superuser privilege
Arguments
-h logical-host-name
Specify the target logical host name.
You can specify a character string of 1 to 255 bytes.
By default, the system assumes the logical host name specified by the JP1_HOSTNAME environment variable. If the JP1_HOSTNAME environment variable is not specified, the system assumes the local host name.
-m
Outputs the number of ISAM lock table entries and the ISAM file format (whether the key reuse functionality is enabled) for the job execution environment database.
You cannot specify this option with any option other than -h.
-x
Completely reorganizes the data and key files for the ISAM files used in the job execution environment.
-k
Converts all ISAM files that constitute the job execution environment to the format enabling the key reuse functionality and completely reorganizes the data and key files.
-d directory-name
Specify the directory name for the work file used for key sorting, if you reorganize the ISAM files that the job execution environment uses.
For an explanation of the system action when you omit this option, see the description of the Jiscond command in the JP1/Base User's Guide.
-p {output-destination}
Outputs a message when the command starts and ends the reorganization of the ISAM files that the job execution environment uses.
You must specify this option with the -x option.
-
output-destination
Specifies one of the following message output destinations.
You can specify a single destination or a combination of two or more destinations.
e: Standard error output
s: Windows event log or Syslog
j: JP1 event
The following shows example message output when this option is specified:
- Example 1: When reorganization is started
KAVU5980-I Database condensing of the job execution environment started. 20XX/10/01 01:05:40
- Example 2: When reorganization is ended normally
KAVU5981-I Database condensing of the job execution environment ended normally. 20XX/10/01 01:05:40 - 20XX/10/01 01:20:20 (00:14:40)
The start date/time, end date/time, elapsed time, unused area size before reorganization, and unused area size after reorganization are also output.
- Example 3: When reorganization is ended abnormally
KAVS5982-E Database condensing of the job execution environment ended abnormally. 20XX/10/01 01:05:40 - 20XX/10/01 01:20:20 (00:14:40)
{-l|-L}
Displays the ratio of unused areas for the ISAM files that the job execution environment uses.
You can obtain more detailed information about the ISAM files by specifying this option with the -a option.
-
-l
Exclusively uses the ISAM files to obtain information.
Because this option exclusively uses the files, it provides more accurate information than the -L option. It, however, causes an error if another process is using the ISAM files.
-
-L
Obtains information without exclusively using the ISAM files.
Because this option does not exclusively use the files, it can obtain information even while the job execution environment is using the ISAM files. If another process is simultaneously updating the ISAM files, however, the command fails to obtain accurate information for any updates performed just when it obtains information.
-a
Outputs detailed information about the ISAM files that the job execution environment uses.
If this option is specified with the -l or -L option, the command outputs the data file fragmentation ratio and unused area size as well as the ratio of unused areas.
-i {output-destination}
Outputs a message indicating the unused area size for the ISAM files that the job execution environment uses.
-
output-destination
Specifies one of the following message output destinations.
You can specify a single destination or a combination of two or more destinations.
e: Standard error output
s: Windows event log or Syslog
j: JP1 event
The following shows example message output when this option is specified:
- Example
KAVU5983-I The ISAM unused area size on job execution environment is 99 MB.
-t {output-destination},unused-area-size-threshold
Outputs a message if the unused area size for the ISAM files that the job execution environment uses has reached the specified threshold.
You can use this option to schedule the execution of the jpqdbcond command as a JP1/AJS3 job when the system is not very busy (e.g., not executing a large number of jobs), so that the command periodically checks the status of the ISAM files and outputs a warning message as required.
-
output-destination
Specifies one of the following message output destinations.
You can specify a single destination or a combination of two or more destinations.
e: Standard error output
s: Windows event log or Syslog
j: JP1 event
-
unused-area-size-threshold
Specifies a threshold for the unused area size for the ISAM files.
You can specify a value within the range from 1 to 1024 (in MB; 1 MB = 1,024 * 1,024 bytes).
The following shows an example message output when this option is specified:
- Example:
KAVU5984-W The ISAM unused area size of the job execution environment is 101 MB, which exceeds the 100 MB threshold value.
-v
Sets the return value (process return code) of the command to indicate whether the ratio of unused areas has reached the specified value.
You must specify this option with the -t option.
The following shows the return values of the jpqdbcond command, which depend on whether this option is specified:
-
Return value when the -v option is not specified
0
Normal end
Values other than 0
Abnormal end
-
Return value when the -v option is specified
0
The unused area size has not reached the threshold.
1
The unused area size has reached or exceeded the threshold.
100 or greater
Abnormal end
Notes
-
Perform reorganization after you have backed up the relevant files. The jpqdbcond command uses the directory specified in the -d option as a work directory. The drive or partition that contains the directory must have at least twice as much free space as the largest ISAM key file in the job execution environment you want to reorganize. In addition, the drive or partition that contains the job execution environment database directory must have at least as much free space as the largest ISAM key file in the job execution environment you want to reorganize. If you do not specify the -d option, the command uses the OS standard work directory. See the description of the Jiscond command in the JP1/Base User's Guide.
-
If you specify none of the -x, -t, -l, -L, -k, and -m options, the -x option is assumed.
-
If you specify the -x or -k option for this command, you must back up the ISAM files before executing the command (before reorganizing the ISAM files).
-
If you specify the -x, -l, or -k option for this command, you must execute the command with the ISAM files closed (to close the ISAM files, stop JP1/AJS3). When the ISAM files are open, executing the command will result in an error.
-
If you specify the -L option for this command, you can also obtain information about any ISAM files that other processes are using. If another process is simultaneously updating the ISAM files, however, the command fails to obtain accurate information for any updates performed just when it obtains information. In order to maintain the integrity of the ISAM files, other processes attempting to access the ISAM files have to wait while the command is executed. You should not, therefore, use this command when the system is executing a large number of jobs.
-
The output information from this command with the -l or -L option specified refers to the ratio of unused areas, not the ratio of fragmentation. If, therefore, the ISAM file contains no records or there are an extremely limited number of records, 100% is output showing the ratio of unused areas to the empty area that has been reserved.
-
Reorganizing the ISAM files sometimes fails to completely reorganize the entire files, possibly leaving some small unused areas.
-
If you execute this command with the -x or -k option specified, do not execute the jpqautocond command or the jajs_maintain -m manager command at the same time.
-
You cannot specify the -x and -k options of this command together.
Return value
0 |
Normal end# |
1 |
The ISAM files being used contain unused areas exceeding the specified threshold size. |
100 |
Invalid argument specified |
132 |
The configuration definition information file for submit job execution is not validly coded. |
135 |
Insufficient system resource |
137 |
No database storage path |
138 |
You do not have the privilege required to access the database. |
140 |
The user does not have administrator privileges (in Windows systems) or superuser privileges (in UNIX systems). |
141 |
Invalid environment setting or logical host name |
145 |
Insufficient memory |
146 |
Insufficient disk space |
147 |
An error due to an internal cause occurred. |
148 |
An error occurred in ISAM processing for database reorganization. |
149 |
Processing cannot be performed because the database size exceeds 2 GB. |
226 |
Invalid execution environment |
- #
-
When the -t and -v options are specified simultaneously, indicates that the ISAM files used by the job execution environment have not reached the unused area size threshold.
Additional information
-
The following shows the format of output when the -l or -L option is specified:
The following items are output:
- Table name
-
Displays the table name.
- Record count
-
Displays the number of records.
- Data
-
Displays the ratio of unused areas for the data file.
- Key 1
-
Displays the ratio of unused areas for the first key file.
- Key 2
-
Displays the ratio of unused areas for the second key file.
This item is blank if there is only a single key file.
There cannot be more than two key files.
-
The following shows the format of output when the -a option is specified with the -l or -L option.
Information is output in two rows for each table. The information displayed in the upper row is the same as that displayed with the -l or -L option. The lower row displays the unused area size for each file (in MB; 1 MB = 1,024 * 1,024 bytes).
The following describes the displayed items:
- Table name
-
Displays the table name.
- Record count
-
Displays the number of records.
- Data
-
When the -a option is specified, data is output in two rows for each table. The data displayed in the upper row is the same as that displayed with the -l or -L option. The lower row displays the unused area size.
- Fragment ratio
-
For a variable-length record, updating a record may cause the data in ISAM files to be split into multiple blocks. This item displays the ratio of the split records to the total number of records. This item is only displayed for variable-length ISAM files. It displays a hyphen (-) for other tables.
- Key 1
-
When the -a option is specified, data is output in two rows for each table. The data displayed in the upper row is the same as that displayed with the -l or -L option. The lower row displays the unused area size.
- Key 2
-
When the -a option is specified, data is output in two rows for each table. The data displayed in the upper row is the same as that displayed with the -l or -L option. The lower row displays the unused area size.
- Unused area size
-
This item displays the total unused area size for the data and key files that comprise each ISAM file.
- Total unused area size
-
Displays the total unused area size for the ISAM files that the job execution environment uses.
-
The following shows the format of output when the -m option is specified:
The following items are output:
- Table name
-
Displays the table name.
- Reuse key
-
Displays Enabled if the key reuse functionality for the ISAM file format is enabled.
Displays Disabled for the conventional ISAM file format.
- Semaphore No.
-
Displays the semaphore number if the file is split by semaphore.
Otherwise, a hyphen (-) is displayed.
-
If you specify j (JP1 event) as the output destination for the -p, -i, or-t option, the following JP1 events are output:
Specified option
Event ID
Event name
Issued when
Message ID
-p
00004160
Job execution environment database reorganization started
Reorganization starts.
KAVU5980-I
-p
00004161
Job execution environment database reorganization ended normally
Reorganization ends normally.
KAVU5981-I
-p
00004162
Job execution environment database reorganization ended abnormally
Reorganization ends abnormally.
KAVU5982-E
-i
00004163
ISAM unused area size information
ISAM unused area size information is obtained.
KAVU5983-I
-t
00004164
ISAM unused area size threshold reached
The ISAM unused area size threshold is reached.
KAVU5984-W
- Note
-
For details about the JP1 events, see A. JP1 Events Issued by JP1/AJS3 in the JP1/Automatic Job Management System 3 Administration Guide.
-
The following describes a database reorganization log that is output when the database is reorganized:
When you execute the jpqdbcond command, it creates the CONDENSE{1|2}.log file in the directory storing the database. This file contains the database reorganization log, which records the following statistics:
-
Start date/time, end date/time, and time required
-
Unused area size and total file size before database reorganization
-
Unused area size and total file size after database reorganization
Data is logged in the HNTR log format. The log consists of two planes, each of which contains 512 KB of log data.
Message KAVU5985-I is output with the statistics of database reorganization embedded.
Output example
KAVU5980-I Database condensing of the job execution environment started. 20XX/10/01 01:05:40 KAVU5985-I CONDENSE: Before condensing the database. Unused area size:102.020 MB Total file size:542.245 MB KAVU5985-I CONDENSE: After condensing the database. Unused area size:0.100 MB Total file size:440.225 MB KAVU5981-I Database condensing of the job execution environment ended normally. 20XX/10/01 01:05:40 - 20XX/10/01 01:20:20 (00:14:40)
-