This section describes how to copy ET
data
into the ATM transaction manager's recovery file.
When Adabas Transaction Manager is in use, the location of
ET
data is determined by the runtime parameter
TMETDATA
:
The setting TMETDATA=ATM
indicates that
ET
data is always stored in and read from the ATM
transaction manager's recovery file without regard to the Database ID indicated
by the Adabas command.
The setting TMETDATA=TARGETS
indicates that
ET
data is stored during the commit process in all
changed databases that are running with DTP=RM
.
ET
data is always read from the database specified
in the Adabas command.
If the setting TMETDATA=TARGETS
is used, no
special action is required to set up ET
data in the
correct locations before using ATM.
If the setting TMETDATA=ATM
is used, it may be
necessary to transfer existing ET
data from
application databases into the ATM transaction manager's recovery file.
If an application that uses ET
data is
capable of starting from an initial state where no
ET
data is stored, it can be run with ATM without
migrating ET
data into the transaction manager's
recovery file.
If, on the other hand, the current ET
data
contents of the application are required whenever the application is executed,
the application’s current ET
data must be migrated
into the ATM transaction manager's recovery file. A utility program is provided
in the ATM load library to perform the necessary migration. Usage of this
utility program is described in the following sections.
The following checklist outlines the required steps in the
ET
data migration procedure:
Identify the ETIDs whose ET
data needs to
be migrated.
Identify the database(s) in which the ET
data is currently stored.
For each database identified in step 2, use Adabas Online System to
delete ET
data for any ETIDs that were not
identified in step 1.
For each database identified in step 2, run job ATMETDAT providing suitable parameter input. See the following section for further information on running this job.
The sample job member ATMETDAT, which is located in the ATM JOBS install
library, can be used to run the copy ET data program, ATMPETD. Before executing
this job, modify the ADARUN parameters, dataset names, and file allocation
statements according to the requirements of your installation. The ADARUN
SVC
parameter should specify the SVC number that is used
by the target and source databases that the utility will process.
Before you can run ATMETDAT, you must link it with ADAUSER from your current Adabas load library.
This utility must execute in a batch job which does not use ATM services. That is, it must execute using an Adabas link module which has no Adabas System Coordinator stub bound to it, or else it must execute under client controls which specify ATM OFF.
ATMETDAT writes a report of the processing it has carried out. The report is written to TMETOUT, and consists of fixed-length, 121-byte records.
Execution of ATMETDAT is governed by parameters read from the TMETIN input. The input file must consist of 80-byte records. Each input record must either contain a comment, indicated by an asterisk (*) in the first position, or else it must contain a valid parameter statement, beginning in the first position. Valid parameter statements have the following form:
parameter=value
Valid parameters and their permitted values are described below.
Parameter | Use | Possible Values | Default |
---|---|---|---|
FROM | Identifies the source from which ET data will be read. | DBnnnnn | TMnnnnn | None. This parameter must be specified. |
Possible values:
Value | Description |
---|---|
DBnnnnn | nnnnn is a database ID in the range 1-65535. (Leading zeroes are not required.) ET data will be read from the checkpoint file of the specified database. The database must be executing in multi-user mode when ATMETDAT is run. |
TMnnnnn | nnnnn is the node ID of an ATM Transaction Manager, in the range 1-65535. (Leading zeroes are not required.) ET data will be read from the ET data file of the specified TM. The TM must be active when ATMETDAT is run. |
Parameter | Use | Possible Values | Default |
---|---|---|---|
TO | Identifies the target in which ET data will be stored. | DBnnnnn | TMnnnnn | None. |
Possible values:
Value | Description |
---|---|
No value (the default) | If the TO parameter is not
specified, ET data will be read from the specified source, but no ET data will
be stored. This feature can be used to produce a report of the ET data
contained in the source database or Transaction Manager.
|
DBnnnnn | nnnnn is a database ID in the range 1-65535. (Leading zeroes are not required.) ET data will be stored in the checkpoint file of the specified database. The database must be executing in multi-user mode when ATMETDAT is run. |
TMnnnnn | nnnnn is the database ID of an ATM Transaction Manager, in the range 1-65535. (Leading zeroes are not required.) ET data will be stored in the ET data file of the specified TM. The TM must be executing in multi-user mode when ATMETDAT is run. |
Parameter | Use | Possible Values | Default |
---|---|---|---|
REPL | Indicates whether or not ET data in the target location should be overwritten by ET data from the source location, if both locations contain data for the same ETID. | Y | N | N |
Possible values:
Value | Description |
---|---|
Y | If ET data is read from the source location, and the target location already contains ET data for the same ETID, the ET data from the source location will replace the existing ET data in the target location. |
N | If ET data is read from the source location, and the target location already contains ET data for the same ETID, the ET data from the target location will be left unchanged. |
Parameter | Use | Possible Values | Default |
---|---|---|---|
LIST | Indicates whether or not the report should contain details of all the ET data that was processed. | Y | N | N |
Possible values:
Value | Description |
---|---|
Y | The report will contain details of all the ET
data that was processed. If the REPL=Y (replace) option
is specified, the report will also contain details of any ET data that was
overwritten in the target location. If the replace option is not specified, and
ET data for the same ETID is found in both the source and target locations, the
report will contain details of both sets of data.
|
N | The report will contain only a summary of the processing that was carried out. No detail will be given of the ET data processed. |
ET data will be read from the checkpoint file of database 135 and stored in the ET data file of Transaction Manager 20535. If any ETID has ET data in both database 135 and TM 20535, the ET data from database 135 will replace the existing data in the ET data file of TM 20535. Details of all processed ET data will appear in the report.
FROM=DB135 TO=TM20535 REPL=Y LIST=Y
On successful completion, ATMPETD will terminate with a return code of zero. Any other return code indicates an error, and in some cases will be accompanied by an ATM159 error message, which will give details of the cause of failure.
Possible return codes are as follows.
Return code | Meaning |
---|---|
0 | Execution was successful. |
20 | Error opening TMETIN. |
24 | Invalid parameter input. |
28 | FROM= was not
specified.
|
32 | Error opening TMETOUT. |
36 | Error writing to TMETOUT. |
40 | Unexpected response from source
(FROM= ) location. Check the TMETOUT report for
details.
|
44 | Unexpected response from target
(TO= ) location. Check the TMETOUT report for
details.
|