Managing Account Control Operations (ACCTCTRL)
The ACCTCTRL program is responsible for managing account control operations. It starts by initializing necessary variables and retrieving the number of accounts associated with a given sort code. The program then displays the output data and ends the process.
The flow begins with the PREMIERE
GET-NUMBER-OF-ACCOUNTS-DB2
GET-ME-OUT-OF-HERE
Lets' zoom into the flow:
PREMIERE Section
The PREMIERE
SORTCODE
REQUIRED-SORT-CODE
GET-NUMBER-OF-ACCOUNTS-DB2
GET-ME-OUT-OF-HERE
PREMIERE SECTION.
P010.
MOVE SORTCODE TO
REQUIRED-SORT-CODE.
PERFORM GET-NUMBER-OF-ACCOUNTS-DB2
D DISPLAY 'OUTPUT DATA IS='
D DFHCOMMAREA.
PERFORM GET-ME-OUT-OF-HERE.
P999.
EXIT.
GET-NUMBER-OF-ACCOUNTS-DB2
Section
GET-NUMBER-OF-ACCOUNTS-DB2
The GET-NUMBER-OF-ACCOUNTS-DB2
DFHCOMMAREA
REQUIRED-SORT-CODE
HV-ACCOUNT-SORTCODE
ACCOUNT-CONTROL-SUCCESS-FLAG
NUMBER-OF-ACCOUNTS
SQLCODE
SQLCODE-DISPLAY
GET-NUMBER-OF-ACCOUNTS-DB2 SECTION.
WCD010.
INITIALIZE DFHCOMMAREA.
MOVE REQUIRED-SORT-CODE TO HV-ACCOUNT-SORTCODE
EXEC SQL
SELECT COUNT(*)
INTO :HV-NUMBER-OF-ACCOUNTS
FROM ACCOUNT
WHERE ACCOUNT_SORTCODE = :HV-ACCOUNT-SORTCODE
END-EXEC.
IF SQLCODE = ZERO
MOVE 'Y' TO ACCOUNT-CONTROL-SUCCESS-FLAG
MOVE HV-NUMBER-OF-ACCOUNTS TO NUMBER-OF-ACCOUNTS
ELSE
MOVE 'N' TO ACCOUNT-CONTROL-SUCCESS-FLAG
MOVE SQLCODE TO SQLCODE-DISPLAY
GET-ME-OUT-OF-HERE
Section
GET-ME-OUT-OF-HERE
The GET-ME-OUT-OF-HERE
GET-ME-OUT-OF-HERE SECTION.
GMOFH010.
EXEC CICS RETURN
END-EXEC.
GMOFH999.
EXIT.
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human