1.3.1 Creation and checking of the system definition
(1) Checks performed by the dcdefchk command
The dcdefchk command performs the checks described below.
(a) Checking the syntax of the system definition
The syntax of the system definition is checked as follows:
- Whether valid characters are specified in the values for each operand
- Whether the values specified for each operand exceed the minimum or maximum specifiable values
- Whether invalid options are specified for any definition commands
- Whether valid characters are specified in the command and flag arguments for definition commands
- Whether the values specified for the command and flag arguments for definition commands exceed the minimum or maximum specifiable values
(b) Checking the logic of the system definition
The logic of the system definition is checked to determine whether any of the values specified in an operand or a definition command may cause problems with OpenTP1 operation. The logic is checked as follows:
- Whether any incompatibility exists between the values specified for different operands or definition commands
- Whether the values specified for operands or definition commands are the recommended values
- Whether the appropriate access permissions are in place to access the files and directories specified in operands and definition commands
(c) Checking OpenTP1 files
OpenTP1 files are checked to determine whether the correct files are specified in the system definition.
(2) Flow of checking with the dcdefchk command
The dcdefchk command performs checks in the following sequence:
- Checks the syntax of operands.
The command checks the syntax of operands in the system definition files located in the definition directories. The check sequence is as follows:
1. System definition files under the directory specified by the $DCCONFPATH environment variable
2. User service definition files under the directory specified by the $DCUAPCONFPATH environment variable
- Outputs the KFCA00258-I message.
A list of definition files checked for syntax in step 1 is output in a KFCA00258-I message. At this time, only the files that are checked as the system service definition are output. The files that are checked as the user service definition are not output.
- Outputs the KFCA00254-R message.
When the -r option is specified in the dcdefchk command and an error is found during the syntax check in step 1, a KFCA00254-R message is output. The KFCA00254-R message asks you whether to continue or stop command processing.
- Checks the syntax (and some logic aspects) of definition commands specified in the system definition (excluding the user service definition).
The command checks the syntax (and some aspects of logic) of definition commands in the system definition files located in the definition directories (the directories specified by the environment variables $DCCONFPATH and $DCUAPCONFPATH).
After each of the checks described in 4 to 7, the command outputs a message with one of the following indicating the message type labels. Note that some output messages may not be assigned a category.
- Labels indicating message type:
- ERROR: This type of message is output on detection of a problem that prevents OpenTP1 from starting or stopping, or impairs some aspects of OpenTP1 operation.
- WARNG: This type of message is output when a specified value is not the recommended value.
- CHECK: This type of message is output to prompt the user to check the validity of a specified definition.
- Checks the logic of system definitions (excluding the user service definition).
The command checks the logic of the definitions specified in the system definitions located in the definition directories.
- Checks the syntax (and some logic aspects) of the definition commands specified in the user service definition).
The command checks the syntax (and some aspects of logic) of the definition commands specified in the user service definitions located in the definition directories.
- Checks the logic of user service definitions.
The command checks the logic of the definitions specified in the user service definitions located in the definition directories.
The following table shows the order in which the various checks take place. The numbers in the table correspond to the steps listed above. Note that checking of OpenTP1 files takes place in steps 4. and 5. of the flow of checking with the dcdefchk command.
Table 1-2 Flow of checks performed by the dcdefchk command
Type | Operand (set format) | Definition commands (command format) |
---|
Other than user service definition | Use service definition |
---|
Syntax check | 1. | 4. | 6. |
Logic check | 5. and 7. | 4. and 5. | 6. and 7. |
(3) Cautionary notes
- You can execute the dcdefchk command while OpenTP1 is operating. If you do so, the command checks the values specified in the system definition before the command is executed, not the values that are valid for the current operation of OpenTP1. For example, if you use the prcpath command to change the value for prcsvpath specified in the process service definition, the dcdefchk command checks the original value specified in the process service definition.
- The dcdefchk command uses the directory specified in the $DCDIR environment variable as the OpenTP1 directory. The $DCDIR environment variable is set in the environment where the dcdefchk command is to be executed. Therefore, if the directory specified in the $DCDIR environment variable differs from the path name for the OpenTP1 directory set in the environment where the dcstart command is to be executed, the dcdefchk command cannot correctly check definitions.
- If the directory paths specified in $DCCONFPATH and $DCUAPCONFPATH are longer than 50 bytes, only part of a definition file name is output in the message (KFCA00242-E) that is output if an error is found during the syntax check. To avoid this, copy the target definition file to a directory whose path name is 50 bytes or less, specify the copy destination directory in the DCCONFPATH environment variable that is specified in putenv format in $DCDIR/conf/env, and execute the dcdefchk command.
- In the directory for storing definitions, store only the files for which you want to perform a definition check. If you store files other than system definition files and user service definition files under the directories for storing system definitions ($DCCONFPATH and $DCCUAPCONFPATH), the dcdefchk command cannot correctly check the definitions. This precaution does not include the directories for storing domain definition files and domain definition files.
- For files other than system service definition files under the directories for storing system definitions ($DCCONFPATH and $DCCUAPCONFPATH), the dcdefchk command does not check files whose names begin with periods (.) and underscores (_) and names that are 9 or more bytes.
- The dcdefchk command checks only the definitions of the operands that are listed in the manual OpenTP1 System Definition.
- Do not execute the command for checking definitions (dcdefchk) at the same time as a command for creating OpenTP1 files (such as jnlinit).
- If a syntax check detects a problem with a value specified for an operand, the logic check will proceed as if the default value is specified for that operand.
- The dcdefchk command checks file and directory access permissions based on the UID/GID of the user who executed the command.
- A message may be output during a logic check if the OpenTP1 file system is inaccessible for some reason, such as being in a standby state.
- Some of the messages output by the dcdefchk command during the checking process do not belong to any of the message types associated with the dcdefchk command. For this reason, if you run the dcdefchk command with the -e option specified, messages with the message type E may still be output.
- The dcdefchk command may be unable to correctly check the logic of environment variables (definitions in putenv or dcputenv format).