Cash Transactions (DBCRFUN)
The DBCRFUN program is responsible for updating account information in the database. It is used in a flow starting from the BNK1CRA program. The process involves initializing communication codes, updating account records in the database, and handling any errors or abnormal terminations.
The flow starts with the BNK1CRA program, which calls the DBCRFUN program. The DBCRFUN program first initializes communication codes and sets up error handling. It then updates the account information in the database by moving the account number and sort code to host variables, retrieving account information, and updating balances based on debit or credit transactions. Finally, it logs the processed transaction and exits the program.
Where is this program used?
This program is used once, in a flow starting from BNK1CRA
as represented in the following diagram:
Lets' zoom into the flow:
PREMIERE Section
First, the PREMIERE
SORTCODE
COMM-SORTC
DESIRED-SORT-CODE
UPDATE-ACCOUNT-DB2
GET-ME-OUT-OF-HERE
PREMIERE SECTION.
A010.
MOVE 'N' TO COMM-SUCCESS
MOVE '0' TO COMM-FAIL-CODE
*
* Set up some Abend handling
*
EXEC CICS HANDLE ABEND
LABEL(ABEND-HANDLING)
END-EXEC.
MOVE SORTCODE TO COMM-SORTC.
MOVE SORTCODE TO DESIRED-SORT-CODE.
*
* Determine what kind of ACCOUNT datastore we should
* be accessing
*
UPDATE-ACCOUNT-DB2
Section
UPDATE-ACCOUNT-DB2
Moving to the UPDATE-ACCOUNT-DB2
WRITE-TO-PROCTRAN
UPDATE-ACCOUNT-DB2 SECTION.
UAD010.
MOVE COMM-ACCNO TO DESIRED-ACC-NO.
MOVE DESIRED-SORT-CODE TO HV-ACCOUNT-SORTCODE.
MOVE DESIRED-ACC-NO TO HV-ACCOUNT-ACC-NO.
*
* Retrieve the account information
*
EXEC SQL
SELECT ACCOUNT_EYECATCHER,
ACCOUNT_CUSTOMER_NUMBER,
ACCOUNT_SORTCODE,
ACCOUNT_NUMBER,
ACCOUNT_TYPE,
ACCOUNT_INTEREST_RATE,
ACCOUNT_OPENED,
ACCOUNT_OVERDRAFT_LIMIT,
ACCOUNT_LAST_STATEMENT,
ACCOUNT_NEXT_STATEMENT,
GET-ME-OUT-OF-HERE
Section
GET-ME-OUT-OF-HERE
Then, the GET-ME-OUT-OF-HERE
PREMIERE
GET-ME-OUT-OF-HERE SECTION.
GMOOH010.
EXEC CICS RETURN
END-EXEC.
GOBACK.
GMOOH999.
EXIT.
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human