Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
6-41
END-TRANSACTION Statement
quotient
is the identifier of an elementary numeric data item where the quotient is stored.
DIVIDE BY GIVING Statement
The DIVIDE BY GIVING statement is the same as DIVIDE GIVING, except the
dividend is specified first.
dividend
is either a numeric literal or the identifier of an elementary numeric data item.
divisor
is either a numeric literal or the identifier of an elementary numeric data item.
quotient
is the identifier of an elementary numeric item where the quotient is stored.
The following example illustrates the DIVIDE BY GIVING statement:
WORKING-STORAGE SECTION.
77 leap-year PIC 9 VALUE ZERO.
77 divide-result PIC 99 VALUE ZERO.
01 invoice-date.
05 inv-month PIC 99.
05 inv-day PIC 99.
05 inv-year PIC 99.
:
PROCEDURE DIVISION.
:
DIVIDE inv-year BY 4 GIVING divide-result.
:
END-TRANSACTION Statement
The END-TRANSACTION statement marks the completion of a sequence of operations
that are treated as a single transaction. When this statement executes, the terminal
leaves 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.
If TMF accepts this statement, any database updates made during the transaction
become committed, the terminal leaves transaction mode, and the special register
TRANSACTION-ID is set to SPACES. If TMF rejects this statement, transaction
restart occurs.
DIVIDE dividend BY divisor GIVING { quotient } ,...
END-TRANSACTION