U@BEGSUBTRAN 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.
Module
|
DATABASE
|
Input
|
No input required.
|
Output
|
No output returned.
|
Programming Example
CALLP U@@ATTACHIO('CFNDBEG': DAPC@@HANDLE:
%ADDR(DAPC@C@@PATH): %ADDR(DAPC@RECORD):
%ADDR(DAPC@C@))
IF DAPC@C@FOUND = 0
AND DAPC@C@NAME <> *BLANKS
AND DAPCCMMNT = *BLANKS
AND (F1@LINEFC(I1) = 'A'
OR F1@LINEFC(I1) = 'C')
CALLP U@BEGSUBTRAN Begin Sub Transactio
EVAL D@RCTYP = DAPCRCTYP
EVAL D@CMPNY = DAPCCMPNY
EVAL D@VENDOR = DAPCVENDOR
EVAL D@LCTNCD = DAPCLCTNCD
EVAL D@SEQNBR = DAPCSEQNBR
CALLP DN@DBAPAPC4(E@DBDELETE)
IF DAPC@NOTFOUND = FALSE
EVAL DAPCCMMNT = DAPC@C@NAME
CALLP DAPC@IO(E@DBSTORE) DBAPAPC
ENDIF
CALLP U@ENDSUBTRAN End Sub Transaction
ENDIF
|