Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-18
BEGIN-TRANSACTION Statement
01 stockroom-supplies.
05 writing-tools.
10 pencils PIC 99.
10 erasers PIC 99.
10 pens PIC 99.
05 paper-clips PIC 99.
05 paper PIC 99.
:
PROCEDURE DIVISION.
:
ADD CORRESPONDING cabinet-supplies TO stockroom-supplies.
In the following example, only one item (6-12-years) corresponds between the groups:
01 test-group-1. 01 test-group-2.
05 children. 05 children.
10 1-5-years 10 1-3-years
10 6-12-years 10 4-5-years
05 teen-agers. 10 6-12-years
10 13-15-years 05 teen-agers
10 16-19-years
05 adults
10 women
10 men
Assuming all items are numeric, the following statement sums 6-12-years of children of
test-group-1 with 6-12-years of children of test-group-2:
ADD CORRESPONDING test-group-1 TO test-group-2
BEGIN-TRANSACTION Statement
The BEGIN-TRANSACTION statement marks the beginning of a sequence of
operations that are to be treated as a single transaction. When this statement executes,
the terminal enters transaction mode. Transaction mode is an operating mode in which
Pathway servers that are configured to run under the Transaction Management Facility
(TMF) can lock and update audited files.
TMF starts a new transaction and assigns a transaction-ID number to the terminal. This
number is placed in the special register TRANSACTION-ID. Two other special
registers are set: RESTART-COUNTER is set to 0 to indicate that the transaction is
being started for the first time, and TERMINATION-STATUS is set to 1 to indicate that
the transaction has started.
ON ERROR
provides a point of control if an error is encountered. No test is made against the
transaction restart limit; the transaction is restarted and the ON ERROR branch is
taken.
BEGIN-TRANSACTION [ ON ERROR imperative-statement ]