Errors that may occur in the online mode can be classified into errors occurring during write operations and errors occurring during read operations.
(a) During write operations
- (i) Standby file exists
- OpenTP1 swaps the current file out and the standby file in.
- The erroneous status file must then be initialized by the following procedure:
- With the stsrm command, delete the status file that has been placed on shutdown status due to the error.
- Create a status file with the stsinit command.
- Open the created status file with the stsopen command and place it on standby status.
- (ii) No standby file
- One-system operation available: If an error occurs with the current file in one system, processing continues with the normal system alone. If an error occurs with the normal system during one-system operation or if the normal system terminates abnormally during updating of a file, OpenTP1 can no longer be restarted. When the current file is put to one-system operation, the user must take either of the following two procedures:
- Swapping with a standby file
To swap the current file with a standby file, take these steps:
1. Open an invalid file with the stsopen command to provide a standby file.
2. Execute the stsswap command to swap the current file with the standby.
- Recovering the file of the erroneous system
To recover the contents of the file shut down due to an error, take these steps:
1. Delete the file of the shut-down system with the stsrm command.
2. Initialize the file with the stsinit command.
3. Open the initialized file with the stsopen command.
Once the stsopen command is executed, the contents of the file in the normal system are copied onto the file in the erroneous system. Upon completion of copying, the current-status determination time is collected and the file is recovered as a current file.
- One-system operation unavailable
- OpenTP1 terminates abnormally.
- After a standby file is provided, OpenTP1 must be restarted, and the erroneous status file must be initialized by the following procedure:
- With the stsrm command, delete the status file that has been placed on shutdown status due to an error.
- Create a status file with the stsinit command.
- Open the created status file with the stsopen command and place it on standby status.
(b) During read operations
A status file is read from the current file in the A system. If an error occurs while this file is being read, the error handling procedure will depend on whether or not the current file in the B system can be read.
- (i) Current file in B system can be read
- If there are standby files for the A and B systems, OpenTP1 copies into the standby files in both the A and the B system the contents of the current file in the B system.
- If there are no standby files for the A and B systems, OpenTP1 terminates. After standby files are provided for the A and B systems, OpenTP1 must be restarted, and a new status file must be provided by the following procedure:
- With the stsrm command, delete the physical file that has been placed on shutdown status due to the error.
- Initialize the physical file in the A system with the stsinit command.
- Open the initialized file with the stsopen command.
- (ii) Current files in A and B systems cannot be read
- OpenTP1 terminates.
- OpenTP1 must be started by the procedure described below. Any processing that was underway cannot be inherited. DAM FRC or TAM FRC must be executed.
- Initialize the erroneous status file with the stsinit command.
- Forcibly execute normal startup of OpenTP1 with the dcstart -n command.
The error handling procedures depend on specifications in the status service definitions.
(a) sts_initial_error_switch omitted or stop specified
If an error occurs in a status file, OpenTP1 terminates abnormally. If an error occurs in even one of the status files specified in the definition, OpenTP1 will not start. The error handling procedure will depend on the file resulting in the error.
- (i) Error occurred in previous current file
- If both current files in the A and B systems result in an error, OpenTP1 must be started by the procedure described below. Any processing that was underway cannot be inherited. DAM FRC or TAM FRC must be executed.
- Initialize the erroneous status file with the stsinit command.
- Forcibly execute normal startup of OpenTP1 with the dcstart -n command.
- If one of the current files in the A or B system results in an error, OpenTP1 must be started by the following procedure:
- Check that there is a standby file to swap in for the current file. If there is no standby file, create one with the stsinit command.
- Change the specification of sts_initial_error_switch to continue in the status service definition.
- Restart OpenTP1.
- (ii) Error occurred in file other than previous current file
- OpenTP1 must be restarted by the following procedure:
- If a file entity resulted in the error, delete it with the stsrm command.
- Initialize the status file with the stsinit command.
- Restart OpenTP1.
(b) sts_initial_error_switch=continue or sts_initial_error_switch=excontinue specified
Even if an error occurs in a status file, processing continues. If an error occurs in the most recent current file in one of the systems, the contents of the error-free file in the other system will be copied into the standby files in both the A and the B system. The current file and the standby file are then swapped, and OpenTP1 is started. However, if there is no standby file for copying information, OpenTP1 terminates abnormally. When excontinue is specified an initialized file cannot be the active file.
When sts_initial_error_switch=continue is specified, OpenTP1 selects as the current file the most recent file among those files that were opened during restart processing. If both systems have even one pair of files that cannot be opened, whether or not the selected current file is actually the previous current file cannot be determined by the status service. In such a case, the user can check whether or not the current file selected by OpenTP1 is the correct current file by specifying the name of the logical file used as the most recent current file during the previous online operation with sts_last_active_file in the status service definition. If the current file selected by OpenTP1 matches the logical file name specified with sts_last_active_file, startup processing can continue. If not, startup processing terminates. The user must take the same step as when both current files in the A and B systems result in an error. If sts_last_active_file is not specified and the current file cannot be determined, startup processing terminates.
If an error occurred with the current file of one system during the previous online operation, the user must specify a normal system in sts_last_active_side of the status service definition so that an incorrect file may not be selected at restart after one-system operation.
If only the system specified in sts_last_active_side can be opened at restart, it is swapped. If swapping fails, OpenTP1 terminates (one-system operation of the current file cannot be performed at start of the status service). If the system specified in sts_last_active_side cannot be opened, OpenTP1 stops.
If the files in the A and B systems placed on current status are different in contents, the system having the latest information is assumed to be the current system independently of the system specified in sts_last_active_side. The latest information is copied to the system that has old information and then OpenTP1 is restarted.
At restart of OpenTP1, the status service inherits only the status file error that occurred during its activation and the shutdown status of the current file with which an error occurred in the online mode. The service does not inherit the status opened with the stsopen command or closed with the stsclose command in the online mode.
Furthermore, the status service does not identify the status of a status file when the stsinit or stsrm command is executed in the offline mode.