910-BEGIN-SUB-TRANSACTION ensures that a transaction is active and starts a subtransaction of the principal transaction. If a transaction has not been started, the start is forced by this routine.
Library |
DATABASE |
Input |
No input required. |
Output |
No output returned. |
Programming Example
PERFORM 900-FIND-BEGRNG-CMT-APCOMMENTS.
IF (CMTAPC-FOUND)
AND (CMTAPC-NAME NOT = SPACES)
AND (APC-COMMENT = SPACES)
AND (AP12F1-LINE-FC (I1) = "A" OR "C")
PERFORM 910-BEGIN-SUB-TRANSACTION
MOVE APC-REC-TYPE TO DB-REC-TYPE
MOVE APC-COMPANY TO DB-COMPANY
MOVE APC-VENDOR TO DB-VENDOR
MOVE APC-LOCATION-CODE TO DB-LOCATION-CODE
MOVE APC-SEQ-NBR TO DB-SEQ-NBR
PERFORM 840-MODIFY-APCSET4
IF (APCOMMENTS-FOUND)
MOVE CMTAPC-NAME TO APC-COMMENT
PERFORM 820-STORE-APCOMMENTS
END-IF
PERFORM 920-END-SUB-TRANSACTION
END-IF.
|