Online timed transaction method and device

By automatically starting CICS resident transactions in the CICS cluster environment and calling the timed start trading command in the CICS API, the problem of single point failure risk and low accuracy of timed transactions in the online trading system is solved, and high availability and high accuracy of timed transactions are achieved.

CN114064244BActive Publication Date: 2025-03-21BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111368701.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2025-03-21
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

The prior art has problems with single point failure risk and low timing accuracy when trading in online trading systems.

Method used

By obtaining the CICS resident transaction and transaction configuration table, the CICS resident transaction is automatically started when the REGION of the CICS cluster environment is started. The timing time points and timing cycles in the transaction configuration table are read according to the running status flag plus the exclusive lock, and the timing start transaction command in the CICS API is called for online timing transactions.

Benefits of technology

It effectively avoids the risk of single point failure of timed transactions, improves timing accuracy, and ensures high availability and accuracy of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064244B_ABST
    Figure CN114064244B_ABST
Patent Text Reader

Abstract

The present invention discloses an online timed transaction method and device, which can be used in the financial field, wherein the method comprises: obtaining a CICS resident transaction and a transaction configuration table, wherein the transaction configuration table comprises: a timed transaction name, a timed time point, a timed period, and an operation status flag; when a REGION of a CICS cluster environment is started, the CICS resident transaction is automatically started; according to the operation status flag, an exclusive lock is added to read the timed time point and the timed period in the transaction configuration table; according to the timed time point and the timed period, a timed start transaction command in a CICS API is called to perform online timed transactions. The present invention can perform online timed transactions, avoid single point failure risks, and improve timing accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the financial field, and in particular to an online timed trading method and device. It should be noted that the online timed trading method and device of the present invention can be used in the financial field, and can also be used in any field other than the financial field, and the application field of the online timed trading method and device of the present invention is not limited. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] In the online trading system of the financial industry, there are some business scenarios that need to be started and processed on a scheduled basis in the online trading environment, such as scheduled automatic deductions in certain specific scenarios, scheduled message sending to related systems, and so on.

[0004] In the prior art, the method of writing tasks into the pending task table regularly using crontab is usually adopted, and then the resident transaction polls and processes them. However, since crontab is usually timed on a single machine, there is a risk of single point failure. If crontab timing is configured on multiple servers to avoid the risk of single point failure, the scheduled tasks will be repeatedly written into the pending task table. Moreover, if there are many scheduled transactions at the same time point, there may be some time deviations when the scheduled tasks are written into the task table regularly and then processed by the resident transaction polling, and the timing accuracy is low.

[0005] Therefore, there is an urgent need for an online timed transaction solution that can overcome the above problems. Summary of the invention

[0006] The embodiment of the present invention provides an online timed transaction method for performing online timed transactions, avoiding the risk of single point failure, and improving timing accuracy. The method includes:

[0007] Obtaining a CICS resident transaction and a transaction configuration table, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed period, and an operation status flag;

[0008] When the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started;

[0009] According to the running status flag, an exclusive lock is added to read the timing time point and timing cycle in the transaction configuration table;

[0010] According to the timing time point and the timing cycle, the timing start transaction command in the CICS API is called to perform online timing transaction.

[0011] The embodiment of the present invention provides an online timed transaction device for performing online timed transactions, avoiding the risk of single point failure, and improving timing accuracy. The device includes:

[0012] The configuration table acquisition module is used to obtain CICS resident transactions and transaction configuration tables, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed cycle, and an operation status flag;

[0013] A transaction automatic start module, used for automatically starting the CICS resident transaction when the REGION of the CICS cluster environment is started;

[0014] A timing cycle reading module, used to read the timing time point and timing cycle in the transaction configuration table with an exclusive lock according to the running status flag;

[0015] The online timed transaction module is used to call the timed start transaction command in the CICS API to perform online timed transactions according to the timed time point and the timed cycle.

[0016] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned online scheduled transaction method when executing the computer program.

[0017] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned online scheduled transaction method is implemented.

[0018] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned online scheduled transaction method is implemented.

[0019] Compared with the technical solution in the prior art that uses crontab to write tasks into the pending task table regularly and then polls the resident transaction for processing, the embodiment of the present invention obtains the CICS resident transaction and the transaction configuration table, the transaction configuration table includes: the scheduled transaction name, the scheduled time point, the timing cycle, and the running status flag; when the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started; according to the running status flag, the scheduled time point and the timing cycle in the transaction configuration table are read with an exclusive lock; according to the scheduled time point and the timing cycle, the scheduled start transaction command in the CICS API is called to perform online scheduled transactions. In the embodiment of the present invention, the data in the CICS resident transaction and the transaction configuration table work together to achieve the purpose of starting the CICS transaction regularly, and the API of the CICS scheduled start transaction is called to achieve the timing effect, the timing accuracy is high, and the single point failure risk of timing is effectively avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0021] Figure 1 A schematic diagram of an online timed transaction method in an embodiment of the present invention;

[0022] Figure 2 It is a flow chart of the online timed transaction method in a specific embodiment of the present invention;

[0023] Figure 3 It is a structural diagram of an online timed transaction device in an embodiment of the present invention;

[0024] Figure 4 It is a structural diagram of another online timed transaction device in an embodiment of the present invention;

[0025] Figure 5 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0027] First, the technical terms in the embodiments of the present invention are introduced:

[0028] CICS: CICS is a product that provides online transaction processing and transaction management for applications. Its function is to provide a transaction processing environment for business applications.

[0029] CICS REGION: A region is the basic operating unit of CICS. It processes client request transactions, maintains and uses a pool of processes, each of which provides a complete environment for processing transactions and coordinates all resource services required by its application servers.

[0030] CICS cluster: To avoid single point of failure, multiple regions work together to achieve high availability.

[0031] TD:Transaction Definitions Transaction definition in CICS resource definition. The transaction name is 4 characters long.

[0032] PD:Program Definitions Program definition in CICS resource definition. The program name is 8 characters long.

[0033] RD:Region Definitions The region definition in CICS resource definition defines the parameters of the region.

[0034] COBOL: Common Business-Oriented Language, COBOL language, is a high-level programming language, mainly used for data processing, and is widely used in systems in financial industries such as banking, insurance, and securities.

[0035] Batch processing: various types of processing that need to be completed automatically at the end of the day after the application system's daily online business processing is completed.

[0036] In order to perform online timed transactions, avoid the risk of single point failure, and improve timing accuracy, an embodiment of the present invention provides an online timed transaction method, such as Figure 1 As shown, the method may include:

[0037] Step 101: obtain CICS resident transactions and transaction configuration table, wherein the transaction configuration table includes: timed transaction name, time point, time period, and operation status flag;

[0038] Step 102, when the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started;

[0039] Step 103: according to the running status flag, add an exclusive lock to read the timing time point and timing period in the transaction configuration table;

[0040] Step 104: According to the timing time point and the timing cycle, the timing start transaction command in the CICS API is called to perform online timing transaction.

[0041] Depend on Figure 1As shown, it can be known that compared with the technical solution in the prior art that uses crontab to write tasks into the pending task table regularly and then polls the resident transaction for processing, the embodiment of the present invention obtains the CICS resident transaction and transaction configuration table, and the transaction configuration table includes: the scheduled transaction name, the scheduled time point, the timing period, and the running status flag; when the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started; according to the running status flag, the scheduled time point and the timing period in the transaction configuration table are read with an exclusive lock; according to the scheduled time point and the timing period, the scheduled start transaction command in the CICS API is called to perform online scheduled transactions. In the embodiment of the present invention, the data in the CICS resident transaction and the transaction configuration table work together to achieve the purpose of starting the CICS transaction regularly, and the API of the CICS scheduled start transaction is called to achieve the timing effect, the timing accuracy is high, and the single point failure risk of timing is effectively avoided.

[0042] In the embodiment, a CICS resident transaction and a transaction configuration table are obtained, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed period, and an operation status flag.

[0043] In the specific implementation, you first need to define CICS resources, and configure CICS resident transactions and each transaction that needs to be executed regularly in the TD, PD, and RD of the CICS resource definition. Configure the transactions that need to be executed regularly in the scheduled transaction configuration table, and set the time and cycle for scheduled start. Specifically, develop each business scenario that needs to be executed regularly as an independent online transaction, and define TD and PD in the CICS resource definition. Set up a scheduled transaction configuration table (hereinafter referred to as the transaction configuration table), and configure the transaction name, scheduled time point, scheduled cycle, running status flag, etc. that need to be executed regularly in the transaction configuration table.

[0044] In the embodiment, when the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started. According to the running state flag, an exclusive lock is added to read the timing time point and timing cycle in the transaction configuration table.

[0045] In this embodiment, the running status flag includes: a non-running status flag and a running status flag; according to the running status flag, adding an exclusive lock to read the timing time point and timing period in the transaction configuration table includes: adding an exclusive lock to read the running status flag in the transaction configuration table as the timing time point and timing period corresponding to the non-running status flag.

[0046] In the specific implementation, develop an independent CICS resident transaction, define TD, PD, and RD in the CICS resource definition. The transaction is set to start automatically when the region starts, and runs on each region of the CICS cluster. The resident transaction locks and scans the timed transaction configuration table, and starts the transaction in the configuration table according to the timed start time and timed cycle configured in the configuration table by calling the API provided by CICS to start the transaction at the specified time. After the transaction is successfully started, the running status flag in the configuration table is set to run.

[0047] In the embodiment, according to the timing time point and the timing cycle, the timing start transaction command in the CICS API is called to perform online timing transaction.

[0048] In this embodiment, according to the timing time point and the timing cycle, calling the timing start transaction command in the CICS API to perform online timing transaction includes:

[0049] Get the scheduled transaction name and current date;

[0050] Matching the current date with the timing time point and the timing period;

[0051] If the match is successful, the scheduled transaction start command in the CICS API is called to start the transaction corresponding to the scheduled transaction name, wherein after the scheduled transaction start command in the CICS API is successfully called, the corresponding running state flag is set to the running state flag.

[0052] In this embodiment, the online scheduled transaction method further includes: in the daily end-of-day batch processing, resetting the running state flag in the transaction configuration table to a non-running state flag.

[0053] The embodiment of the present invention starts a transaction on a scheduled basis through the API provided by CICS. By calling EXEC CICS STARTTRANSID (transaction name), TIME (start time), and RESP (return code), a CICS transaction is started at a specified time, and the timing accuracy can be accurate to seconds. In resident transactions, the timing period and timing date in the configuration table need to be parsed, and the current time point and the pre-set timing period are matched and compared. The transaction is started on a scheduled basis only when the set period is met. A resident transaction for starting various types of scheduled transactions is started on each REGION in the CICS cluster environment. Avoid single point failures of the server and improve high availability. When reading the scheduled transaction configuration table, use an exclusive lock to read it to avoid the scheduled transaction being repeatedly started by multiple REGIONs. Set a scheduled transaction configuration table to configure the time points and periods at which various types of scheduled transactions need to be started.

[0054] In this embodiment, a function of weekly timing can be added. In the resident transaction, it is determined what day of the week the current date is and whether it meets the operating date requirements in the configuration table. If so, the transaction is started at the configured timing time. After adding a weekly timing cycle, the corresponding transactions can be scheduled to run on a daily, monthly, or weekly basis, and the timing accuracy can be accurate to seconds.

[0055] A specific embodiment is given below to illustrate the specific application of online timed transactions in the embodiment of the present invention. Figure 2 As shown in the figure, it is implemented based on UNIX, COBOL, CICS, and ORACLE. It is suitable for application systems that use UNIX as the operating system, CICS as the transaction middleware, and COBOL as the development language. In the CICS application, the CICS API is called to start the transaction on a scheduled basis. Usually, the application system that uses CICS as the middleware in the financial industry is built on the CICS cluster environment. A resident transaction is run on each region of the CICS cluster, and the scheduled transaction configuration table is locked and scanned to avoid the risk of single point failure. Using the scheduled transaction start command in the CICS API, the timing accuracy is also higher.

[0056] 1. A timed transaction configuration table needs to be designed. The table describes the transaction name, timing time point, timing cycle, etc. that need to be executed on a scheduled basis, and also records the current running status flag.

[0057] 2. A CICS resident transaction needs to be developed. This CICS resident transaction runs on each region in the CICS cluster environment and starts automatically when the region starts. It adds an exclusive lock to scan the unrunning transactions in the scheduled transaction configuration table and determines whether the current time matches the timing period and date in the configuration table. If they match, the transaction is started on time by calling the CICS scheduled transaction API (specifying the start time, minutes and seconds when calling the API). For transactions that are successfully started, the running status flag in the configuration table is set to run.

[0058] 3. Resource definition is required in CICS. CICS resident transactions are defined in TD and PD, configured in RD, and automatically started when REGION starts. Various transactions that need to be run at regular intervals are also defined as CICS transactions and defined in TD and PD.

[0059] 4. In the daily end-of-day batch processing of the application system, the records in the configuration table must be initialized to "not running".

[0060] In a specific embodiment of the present invention, the transaction name, timing time, timing cycle, whether it has been run, etc. of the scheduled transaction are configured in a table, a CICS resident transaction is developed, and it is run on each region in the CICS cluster environment. The resident transaction locks and scans the automatic transaction configuration table, and the transaction is run regularly through the timing function in the CICS API according to the data in the table. The content of the transaction configuration table is shown in Table 1.

[0061] Table 1

[0062]

[0063]

[0064] In a specific embodiment of the present invention, the CICS resident transaction process is as follows:

[0065] (1) The transaction starts automatically when the CICS region starts.

[0066] (2) Add an exclusive lock to read the data in the scheduled transaction configuration table with the running status of "N-Not Running". (To prevent repeated transactions from being started when multiple regions read the configuration table, select...forupdate with an exclusive lock is used when reading records). To reduce the occupation of CICS resources, only the records with a scheduled time close to the current time are read.

[0067] (3) Parse the start cycle and timing date in the configuration table to determine whether the current date meets the start cycle configured in the timing transaction configuration table. If so, start each transaction by calling the API provided by CICS: EXEC CICS START TRANSID (transaction name), TIME (start time hours, minutes, seconds), RESP (return code). If the start is successful, set the running status flag in the configuration table to "running" and continue to process the next record. If the start fails, the transaction is delayed and the above steps (2) and (3) are repeated in a loop.

[0068] (4) After the records in the table are processed, the above steps (2), (3), and (4) are repeated in a loop after the transaction delay.

[0069] In addition, the running status flag in the scheduled transaction configuration table needs to be reset to "not running" in the daily end-of-day batch.

[0070] The embodiment of the present invention develops a CICS resident transaction, which is automatically started when the region is started. The resident transaction calls the API of the timed start transaction in CICS to achieve the purpose of timing (the hour, minute, and second of the start transaction are set when calling the API), and parses the timing period and timing date in the configuration table, matches and compares the current date with the preset timing period, and starts the transaction according to the set timing period to achieve the purpose of starting according to the set period. In the CICS cluster environment, each region runs such a resident transaction to avoid single point failure. When reading the timed transaction configuration table, an exclusive lock is used to read to avoid multiple regions from repeatedly starting the same timed transaction. Develop various types of processing that need to be started on time as independent CICS transactions, set a timed transaction configuration table, describe the startup requirements of various types of timed transactions, set the transaction name, timed transaction start time point, timing period, etc. of various types of timed transactions in the timed transaction configuration table, and record the running status. In the daily batch module, the running status in the timed transaction configuration table is reset accordingly. The present invention provides an online timed transaction operation mechanism for an application system using CICS as transaction middleware and COBOL as a development language, develops various business scenarios that need to be processed on a timed basis into independent transactions, and configures them in a timed transaction configuration table. A CICS resident transaction and the data in the configuration table work together to achieve the purpose of starting the CICS transaction on a timed basis. In the CICS resident transaction, the timed weekday and date are parsed and matched, and the API of the CICS timed transaction start is directly called to achieve the timing effect with high timing accuracy. The CICS resident transaction in the present invention runs simultaneously on multiple regions in a cluster environment, avoiding the risk of single-point failure of timing. At the same time, the locking mechanism is used to avoid repeated startup of transactions on multiple regions, and the CICS application system can be used as a general timed transaction mechanism.

[0071] Based on the same inventive concept, the embodiment of the present invention also provides an online timed transaction device, as described in the following embodiments. Since the principles of solving these problems are similar to those of the online timed transaction method, the implementation of the online timed transaction device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0072] Figure 3 FIG. 1 is a structural diagram of an online timing transaction device in an embodiment of the present invention. Figure 3 As shown, the online timing transaction device includes:

[0073] The configuration table acquisition module 301 is used to obtain the CICS resident transaction and transaction configuration table, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed period, and an operation status flag;

[0074] The transaction automatic start module 302 is used to automatically start the CICS resident transaction when the REGION of the CICS cluster environment is started;

[0075] The timing cycle reading module 303 is used to read the timing time point and timing cycle in the transaction configuration table with an exclusive lock according to the running state flag;

[0076] The online timed transaction module 304 is used to call the timed start transaction command in the CICS API to perform online timed transactions according to the timed time point and the timed cycle.

[0077] In one embodiment, the running status flag includes: a non-running status flag and a running status flag;

[0078] The timing cycle reading module is further used to: add an exclusive lock to read the timing time point and timing cycle corresponding to the running state flag of the non-running state flag in the transaction configuration table.

[0079] In one embodiment, the online scheduled transaction module is further used to:

[0080] Get the scheduled transaction name and current date;

[0081] Matching the current date with the timing time point and the timing period;

[0082] If the match is successful, the scheduled transaction start command in the CICS API is called to start the transaction corresponding to the scheduled transaction name, wherein after the scheduled transaction start command in the CICS API is successfully called, the corresponding running state flag is set to the running state flag.

[0083] In one embodiment, if Figure 4 As shown, Figure 3 The online timed transaction device also includes:

[0084] The status flag resetting module 305 is used to reset the running status flag in the transaction configuration table to a non-running status flag in the daily end-of-day batch processing.

[0085] Based on the above invention concept, Figure 5 As shown, an embodiment of the present invention further provides a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520, wherein the processor 520 implements the above-mentioned online scheduled transaction method when executing the computer program 530.

[0086] Based on the aforementioned inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned online scheduled transaction method is implemented.

[0087] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned online scheduled transaction method is implemented.

[0088] Compared with the technical solution in the prior art that uses crontab to write tasks into the pending task table regularly and then polls the resident transaction for processing, the embodiment of the present invention obtains the CICS resident transaction and the transaction configuration table, the transaction configuration table includes: the scheduled transaction name, the scheduled time point, the timing cycle, and the running status flag; when the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started; according to the running status flag, the scheduled time point and the timing cycle in the transaction configuration table are read with an exclusive lock; according to the scheduled time point and the timing cycle, the scheduled start transaction command in the CICS API is called to perform online scheduled transactions. In the embodiment of the present invention, the data in the CICS resident transaction and the transaction configuration table work together to achieve the purpose of starting the CICS transaction regularly, and the API of the CICS scheduled start transaction is called to achieve the timing effect, the timing accuracy is high, and the single point failure risk of timing is effectively avoided.

[0089] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0090] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0091] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0093] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An online timed transaction method, characterized in that: include: Obtaining a CICS resident transaction and a transaction configuration table, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed period, and an operation status flag; When the REGION of the CICS cluster environment is started, the CICS resident transaction is automatically started; According to the running status flag, the CICS resident transaction adds an exclusive lock to read the timing time point and timing period in the transaction configuration table; According to the timing time point and the timing cycle, calling the timing start transaction command in the CICS API to perform online timing transaction; Wherein, the CICS resident transaction is run simultaneously on multiple REGIONs in a cluster environment, and the running status flag includes: a non-running status flag and a running status flag; According to the running state flag, the CICS resident transaction adds an exclusive lock to read the timing time point and the timing period in the transaction configuration table, including: adding an exclusive lock to read the timing time point and the timing period corresponding to the running state flag in the transaction configuration table that is not running; when reading the transaction configuration table, the exclusive lock is used to read, so as to avoid multiple REGIONs from repeatedly starting the same timing transaction; According to the timing time point and the timing cycle, calling the timing start transaction command in the CICS API to perform online timing transaction, including: obtaining the timing transaction name and the current date; matching the current date with the timing time point and the timing cycle; if the match is successful, calling the timing start transaction command in the CICS API to start the transaction corresponding to the timing transaction name, wherein after the timing start transaction command in the CICS API is successfully called, the corresponding running state flag is set to the running state flag; In the daily end-of-day batch processing, the running status flag in the transaction configuration table is reset to a non-running status flag.

2. An online timed transaction device, characterized in that: include: The configuration table acquisition module is used to obtain CICS resident transactions and transaction configuration tables, wherein the transaction configuration table includes: a timed transaction name, a timed time point, a timed cycle, and an operation status flag; A transaction automatic start module, used for automatically starting the CICS resident transaction when the REGION of the CICS cluster environment is started; A timing cycle reading module is used to read the timing time point and timing cycle in the transaction configuration table according to the operation status flag and the CICS resident transaction with an exclusive lock; An online timed transaction module, used to call a timed start transaction command in a CICS API to perform online timed transactions according to the timed time point and the timed cycle; Wherein, the CICS resident transaction is run simultaneously on multiple REGIONs in a cluster environment, and the running status flag includes: a non-running status flag and a running status flag; The timing cycle reading module is further used for: the CICS resident transaction adds an exclusive lock to read the timing time point and timing cycle corresponding to the running state flag in the transaction configuration table as the non-running state flag; when reading the transaction configuration table, the exclusive lock method is used to read to avoid multiple regions from repeatedly starting the same timing transaction; The online timed transaction module is further used to: obtain the timed transaction name and the current date; match the current date with the timed time point and the timed period; if the match is successful, call the timed transaction start command in the CICS API to start the transaction corresponding to the timed transaction name, wherein after the timed transaction start command in the CICS API is successfully called, the corresponding running state flag is set to the running state flag; The status flag resetting module is used to reset the running status flag in the transaction configuration table to a non-running status flag in the daily end-of-day batch processing.

3. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to claim 1 is implemented.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to claim 1 is implemented.

5. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 is implemented.

Citation Information

Patent Citations

  • Process control method and apparatus for CICS cluster environment

    CN107832133A

  • Service data uploading method and device and storage medium

    CN110365775A