CN111679930A - Single-point rollback method and system for CICS online transaction - Google Patents

Single-point rollback method and system for CICS online transaction Download PDF

Info

Publication number
CN111679930A
CN111679930A CN202010511662.0A CN202010511662A CN111679930A CN 111679930 A CN111679930 A CN 111679930A CN 202010511662 A CN202010511662 A CN 202010511662A CN 111679930 A CN111679930 A CN 111679930A
Authority
CN
China
Prior art keywords
transaction
processing result
program
result information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010511662.0A
Other languages
Chinese (zh)
Other versions
CN111679930B (en
Inventor
范啸风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010511662.0A priority Critical patent/CN111679930B/en
Publication of CN111679930A publication Critical patent/CN111679930A/en
Application granted granted Critical
Publication of CN111679930B publication Critical patent/CN111679930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0715Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a system implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Abstract

The invention provides a single-point rollback method and a single-point rollback system for CICS online transaction, wherein the method comprises the following steps: acquiring transaction data; calling an online application main program and an online application program for processing transaction data; executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the preset pushing information priority to obtain the processing result information and pushing the processing result information to the previous level; when the information is pushed to the online application main program, executing the online application main program, and performing transaction processing according to the processing result information pushed by the previous stage, wherein if the processing result information is successful, the transaction is submitted; if the processing result information is warning, notifying manual confirmation, and submitting the transaction when the manual authorization confirms submission; when the rollback is authorized manually, the transaction is called to be rolled back; and if the processing result information is failure, rolling back the transaction.

Description

Single-point rollback method and system for CICS online transaction
Technical Field
The invention relates to the technical field of CICS online transaction processing, in particular to a single-point rollback method and a single-point rollback system for CICS online transaction.
Background
In the existing implementation scheme of CICS online transaction, one transaction often synchronously calls a plurality of programs, and the programs cooperate to complete one transaction; in the process of processing, any called program has the possibility of error, and at this time, in order to ensure the transaction consistency, the error program needs to send a rollback command to recover the modification of all programs on the whole link.
FIG. 5 is a flow chart illustrating a CICS online transaction processing in the prior art. Referring to fig. 5, after the front end uploads the transaction data, the CICS middleware system sequentially calls the required on-line application main program and the on-line application program(s), and returns success information to the previous stage after each stage of processing succeeds; for the case of processing failure (error), a failure message is returned and a rollback command is issued.
In this respect, the following problem can be seen on the basis of the solution of fig. 5:
1. because each program issues a rollback command when failing, each program needs to have a section of logic for judging whether failing and interacting with the CICS system to realize transaction rollback, so that codes are repeated, the reusability is extremely low, and confusion and errors of transaction processing logic are easily caused; and each program needs to interact with the CICS system, so that each developer is required to have certain skills for command and programming of the CICS system, and the technical threshold of the developer is improved.
2. Upon encountering a change in the rollback decision conditions and logic, every procedure on the transaction link is modified, resulting in increased maintenance costs.
Therefore, a technical solution for improving the push method and the rollback method of the processing information of the CICS online transaction is needed to overcome the above problems.
Disclosure of Invention
In order to overcome the problems, the invention provides a single-point rollback method and a single-point rollback system for CICS online transaction. The method and the system are provided with a processing information pushing mechanism, preset processing information and processing information codes are pushed to a main program at the outermost layer from an error program, a set of error information rollback judgment mechanism is established in the main program in a unified manner, and transaction rollback processing is performed in a unified manner; the overall program architecture of single transaction rollback adopted in the scheme can centralize all logics which have errors and need data rollback in CICS online transactions to one point of a main control program, is convenient for program maintenance and reuse, and also reduces code development difficulty and risk; in addition, by setting a message pushing mechanism and priority pushing logic, the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step without being covered by errors, and confusion of the processing information and errors of transaction processing logic are avoided.
In order to solve the technical problem, the application provides the following technical scheme:
in a first aspect, the present application provides a single-point rollback method for CICS online transaction, including:
acquiring transaction data;
calling an online application main program and an online application program for processing the transaction data according to the transaction data;
executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the self transaction processing result and the processing result information pushed by the next level, and pushing the processing result information to the previous level;
when the information is pushed to the online application main program, the online application main program is executed, and the transaction processing is carried out according to the processing result information pushed by the upper level, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
In a second aspect, the present application provides a single point rollback system for CICS online transaction, the system comprising:
the transaction data acquisition module is used for acquiring transaction data;
the program calling module is used for calling an online application main program and an online application program for processing the transaction data according to the transaction data;
the online application program execution module is used for sequentially executing each level of online application program to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the self transaction processing result and the processing result information pushed by the next level, and pushing the processing result information to the previous level;
an online application main program executing module for executing the online application main program when the processing result information is pushed to the online application main program, and performing transaction processing according to the processing result pushed by the previous stage, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a single-point rollback method for CICS online transaction when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements a single point rollback method for CICS online transactions.
The single-point rollback method and the single-point rollback system for CICS online transaction provided by the invention are provided with a processing information pushing mechanism, preset processing information and processing information codes are pushed to a main program at the outermost layer from an error program, a set of error information rollback judgment mechanism is uniformly established in the main program, and transaction rollback processing is uniformly carried out. The invention adopts the whole program architecture of single transaction rollback, can centralize all logics which need data rollback when making mistakes in CICS online transactions to one point of the main control program, is convenient for program maintenance and reuse, and also reduces the difficulty and risk of code development; moreover, the invention can ensure that the processing information of the multi-level calling program can be reasonably and effectively pushed to the main program step by setting the message pushing mechanism and the pushing logic of the priority, and can not be covered by errors, thereby avoiding the confusion of the processing information and the error of the transaction processing logic.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a single point rollback method for CICS online transactions according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating a single point rollback method for CICS online transactions according to an embodiment of the present invention.
FIG. 3 is a block diagram of a single point rollback system for CICS online transactions according to an embodiment of the present invention.
Fig. 4 is a schematic block diagram of a system configuration of an electronic apparatus according to an embodiment of the present invention.
FIG. 5 is a flow chart illustrating a CICS transaction process according to the prior art.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, the single-point rollback method, the system, the electronic equipment and the computer readable storage medium for CICS online transaction are provided, the problems that codes are repeated and the reusability is extremely low in the existing CICS online transaction processing, the chaos and the error of transaction processing logic are easily caused, the maintenance cost is high and the like are solved, the adopted overall program architecture of single-transaction rollback can concentrate all logics which need data rollback when errors occur in the CICS online transaction to one point of a main control program, the program maintenance and the reuse are convenient, and the code development difficulty and the risk are also reduced; in addition, by setting a message pushing mechanism and priority pushing logic, the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step without being covered by errors, and confusion of the processing information and errors of transaction processing logic are avoided.
In the embodiments of the present invention, terms to be described:
CICS(Customer Information Control System):
the online transaction management middleware of the host system supports extremely high concurrency, ensures strong consistency of data and is widely used in host software development; it is similar to the small machine WEBSHPERE and open platform Spring; on-line application programs developed based on the CICS are all responsible for hardware resources to be accessed, object consistency, inter-program communication, resource definition, transaction distribution, concurrency control and the like, the application programs only need to pay attention to business logic, the application development efficiency of a host is greatly improved, and the on-line application programs are widely used in banks at present.
Transaction:
all data and state changes processed in a complete transaction unit must keep strict consistency, namely, the result of the transaction is only successful or failed, and recovery is required if the transaction fails.
And (4) rolling back the affairs:
in order to ensure the data consistency in the transaction, if there is a program error, and the error is fatal and cannot be continued, the update of the data and the state made by the previous program should be completely recovered, and the execution of the subsequent program is terminated, and this action is called "transaction rollback".
The CICS, as a transaction middleware, provides commands such as commit, rolback, etc., by which an application program can control the commit or rollback of a transaction unit transaction.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
In order to implement single-point rollback of CICS online transaction, facilitate program maintenance and reuse, reduce code development difficulty and risk, and avoid confusion of processing information and transaction processing logic errors, the present invention provides a single-point rollback method of CICS online transaction, which specifically includes, with reference to fig. 1:
step S100, transaction data is acquired.
And step S200, calling an online application main program and an online application program for processing the transaction data according to the transaction data.
And step S300, executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the preset pushing information priority to obtain the processing result information, and pushing the processing result information to the previous level.
Step S400, when pushing to the online application main program, executing the online application main program, and performing transaction processing according to the processing result information pushed by the previous stage, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
To more clearly explain the single rollback method of CICS online transaction described above, reference is made to the specific embodiment of fig. 2.
Step S100:
and an operator can input transaction data through the front-end service picture, and the transaction data is uploaded to the CICS middleware system.
Step S200:
and the CICS middleware system calls an online application main program and an online application program for processing the transaction data according to the transaction data.
Referring to the embodiment shown in FIG. 2, the CICS online application main program is used to execute the processing logic of the message transaction, and the CICS online application B, CICS online application C is used to execute the specific logic of the message push mechanism.
In this embodiment, the following main program is abbreviated for CICS online application: a main program;
CICS online application program B is abbreviated as: a procedure B;
CICS online application program C is abbreviated as: and C, performing the step.
Step S300:
and sequentially executing each stage of the online application program to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next stage according to the self transaction processing result and the processing result information pushed by the next stage, and pushing the processing result information to the previous stage.
In this step, the specific message pushing process is as follows:
when the received processing result information pushed by the next level is successful, if the program execution of the program is successful, pushing the processing result information to the previous level to be successful information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
when the received processing result information pushed by the next level is warning, if the program is successfully executed, pushing the processing result information to the previous level to be the warning information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
and when the received processing result information pushed by the next level is failure, the interrupt processing process pushes the processing result information to the previous level to be the failure information.
Taking the CICS online transaction flow shown in fig. 2 as an example, the program called by the CICS middleware system includes a main program, a program B, and a program C;
program C is the lowest level program, and the upper level is program B;
the upper stage of the program B is a main program.
When each level of program is executed, the information to be pushed is generated according to the information coding mechanism. When each level of program pushes information to the next level, a preset information pushing mechanism is followed.
It should be noted that, for different transactions, there are generally multiple online applications invoked for processing transaction data, and multiple programs cooperate to complete a transaction. The present embodiment only describes the transaction process of calling the online application main program and the two-level online application programs (program B and program C) for an exemplary frame, wherein the information encoding mechanism and the information pushing mechanism adopted can be extended to the transaction process of more cascade machine application programs, and the details are not repeated herein.
Specifically, after each program is executed, the obtained processing result information includes a transaction code and transaction information; wherein,
the transaction processing code at least comprises a first code, a second code and a third code, wherein the first code represents success, warning or failure, the second code records the name of the program, and the third code is a program marking code and is used by the program in sequence;
the transaction information is a textual annotation to the transaction code.
In this embodiment, a set of information encoding mechanism of "transaction encoding (7-bit code) + transaction information" strictly followed by all programs may be established in a preset manner, where the information encoding mechanism is:
when the online application program is executed correctly, the information of Sppnnnn and transaction processing is returned, wherein the initial letter of S indicates success, the 2-bit pp is the program name, and the 4-bit nnnn is used by the program in sequence to ensure that the operation is not repeated. The literal interpretation of the information code is then returned to the upper level calling program.
When a warning error occurs in the execution of the online application program, if the situation does not need to perform transaction rollback, the transaction rollback information and the transaction processing information are returned, the initials 'W' represent warning, 2 bits 'pp' are the program name, and 4 bits 'nnnn' are used by the program in sequence, so that the situation is ensured not to be repeated. The literal interpretation of the information code is then returned to the upper level calling program.
When a fatal error occurs in the execution of the online application program, the transaction rollback is required under the condition, then the 'Eppnnnnn' and transaction processing information are returned, the initial letter 'E' indicates failure, 2 bits of 'pp' are the program name, and 4 bits of 'nnnn' are sequentially used by the program, so that the condition that the information is not repeated is ensured. The literal interpretation of the information code is then returned to the upper level calling program.
In this embodiment, the push information priority is failure, warning, and success in order from high to low.
Except the main program of the online transaction, other programs do not judge and process the submission and rollback of the transaction uniformly, when the execution of the program is finished or an error occurs, only the transaction processing coding and the transaction processing information are returned to the calling program of the previous level, and the like, and the steps are returned step by step until the main control program of the first level is returned.
Referring to fig. 2, taking the message pushing sequence of the program C, the program B, and the main program as an example:
executing each level of online application program in sequence to perform transaction processing, wherein the program C is the lowest level and has no next level program, and after the execution is completed, the processing result information of the program C includes 3 conditions:
if the processing result is successful, the processing result information pushed to the upper level is: SCCxxxx and transaction information;
if the processing result is warning, the processing result information pushed to the upper level is: wccxxx and transaction information;
if the processing result is failure, the processing result information pushed to the upper level is: ECCxxxx and transaction information.
The processing result information is pushed to the upper level of the program C, i.e., the program B.
The executive program B performs a transaction, combines the transaction result with the processing result information pushed by the program C, and generates the processing result information of the program B itself, where the processing result information of the program B includes 7 cases:
if SCCxxxx is received and the transaction result of program B is successful, the processing result information pushed to the upper level is: SBBxxxx and transaction information;
if SCCxxxx is received and the transaction result of program B is an alert, the processing result information pushed to the upper stage is: WBBxxxx and transaction information;
if SCCxxxx is received and the transaction result of program B is a failure, the processing result information pushed to the upper level is: EBBxxxx and transaction information;
if the WCCxxxx is received and the transaction result of the program B is successful, the processing result information pushed to the upper level is: wccxxx and transaction information;
if WCCxxxx is received and the transaction result of program B is warning, the processing result information pushed to the upper level is: WBBxxxx and transaction information;
if the WCCxxxx is received and the transaction result of the program B is failure, the processing result information pushed to the upper level is: EBBxxxx and transaction information;
if ECCxxxx is received, interrupting the process, and directly pushing the processing result information to the upper level as follows: ECCxxxx and transaction information;
the processing result information is pushed to the upper stage of the program B, i.e., the main program.
Step S400:
and when the information is pushed to the online application main program, executing the online application main program, and performing transaction processing according to the processing result information pushed by the previous stage.
Specifically, in combination with the above embodiment, no matter how the processing procedure of the program C is changed, the final three processing results are 3 cases: success (S), warning (W), or failure (E);
on the other hand, the process result information pushed by the program C and the transaction result of the program B are mainly 3 types of process result information that is finally pushed: success (S), warning (W), or failure (E); where differences in program names in the transaction code may occur.
In contrast, the main program performs different transactions according to 3 cases:
if the processing result information is successful (S), calling a CICS transaction command interface, submitting the transaction and returning success information;
if the processing result information is warning (W), notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual confirmation is authorized to submit; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
and if the processing result information is failure (E), calling a CICS transaction command interface, rolling back the transaction and returning failure information.
Through the process, the rollback processing of the transaction is carried out on the online application main program, so that all logics which have errors and need data rollback in the CICS online transaction can be concentrated on one point of the main control program, the program can be maintained and reused conveniently, and the code development difficulty and risk are reduced. In order to realize single-point rollback, a message pushing mechanism and priority pushing logic are set in the scheme, so that the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step and cannot be covered by errors, and confusion of the processing information and business processing logic errors are avoided.
It should be noted that although the operations of the method of the present invention have been described in the above embodiments and the accompanying drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed, to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Having described the method of the exemplary embodiment of the present invention, the single point rollback system of CICS online transaction of the exemplary embodiment of the present invention is described next with reference to fig. 3.
The implementation of the single-point rollback system for CICS online transaction may refer to the implementation of the above method, and repeated details are not repeated. The term "module" or "unit" used hereinafter may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Based on the same inventive concept, in order to realize single point rollback of CICS online transaction, facilitate program maintenance and reuse, reduce code development difficulty and risk, and avoid causing confusion of processing information and transaction processing logic errors, the invention further provides a single point rollback system of CICS online transaction, as shown in fig. 3, the system includes:
a transaction data obtaining module 301, configured to obtain transaction data.
A program calling module 302, configured to call an online application main program and an online application program for processing the transaction data according to the transaction data.
And the online application program executing module 303 is configured to sequentially execute each level of online application program to perform transaction processing, and integrate the transaction processing result and the processing result information pushed by the next level according to the transaction processing result of the online application program and the processing result information pushed by the next level, so as to obtain processing result information and push the processing result information to the previous level.
An online application main program executing module 304, configured to execute the online application main program when the processing result information is pushed to the online application main program, and perform transaction processing according to the processing result pushed by the previous stage, where,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
In one embodiment, the push information priority is failure, warning, success, in order from high to low.
In an embodiment, the online application executing module 303 is specifically configured to:
when the received processing result information pushed by the next level is successful, if the program execution of the program is successful, pushing the processing result information to the previous level to be successful information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
when the received processing result information pushed by the next level is warning, if the program is successfully executed, pushing the processing result information to the previous level to be the warning information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
and when the received processing result information pushed by the next level is failure, the interrupt processing process pushes the processing result information to the previous level to be the failure information.
In one embodiment, the processing result information includes a transaction code and transaction information; wherein,
the transaction processing code at least comprises a first code, a second code and a third code, wherein the first code represents success, warning or failure, the second code records the name of the program, and the third code is a program marking code and is used by the program in sequence;
the transaction information is a textual annotation to the transaction code.
It should be noted that although several modules of the single point rollback system of CICS online transactions are mentioned in the above detailed description, such partitioning is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module according to embodiments of the invention. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
The method and the system are provided with a processing information pushing mechanism, preset processing information and processing information codes are pushed to a main program on the outermost layer from an error program, a set of error information rollback judgment mechanism is established in the main program in a unified mode, and transaction rollback processing is conducted in the unified mode.
The whole program architecture of single transaction rollback adopted in the scheme can centralize all logics which have errors and need data rollback in CICS online transactions to one point of a main control program, is convenient for program maintenance and reuse, and also reduces code development difficulty and risk.
In addition, by setting a message pushing mechanism and priority pushing logic, the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step without being covered by errors, and confusion of the processing information and errors of transaction processing logic are avoided.
In terms of hardware, in order to implement single-point rollback of CICS online transaction, facilitate program maintenance and reuse, reduce code development difficulty and risk, and avoid confusion of processing information and transaction processing logic errors, the present application provides an embodiment of an electronic device for implementing all or part of contents in the single-point rollback method of CICS online transaction, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the electronic equipment and the operator terminal and relevant equipment such as a relevant database and the like; the electronic device may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the electronic device may refer to an embodiment of a single-point rollback system for CICS online transaction and an embodiment of a single-point rollback method for CICS online transaction in the embodiment, which are incorporated herein, and repeated details are not repeated.
Fig. 4 is a schematic block diagram of a system configuration of the electronic device 10600 according to the embodiment of the present application. As shown in fig. 4, the electronic device 10600 may include a central processor 10100 and a memory 10140; the memory 10140 is coupled to the central processor 10100. Notably, this fig. 4 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the functionality of a single roll back for CICS online transactions may be integrated into a central processor. Wherein the central processor may be configured to control:
step S100, transaction data is acquired.
And step S200, calling an online application main program and an online application program for processing the transaction data according to the transaction data.
And step S300, executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the preset pushing information priority to obtain the processing result information, and pushing the processing result information to the previous level.
Step S400, when pushing to the online application main program, executing the online application main program, and performing transaction processing according to the processing result information pushed by the previous stage, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
In steps S100 to S400, a set of processing information pushing mechanisms is used to push preset processing information and processing information codes from an error program to an outermost main program, and in the main program, a set of error information rollback judgment mechanism is uniformly established and transaction rollback processing is uniformly performed.
From the above description, the electronic device provided in the embodiment of the present application overcomes the problems that in the existing CICS online transaction processing, codes are repeated and the reuse degree is extremely low, which easily causes confusion and errors of transaction processing logic, and the maintenance cost is high, and the like, and the adopted overall program architecture of single transaction rollback can centralize all logics which need data rollback in the CICS online transaction, which make errors, to one point of the main control program, thereby facilitating program maintenance and reuse, and also reducing the code development difficulty and risk; in addition, by setting a message pushing mechanism and priority pushing logic, the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step without being covered by errors, and confusion of the processing information and errors of transaction processing logic are avoided.
In another embodiment, the single point rollback system for CICS online transaction may be configured separately from the central processor 10100, for example, the single point rollback system for CICS online transaction may be configured as a chip connected to the central processor 10100, and the single point rollback function for CICS online transaction is realized through the control of the central processor.
As shown in fig. 4, the electronic device 10600 may further include: a communication module 10110, an input unit 10120, an audio processor 10130, a display 10160, and a power source 10170. It is noted that the electronic device 10600 also does not necessarily include all of the components shown in FIG. 4; furthermore, the electronic device 10600 may also include components not shown in fig. 4, which may be referred to in the prior art.
As shown in fig. 4, the central processor 10100, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 10100 receiving input and controlling the operation of the various components of the electronic device 10600.
The memory 10140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processor 10100 may execute the program stored in the memory 10140 to realize information storage or processing, or the like.
The input unit 10120 provides input to the central processor 10100. The input unit 10120 is, for example, a key or a touch input device. The power supply 10170 is configured to provide power to the electronic device 10600. The display 10160 is used to display objects to be displayed, such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 10140 may be a solid state memory, such as a Read Only Memory (ROM), a Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 10140 may also be some other type of device. The memory 10140 includes a buffer memory 10141 (sometimes referred to as a buffer). The memory 10140 may include an application/function storage 10142, the application/function storage 10142 being used to store application programs and function programs or a flow for performing operations of the electronic device 10600 by the central processor 10100.
The memory 10140 may also include a data store 10143, the data store 10143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage section 10144 of the memory 10140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
Communication module 10110 is a transmitter/receiver 10110 that transmits and receives signals via antenna 10111. A communication module (transmitter/receiver) 10110 is coupled to the central processor 10100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 10110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be disposed in the same electronic device. The communication module (transmitter/receiver) 10110 is also coupled to a speaker 10131 and a microphone 10132 via an audio processor 10130 to provide audio output via the speaker 10131 and receive audio input from the microphone 10132 to thereby carry out usual telecommunication functions. The audio processor 10130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 10130 is also coupled to the central processor 10100, thereby enabling recording locally through the microphone 10132 and playing locally stored sounds through the speaker 10131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the single-point rollback method of a CICS online transaction in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps of the service processing method of the CICS online program based on service modeling, where the execution subject of the computer program is a server or a client, for example, the processor implements the following steps when executing the computer program:
step S100, transaction data is acquired.
And step S200, calling an online application main program and an online application program for processing the transaction data according to the transaction data.
And step S300, executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the preset pushing information priority to obtain the processing result information, and pushing the processing result information to the previous level.
Step S400, when pushing to the online application main program, executing the online application main program, and performing transaction processing according to the processing result information pushed by the previous stage, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
In steps S100 to S400, a set of processing information pushing mechanisms is used to push preset processing information and processing information codes from an error program to an outermost main program, and in the main program, a set of error information rollback judgment mechanism is uniformly established and transaction rollback processing is uniformly performed.
As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application overcomes the problems that in the existing CICS online transaction processing, codes are repeated and have a very low reuse degree, which easily causes confusion and errors of transaction processing logic, and high maintenance cost, and the like, and the adopted overall program architecture of single transaction rollback can concentrate all logics that require data rollback for errors in the CICS online transaction to one point of a main control program, thereby facilitating program maintenance and reuse, and also reducing code development difficulty and risk; in addition, by setting a message pushing mechanism and priority pushing logic, the multi-level calling program processing information can be reasonably and effectively pushed to the main program step by step without being covered by errors, and confusion of the processing information and errors of transaction processing logic are avoided.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A single point rollback method for CICS online transaction is characterized by comprising the following steps:
acquiring transaction data;
calling an online application main program and an online application program for processing the transaction data according to the transaction data;
executing each level of online application program in sequence to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the self transaction processing result and the processing result information pushed by the next level, and pushing the processing result information to the previous level;
when the information is pushed to the online application main program, the online application main program is executed, and the transaction processing is carried out according to the processing result information pushed by the upper level, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
2. The method of claim 1, wherein the predetermined priority of the push message is failure, warning, success in sequence from high to low.
3. The method of claim 2, wherein the performing each stage of the online application program in sequence to perform transaction processing, and according to the transaction processing result of the online application program and the processing result information pushed by the next stage, integrating the processing result information according to the preset push information priority and pushing the processing result information to the previous stage comprises:
when the received processing result information pushed by the next level is successful, if the program execution of the program is successful, pushing the processing result information to the previous level to be successful information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
when the received processing result information pushed by the next level is warning, if the program is successfully executed, pushing the processing result information to the previous level to be the warning information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
and when the received processing result information pushed by the next level is failure, the interrupt processing process pushes the processing result information to the previous level to be the failure information.
4. The method of claim 3, wherein the processing result information comprises a transaction code and transaction information; wherein,
the transaction processing code at least comprises a first code, a second code and a third code, wherein the first code represents success, warning or failure, the second code records the name of the program, and the third code is a program marking code and is used by the program in sequence;
the transaction information is a textual annotation to the transaction code.
5. A single point rollback system for CICS online transactions, the system comprising:
the transaction data acquisition module is used for acquiring transaction data;
the program calling module is used for calling an online application main program and an online application program for processing the transaction data according to the transaction data;
the online application program execution module is used for sequentially executing each level of online application program to perform transaction processing, integrating the transaction processing result and the processing result information pushed by the next level according to the self transaction processing result and the processing result information pushed by the next level, and pushing the processing result information to the previous level;
an online application main program executing module for executing the online application main program when the processing result information is pushed to the online application main program, and performing transaction processing according to the processing result pushed by the previous stage, wherein,
if the processing result information is successful, calling a CICS transaction command interface to submit the transaction;
if the processing result information is warning, notifying manual confirmation, and calling a CICS transaction command interface to submit the transaction when the manual authorization confirmation is submitted; when manual authorization rollback is performed, a CICS transaction command interface is called to perform rollback on the transaction;
if the processing result information is failure, a CICS transaction command interface is called to roll back the transaction.
6. The system of claim 5, wherein the predetermined priority of the push message is failure, warning, success in sequence from high to low.
7. The system of claim 6, wherein the online application execution module is specifically configured to:
when the received processing result information pushed by the next level is successful, if the program execution of the program is successful, pushing the processing result information to the previous level to be successful information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
when the received processing result information pushed by the next level is warning, if the program is successfully executed, pushing the processing result information to the previous level to be the warning information; if the execution of the program per se generates warning errors or fatal errors, pushing processing result information to the upper level to be warning or failure information;
and when the received processing result information pushed by the next level is failure, the interrupt processing process pushes the processing result information to the previous level to be the failure information.
8. The system of claim 7, wherein the processing result information comprises a transaction code and transaction information; wherein,
the transaction processing code at least comprises a first code, a second code and a third code, wherein the first code represents success, warning or failure, the second code records the name of the program, and the third code is a program marking code and is used by the program in sequence;
the transaction information is a textual annotation to the transaction code.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
CN202010511662.0A 2020-06-08 2020-06-08 Single-point rollback method and system for CICS online transaction Active CN111679930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010511662.0A CN111679930B (en) 2020-06-08 2020-06-08 Single-point rollback method and system for CICS online transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010511662.0A CN111679930B (en) 2020-06-08 2020-06-08 Single-point rollback method and system for CICS online transaction

Publications (2)

Publication Number Publication Date
CN111679930A true CN111679930A (en) 2020-09-18
CN111679930B CN111679930B (en) 2023-06-20

Family

ID=72435111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010511662.0A Active CN111679930B (en) 2020-06-08 2020-06-08 Single-point rollback method and system for CICS online transaction

Country Status (1)

Country Link
CN (1) CN111679930B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130191496A1 (en) * 2012-01-23 2013-07-25 International Business Machines Corporation Direct return to source (drs) routing of customer information control systems (cics) transactions
CN109542639A (en) * 2018-11-06 2019-03-29 用友网络科技股份有限公司 A kind of processing method, processing unit for ensureing micro services and calling data consistency
CN109684045A (en) * 2017-10-18 2019-04-26 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of transaction message
CN109885382A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 The system of cross-system distributed transaction processing method and distributing real time system
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130191496A1 (en) * 2012-01-23 2013-07-25 International Business Machines Corporation Direct return to source (drs) routing of customer information control systems (cics) transactions
CN109684045A (en) * 2017-10-18 2019-04-26 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of transaction message
CN109542639A (en) * 2018-11-06 2019-03-29 用友网络科技股份有限公司 A kind of processing method, processing unit for ensureing micro services and calling data consistency
CN109885382A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 The system of cross-system distributed transaction processing method and distributing real time system
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system

Also Published As

Publication number Publication date
CN111679930B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN111367628A (en) Distributed transaction processing method and device, message producer and consumer system
CN112615753A (en) Link abnormity tracking method, first node, second node and link
CN111897738B (en) Automatic testing method and device based on atomic service
CN112286904A (en) Cluster migration method and device and storage medium
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN111666088A (en) Pod replacement method and device, electronic equipment and computer-readable storage medium
CN111078506A (en) Business data batch running task monitoring method and device
CN112799943B (en) Service system automatic test method and device
CN111679930B (en) Single-point rollback method and system for CICS online transaction
CN115562898A (en) Distributed payment system exception handling method and device
CN111222869A (en) Transaction data processing method, device, computer equipment and medium
CN113377385A (en) Client automatic deployment method and device
CN110675247A (en) Unknown transaction processing method and system, peripheral system and core bank system
CN111930843B (en) Database-based data system and processing method
CN114816684A (en) Business processing method, device, equipment, readable storage medium and product
CN111930624B (en) Test link message data processing method and device
CN114840576A (en) Data standard matching method and device
CN113515447A (en) System automation test method and device
CN112766827A (en) Automatic processing method and device for asset inventory data
CN112785201A (en) Heterogeneous system quasi-real-time high-reliability interaction system and method
CN112102058A (en) Management system parameter configuration method and device
CN112463320A (en) Execution method, device and equipment for managing software task and readable medium
CN110827133A (en) Bank business system change commissioning and account-supplementing method and device
CN111949355B (en) Column menu shielding method and device
CN114706872A (en) Asynchronous queuing processing method and system for payment transaction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant