CN112181435B - Cross-platform job conversion method and device, electronic equipment and storage medium - Google Patents
Cross-platform job conversion method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112181435B CN112181435B CN202011017344.5A CN202011017344A CN112181435B CN 112181435 B CN112181435 B CN 112181435B CN 202011017344 A CN202011017344 A CN 202011017344A CN 112181435 B CN112181435 B CN 112181435B
- Authority
- CN
- China
- Prior art keywords
- file
- job
- platform
- batch
- instance
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 44
- 238000007781 pre-processing Methods 0.000 claims abstract description 25
- 238000013507 mapping Methods 0.000 claims description 30
- 238000005192 partition Methods 0.000 claims description 16
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 2
- 238000006467 substitution reaction Methods 0.000 claims description 2
- 238000011161 development Methods 0.000 abstract description 6
- 238000013461 design Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 12
- 238000012423 maintenance Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012216 screening Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/51—Source to source
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a cross-platform job conversion method, a device, electronic equipment and a storage medium, comprising the following steps: preprocessing a template operation file of the original platform according to a pre-configured file; carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch operation instance of the original platform; the batch job instance of the original platform is converted into the batch job instance of the appointed language, so that the batch job instance of the appointed language runs on the target platform. The batch processing operation instance of the original platform is obtained based on the template operation file of the original platform, and the batch processing operation instance of the original platform is automatically converted into the batch processing operation instance of the appointed language with stronger universality, so that under the principle of keeping the original business logic design unchanged, the cross-platform operation automatic conversion can be realized by only providing a small amount of conversion configuration parameters, the development cost and the labor cost are saved, and the standardization of the business program is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a cross-platform job conversion method, a device, electronic equipment and a storage medium.
Background
As the scale of banking business is continuously expanded, banking business logic is more and more complex and diversified, in order to support different batch business functions, different operation examples are usually required to be developed, and then, the operation execution flow is assembled according to the dependency relationship among operations to realize the business functions. While most banking systems today use the job control language (Job Control Language, JCL) language and run on international business machines corporation (International Business Machines Corporation, IBM) mainframes.
However, the existing JCL language-based operation example has high requirements on the architecture of the underlying system, can only operate on the IBM mainframe, has poor universality, and cannot be reused when the architecture of the underlying system is changed, so that under the principle of keeping the original business logic design unchanged, the reconstruction batch processing operation example needs to train the developer, manually update development specifications and matched tools by the developer, and the like, thereby increasing development cost and labor cost and reducing the standardization of business programs.
Disclosure of Invention
The embodiment of the invention provides a cross-platform job conversion method, a device, equipment and a storage medium, so as to realize the cross-platform conversion of job instances.
In a first aspect, an embodiment of the present invention discloses a cross-platform job conversion method, including:
preprocessing a template operation file of an original platform according to a pre-configured file, wherein the template operation file comprises operation steps of different types, and each operation step is composed of at least one operation text;
carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch processing operation instance of the original platform;
the batch job instance of the original platform is converted into the batch job instance of the appointed language, so that the batch job instance of the appointed language runs on the target platform.
In a second aspect, an embodiment of the present invention provides a cross-platform job conversion apparatus, including:
the preprocessing module is used for preprocessing a template operation file of the original platform according to a pre-configured file, wherein the template operation file comprises operation steps of different types, and each operation step is composed of at least one operation text;
the original platform operation example acquisition module is used for carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch operation example of the original platform;
and the target platform job instance acquisition module is used for converting the batch job instance of the original platform into the batch job instance of the appointed language so as to enable the batch job instance of the appointed language to run on the target platform.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the methods of any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of any embodiment of the present invention.
In the embodiment of the invention, the batch operation instance of the original platform is obtained based on the template operation file of the original platform, and the batch operation instance of the original platform is automatically converted into the batch operation instance of the appointed language with stronger universality, so that under the principle of keeping the original business logic design unchanged, the cross-platform operation automatic conversion can be realized by only providing a small amount of conversion configuration parameters, the development cost and the labor cost are saved, and the standardization of the business program is improved.
Drawings
FIG. 1 is a flowchart of a cross-platform job conversion method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a cross-platform job conversion method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a cross-platform job conversion device according to a third embodiment of the present invention;
fig. 4 is a block diagram of a device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a cross-platform job conversion method according to a first embodiment of the present invention, where the embodiment is applicable to a cross-platform job conversion case. The method can be executed by a cross-platform job conversion device in the embodiment of the invention, and the device can be realized by software and/or hardware, and the method in the embodiment of the invention specifically comprises the following steps:
and step 101, preprocessing the template job file of the original platform according to a pre-configured file.
The template job file contains different types of job steps, and each job step is composed of at least one job text. The different types of job steps may correspond to different service functions, for example, a file screening function, a file deleting function, or a file creating function, and the specific service functions corresponding to the different types of job steps are not limited in this embodiment. And the job text may specifically refer to each line of codes constituting a job step in practical applications.
Optionally, the preconfigured file includes: an input file record profile and an input file format profile; the input file record file comprises a mapping relation among a job file name, a job step type, a job text label, a replacement identifier, an original offset and a target offset; the input file format configuration file comprises a job file name, a job step type, a job text label, a logic file name of the input file, a mapping relation between the logic file format name and the format type.
Optionally, preprocessing the template job file of the original platform according to the pre-configured file may include: traversing each type of job step in the template job file according to the input file format configuration file; and determining whether the type of the current job step is registered in the input file format configuration file according to the traversing result, if so, adding the logical file name, the logical file format name and the format type of the input file corresponding to the type of the current job step into the job step as index marks according to the input file format configuration file, otherwise, reserving the current job step.
Specifically, the preconfigured file in this embodiment may include: the file format profile is entered and the file format profile is entered in relation to the job steps with file screening functionality. Table 1 below is an illustration of an input file format configuration file:
TABLE 1
Only a portion of the contents of the input file format configuration file will be described in the space constraint table 1. The preprocessing in this embodiment mainly aims at the job STEPs corresponding to the file screening function in the template job of the original platform, traverses each type of job STEP in the template job according to the input file format configuration file, for example, determines that the name of the job template job file is JJAFDAT1, determines that the job STEP type STEP040 in the template job file is registered according to the input file format configuration file, and adds the logical file name SORTIN, the logical file format name CBAFDAT0 and the format type VB of the input file corresponding to the job STEP040 as index marks into the job STEP 040. The form of the index mark may be { SORTIN=CBAFDAT0, VB }, which is, of course, merely illustrative, and not limited to the specific display form of the index mark. When the type of the traversed current job step is not registered in the input file format configuration file, the current job step is reserved.
Optionally, preprocessing the template job file of the original platform according to the pre-configured file may include: traversing the operation text of each label in the template operation file according to the input file record configuration file; and determining whether the label of the current operation text is registered in the input file record configuration file according to the traversing result, if so, determining a target offset parameter according to the input file record configuration file, replacing the current operation text according to the target offset parameter, and otherwise, reserving the current operation text.
Specifically, the preconfigured file in this embodiment may include: the input file record profile is also associated with a job step having a file screening function. Table 2 below is an illustration of an input file record profile:
an illustration of the input file record configuration file is shown in Table 2 below:
TABLE 2
Wherein, only a part of the contents of the input file record configuration file is described in the space restriction table 2. In this embodiment, the input file record configuration file is a supplement to the input file format configuration file, and when the input file corresponding to the job step has no existing file format definition, the input file record file may be used to directly replace the offset. Traversing the operation text of each label in the template operation according to the input file record file, for example, determining that the name of the operation template operation file is JJAFTEND, determining that the 156-label operation text corresponding to the operation STEP type STEP040 in the template operation file is registered according to the input file record configuration file, and corresponding replacement identification is Y, namely, the operation text representing the 156-label operation needs to be replaced by the offset parameter, specifically, using the target offset parameter: REFORMAT FIELDS= (: REFORMAT FIELDS= (. And when the traversed label of the current operation text is not registered in the input file record configuration file, the current operation text is reserved.
It should be noted that, in this embodiment, the template job file of the original platform may be preprocessed according to the input file record configuration file and the input file format configuration file, where the processing processes are independent of each other, and the processing processes do not interfere with each other.
And 102, carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch operation instance of the original platform.
Optionally, the parameter list includes parameter values of the job texts corresponding to different database partitions.
It should be noted that, in this embodiment, the template job file of the original platform is updated after being preprocessed, but the updated template is still in the form of a template, and the parameters included in the template have no specific numerical value, and the parameter list includes specific values of each parameter in the job text, and for different database partitions, different values can be corresponding to the same parameter. And the parameter list holds mainly the values of the parameters on the original platform, e.g. IBM mainframe. Each template job file can only contain one database partition parameter, for example pssnam, and this parameter value determines how many job instances of the original platform are finally generated, if the parameter is 10, 10 job instances are finally generated, and each job instance is assigned 001, 002, 003 and … respectively at the position of the original partition parameter. Of course, in this embodiment, the parameter pssnam is merely taken as an example, and other parameters included in the template operation after the preprocessing have corresponding values in the parameter list, which will not be described in detail in this embodiment.
It should be noted that, the types of parameters included in the parameter list include technical parameters and service parameters, and the service parameters include: the specific types of parameters included in the parameter list are not limited in the present embodiment, and are within the scope of protection of the present application as long as they are included in the template job file after preprocessing.
Optionally, performing parameter assignment on the preprocessed template job file by using a parameter list of the original platform to obtain a batch job instance of the original platform, which may include: assigning the parameter values corresponding to each database partition to the preprocessed template operation file to obtain different original platform operation examples; and constructing different original platform job instances into batch job instances of the original platform.
Specifically, in order to instantiate the preprocessed template job, the values of the parameters corresponding to each database partition may be respectively assigned to the preprocessed template job files to obtain different original platform job instances, for example, the parameter list includes the parameter pssnam=001 under the partition 1 and the parameter pssnam=002 under the partition 2. Then, parameter assignment is performed under the partition 1 to obtain a JCL job instance 1, parameter assignment is performed under the partition 2 to obtain a JCL job instance 2, and the JCL job instance 1 and the JCL job instance 2 form a batch job instance of the original platform.
Step 103, converting the batch job instance of the original platform into a batch job instance of a specified language, so that the batch job instance of the specified language runs on the target platform.
Optionally, the specified language includes: extensible markup language XML.
Optionally, the target platform comprises an X86 platform.
The extensible markup language XML in this embodiment has a lower requirement on the underlying system architecture than JCL, so that the XML can be run on different platforms, and is not limited to the IBM mainframe, and the XML in this embodiment is described by taking X86 as a target platform as an example, but is not limited to the specific type of the target platform.
Optionally, converting the batch job instance of the original platform to a batch job instance of a specified language may include: converting the batch processing operation instance of the original platform to obtain an initial batch processing operation instance of the target platform; generating a resource file according to the file format mapping table file and the database key value parameter file, wherein the resource file comprises a target offset parameter and a target database parameter; the resource file is added to the initial batch job instance to generate a batch job instance in a specified language.
Optionally, the preconfigured file further includes: file format mapping table file and database key value parameter file; the file format mapping table file comprises a mapping relation among a logical file format name, parameter information of an original field and parameter information of a target field, wherein the parameter information comprises a starting position and a length; the database key value parameter file contains the key value length of the database table in the target platform.
Specifically, in this embodiment, the JCL batch job instance of the original platform may be converted to obtain an initial XML batch job instance of the target platform, and a resource file may be generated according to the file format mapping table file and the database key value parameter file, where table 3 below shows a schematic representation of the file format mapping table file:
TABLE 3 Table 3
In this embodiment, a resource file is generated according to a file format mapping table file and a database key value parameter file, the resource file includes a target offset parameter and a target database parameter, the resource file is added to an initial XML batch job instance, and offset content recalculation on a target platform and intra-job database cleaning can be completed through the resource file, thereby generating a complete XML batch job instance.
Optionally, converting the batch job instance of the original platform to obtain the initial batch job instance of the target platform may include: constructing a general job model according to batch job instances of an original platform, wherein the general job model comprises a job entity, a job header entity, a job step entity and a file definition entity; and obtaining an initial batch job instance of the target platform based on a data processing frame of a designated language according to the general job model, wherein the data processing frame comprises a spring batch processing frame.
Specifically, in the process of generating an initial batch job instance, the job text in the batch job instance of the original platform is analyzed row by row, and a universal job model is constructed. The generic job model may include a job entity JclJobEntity, a job header entity jcljobhead header entity, a job step entity jcljobstepidentity, a file definition entity JclDDCard. An XML-based data processing framework, such as a spring batch framework, is employed to obtain an initial batch job instance of a target platform. The method specifically comprises the steps of mapping a general job model into a custom job structure object based on a spring batch processing framework, and generating a target platform batch processing job instance main body structure.
In the embodiment of the invention, the batch operation instance of the original platform is obtained based on the template operation file of the original platform, and the batch operation instance of the original platform is automatically converted into the batch operation instance of the appointed language with stronger universality, so that under the principle of keeping the original business logic design unchanged, the cross-platform operation automatic conversion can be realized by only providing a small amount of conversion configuration parameters, the development cost and the labor cost are saved, and the standardization of the business program is improved.
Example two
Fig. 2 is a flowchart of a cross-platform job conversion method according to a second embodiment of the present invention, where, based on the foregoing embodiment, after converting a batch job instance of an original platform into a batch job instance of a specified language, the method further includes: detecting batch processing operation examples of the appointed language, and carrying out alarm prompt when the batch processing operation examples are abnormal according to the detection result.
As shown in fig. 2, the method of the embodiment of the disclosure specifically includes:
step 201, preprocessing the template job file of the original platform according to the pre-configured file.
Optionally, the preconfigured file includes: an input file record profile and an input file format profile; the input file record file comprises a mapping relation among a job file name, a job step type, a job text label, a replacement identifier, an original offset and a target offset; the input file format configuration file comprises a job file name, a job step type, a job text label, a logic file name of the input file, a mapping relation between the logic file format name and the format type.
Optionally, preprocessing the template job file of the original platform according to the pre-configured file may include: traversing each type of job step in the template job file according to the input file format configuration file; and determining whether the type of the current job step is registered in the input file format configuration file according to the traversing result, if so, adding the logical file name, the logical file format name and the format type of the input file corresponding to the type of the current job step into the job step as index marks according to the input file format configuration file, otherwise, reserving the current job step.
Step 202, carrying out parameter assignment on the preprocessed template job file by adopting a parameter list of the original platform to obtain a batch job instance of the original platform.
Optionally, the parameter list includes parameter values of the job texts corresponding to different database partitions.
Optionally, performing parameter assignment on the preprocessed template job file by using a parameter list of the original platform to obtain a batch job instance of the original platform, which may include: assigning the parameter values corresponding to each database partition to the preprocessed template operation file to obtain different original platform operation examples; and constructing different original platform job instances into batch job instances of the original platform.
Step 203, converting the batch job instance of the original platform into a batch job instance of a specified language, so that the batch job instance of the specified language runs on the target platform.
Optionally, the specified language includes: extensible markup language XML.
Optionally, converting the batch job instance of the original platform to a batch job instance of a specified language may include: converting the batch processing operation instance of the original platform to obtain an initial batch processing operation instance of the target platform; generating a resource file according to the file format mapping table file and the database key value parameter file, wherein the resource file comprises a target offset parameter and a target database parameter; the resource file is added to the initial batch job instance to generate a batch job instance in a specified language.
Optionally, the preconfigured file further includes: file format mapping table file and database key value parameter file; the file format mapping table file comprises a mapping relation among a logical file format name, parameter information of an original field and parameter information of a target field, wherein the parameter information comprises a starting position and a length; the database key value parameter file contains the key value length of the database table in the target platform.
Step 204, detecting the batch processing operation instance of the appointed language, and alarming when the batch processing operation instance is abnormal according to the detection result.
Specifically, in this embodiment, after the batch job instance in the specified language is obtained, it is further required to detect the batch job instance in the specified language, specifically, detect whether there is an obvious error in the batch job instance in XML, for example, a case where there is a messy code or an obvious error in a parameter value, where the case where there is the foregoing abnormality may be an operation error in the conversion process, or a problem in the hardware of the device itself. Therefore, under the condition that the abnormal condition of the batch processing operation instance of the XML is determined, the operation and maintenance personnel can be instructed to carry out overhaul and maintenance in time by carrying out alarm prompt, so that the accuracy of the batch processing operation instance of the XML is further improved.
The alarm prompt can be specifically performed in a voice broadcast or text display mode, the specific alarm mode is not limited in the embodiment, and the alarm prompt is not limited in the embodiment as long as the alarm prompt can be performed on operation and maintenance personnel.
In the embodiment of the invention, the batch operation instance of the original platform is obtained based on the template operation file of the original platform, and the batch operation instance of the original platform is automatically converted into the batch operation instance of the appointed language with stronger universality, so that under the principle of keeping the original business logic design unchanged, the cross-platform operation automatic conversion can be realized by only providing a small amount of conversion configuration parameters, the development cost and the labor cost are saved, and the standardization of the business program is improved. Under the condition that the batch processing operation instance of the appointed language is abnormal, the operation and maintenance personnel can be instructed to carry out overhaul and maintenance in time by sending out the alarm prompt, so that the accuracy of the batch processing operation instance of the appointed language running on the target platform is improved.
Example III
Fig. 3 is a cross-platform job conversion device provided by an embodiment of the present invention, which specifically includes: a preprocessing module 310, an original platform job instance acquisition module 320, and a target platform job instance acquisition module 330.
The preprocessing module 310 is configured to preprocess a template job file of the original platform according to a preconfigured file, where the template job file includes job steps of different types, and each job step is formed by at least one job text;
the original platform operation example obtaining module 320 is configured to perform parameter assignment on the preprocessed template operation file by using a parameter list of the original platform, so as to obtain a batch processing operation example of the original platform;
the target platform job instance obtaining module 330 is configured to convert the batch job instance of the original platform into a batch job instance of a specified language, so that the batch job instance of the specified language runs on the target platform.
Optionally, the preconfigured file includes: an input file record profile and an input file format profile;
the input file record configuration file comprises a mapping relation among a job file name, a job step type, a job text label, a replacement identifier, an original offset and a target offset;
the input file format configuration file comprises a job file name, a job step type, a job text label, a logic file name of the input file, a mapping relation between the logic file format name and the format type.
Optionally, the preprocessing module is configured to: traversing the operation text of each label in the template operation file according to the input file record configuration file;
determining whether the label of the current job text is registered in the input file record configuration file according to the traversing result,
if yes, determining a target offset parameter according to the input file record configuration file, replacing the current operation text according to the target offset parameter, and otherwise, reserving the current operation text.
Optionally, the preprocessing module is further configured to: traversing each type of job step in the template job file according to the input file format configuration file;
determining whether the type of the current job step is registered in the input file format configuration file according to the traversal result,
if yes, adding the logical file name, the logical file format name and the format type of the input file corresponding to the type of the current job step into the job step as index marks according to the input file format configuration file, otherwise, reserving the current job step.
Optionally, the parameter list includes parameter values of the job texts corresponding to different database partitions.
Optionally, the original platform job instance acquisition module is configured to: assigning the parameter values corresponding to each database partition to the preprocessed template operation file to obtain different original platform operation examples;
and constructing different original platform job instances into batch job instances of the original platform.
Optionally, the preconfigured file further includes: file format mapping table file and database key value parameter file;
the file format mapping table file comprises a mapping relation among a logical file format name, parameter information of an original field and parameter information of a target field, wherein the parameter information comprises a starting position and a length;
the database key value parameter file contains the key value length of the database table in the target platform.
Optionally, the target platform job instance acquisition module includes:
the initial batch job instance obtaining sub-module is used for converting the batch job instance of the original platform to obtain an initial batch job instance of the target platform;
the resource file acquisition sub-module is used for generating a resource file according to the file format mapping table file and the database key value parameter file, wherein the resource file comprises a target offset parameter and a target database parameter;
and the target platform job instance acquisition sub-module is used for adding the resource file to the initial batch job instance to generate a batch job instance in a specified language.
Optionally, the specified language includes: extensible markup language XML.
Optionally, the initial batch job instance obtaining sub-module is configured to construct a general job model according to a batch job instance of the original platform, where the general job model includes a job entity, a job header entity, a job step entity, and a file definition entity;
and obtaining an initial batch job instance of the target platform based on a data processing frame of a designated language according to the general job model, wherein the data processing frame comprises a spring batch processing frame.
Optionally, the apparatus further comprises a detection module for: detecting batch processing operation examples of the appointed language;
and alarming and prompting when the abnormal batch processing operation instance is determined according to the detection result.
Optionally, the target platform comprises an X86 platform.
The device can execute the cross-platform job conversion method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the method provided by any embodiment of the present invention.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary electronic device 412 suitable for use in implementing embodiments of the invention. The electronic device 412 shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 4, the electronic device 412 is in the form of a general purpose computing device. Components of electronic device 412 may include, but are not limited to: one or more processors 412, a memory 428, a bus 418 that connects the various system components (including the memory 428 and the processor 416).
Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 412 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 428 is used to store instructions. Memory 428 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 430 and/or cache memory 432. The electronic device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 418 via one or more data medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored in, for example, memory 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 442 generally perform the functions and/or methodologies in the described embodiments of the invention.
The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), one or more devices that enable a user to interact with the electronic device 412, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 412 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 422. Also, the electronic device 412 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through the network adapter 420. As shown, network adapter 420 communicates with other modules of electronic device 412 over bus 418. It should be appreciated that although not shown in fig. 4, other hardware and/or software modules may be used in connection with electronic device 412, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 416 executes various functional applications and data processing by executing instructions stored in the memory 428, such as: preprocessing a template operation file of an original platform according to a pre-configured file, wherein the template operation file comprises operation steps of different types, and each operation step is composed of at least one operation text; carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch processing operation instance of the original platform; the batch job instance of the original platform is converted into the batch job instance of the appointed language, so that the batch job instance of the appointed language runs on the target platform.
Example five
A fifth embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a cross-platform job conversion method, the method comprising:
preprocessing a template operation file of an original platform according to a pre-configured file, wherein the template operation file comprises operation steps of different types, and each operation step is composed of at least one operation text; carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch processing operation instance of the original platform; the batch job instance of the original platform is converted into the batch job instance of the appointed language, so that the batch job instance of the appointed language runs on the target platform.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the above-described method operations, and may also perform the related operations in the cross-platform job conversion method provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, and the like, and includes several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute the cross-platform job conversion method according to the embodiments of the present invention.
It should be noted that the respective units and modules included in the above embodiments are divided according to the functional logic only, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (13)
1. A method for cross-platform job conversion, comprising:
preprocessing a template job file of an original platform according to a preconfigured file, wherein the template job file comprises job steps of different types, each job step is composed of at least one job text, and the preconfigured file comprises: an input file record configuration file, an input file format configuration file, a file format mapping table file and a database key value parameter file;
carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch processing operation instance of the original platform;
converting the batch job instance of the original platform into a batch job instance of a specified language so that the batch job instance of the specified language runs on a target platform;
the preprocessing of the template job file of the original platform according to the pre-configured file comprises the following steps: replacing offset parameters of each numbered job file of the template job file according to the input file record configuration file, and/or adding index marks to each type of job step in the template job file according to the input file format configuration file;
the method for converting the batch job instance of the original platform into the batch job instance of the appointed language comprises the following steps: constructing a general job model according to the batch job instance of the original platform, wherein the general job model comprises a job entity, a job head entity, a job step entity and a file definition entity;
acquiring an initial batch job instance of the target platform based on a data processing frame of the appointed language according to the universal job model, wherein the data processing frame comprises a spring batch processing frame;
generating a resource file according to the file format mapping table file and the database key value parameter file, wherein the resource file comprises a target offset parameter and a target database parameter;
adding the resource file to the initial batch job instance generates a batch job instance in the specified language.
2. The method of claim 1, wherein the input file record configuration file includes a mapping relationship between a job file name, a job step type, a job text label, a substitution mark, an original offset, and a target offset;
the input file format configuration file comprises a job file name, a job step type, a job text label, a logic file name of the input file, a mapping relation between the logic file format name and the format type.
3. The method of claim 2, wherein preprocessing the template job file of the original platform according to the pre-configured file comprises:
traversing the operation text of each label in the template operation file according to the input file record configuration file;
determining whether the label of the current operation text is registered in the input file record configuration file according to the traversing result,
if yes, determining a target offset parameter according to the input file record configuration file, replacing the current operation text according to the target offset parameter, and otherwise, reserving the current operation text.
4. The method of claim 2, wherein preprocessing the template job file of the original platform according to the pre-configured file comprises:
traversing each type of job step in the template job file according to the input file format configuration file;
determining whether the type of the current job step is registered in the input file format configuration file according to the traversing result,
if yes, adding the logical file name, the logical file format name and the format type of the input file corresponding to the type of the current job step into the job step as index marks according to the input file format configuration file, otherwise, reserving the current job step.
5. The method according to claim 3 or 4, wherein the parameter list includes parameter values of the job texts corresponding to different database partitions.
6. The method of claim 5, wherein the performing parameter assignment on the preprocessed template job file by using the parameter list of the original platform to obtain a batch job instance of the original platform comprises:
assigning the parameter values corresponding to each database partition to the preprocessed template operation file to obtain different original platform operation examples;
and constructing the different original platform job instances into batch job instances of the original platform.
7. The method according to claim 2, wherein the file format mapping table file contains a mapping relationship among a logical file format name, parameter information of an original field, and parameter information of a target field, wherein the parameter information includes a start position and a length;
the database key value parameter file comprises the key value length of a database table in the target platform.
8. The method of claim 7, wherein the specified language comprises: extensible markup language XML.
9. The method of claim 1, wherein after converting the batch job instance of the original platform to a batch job instance in a specified language, further comprising:
detecting the batch processing operation instance of the appointed language;
and alarming and prompting when the abnormal batch processing operation instance is determined according to the detection result.
10. The method of claim 1, wherein the target platform comprises an X86 platform.
11. A cross-platform job conversion device, the device comprising:
the preprocessing module is used for preprocessing a template job file of an original platform according to a preconfigured file, wherein the template job file comprises job steps of different types, each job step is composed of at least one job text, and the preconfigured file comprises: an input file record configuration file, an input file format configuration file, a file format mapping table file and a database key value parameter file;
the original platform operation example acquisition module is used for carrying out parameter assignment on the preprocessed template operation file by adopting a parameter list of the original platform to obtain a batch operation example of the original platform;
the target platform operation example obtaining module is used for converting the batch operation example of the original platform into a batch operation example of a designated language so that the batch operation example of the designated language runs on the target platform;
the preprocessing module is used for replacing offset parameters of each numbered job file of the template job file according to the input file record configuration file and/or adding index marks to each type of job steps in the template job file according to the input file format configuration file;
the target platform operation example acquisition module is used for constructing a general operation model according to the batch operation example of the original platform, wherein the general operation model comprises an operation entity, an operation head entity, an operation step entity and a file definition entity;
acquiring an initial batch job instance of the target platform based on a data processing frame of the appointed language according to the universal job model, wherein the data processing frame comprises a spring batch processing frame;
generating a resource file according to the file format mapping table file and the database key value parameter file, wherein the resource file comprises a target offset parameter and a target database parameter;
adding the resource file to the initial batch job instance generates a batch job instance in the specified language.
12. An electronic device, the electronic device comprising:
one or more processors;
a storage means for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-10.
13. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011017344.5A CN112181435B (en) | 2020-09-24 | 2020-09-24 | Cross-platform job conversion method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011017344.5A CN112181435B (en) | 2020-09-24 | 2020-09-24 | Cross-platform job conversion method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112181435A CN112181435A (en) | 2021-01-05 |
CN112181435B true CN112181435B (en) | 2024-02-23 |
Family
ID=73956596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011017344.5A Active CN112181435B (en) | 2020-09-24 | 2020-09-24 | Cross-platform job conversion method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112181435B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023007237A1 (en) * | 2021-07-27 | 2023-02-02 | Hexaware Technologies Limited | System and method for batch and scheduler migration in an application environment migration |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1124913A (en) * | 1997-06-27 | 1999-01-29 | Nec Software Kansai Ltd | Jcl program conversion device and recording medium |
CN101320315A (en) * | 2007-02-19 | 2008-12-10 | 日本电气株式会社 | Apparatus for generating job network flow from job control statement described in job control language and its method |
CN101887410A (en) * | 2009-05-11 | 2010-11-17 | 日本电气株式会社 | File conversion device, document conversion method and file converter |
KR20170131821A (en) * | 2017-07-21 | 2017-11-30 | 주식회사 티맥스 소프트 | Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment |
CN110494849A (en) * | 2017-03-31 | 2019-11-22 | 甲骨文国际公司 | For determining the successful system and method for cross-platform migration |
CN111208995A (en) * | 2019-12-20 | 2020-05-29 | 中国建设银行股份有限公司 | Method, system, device and storage medium for automatically generating IBM host job |
-
2020
- 2020-09-24 CN CN202011017344.5A patent/CN112181435B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1124913A (en) * | 1997-06-27 | 1999-01-29 | Nec Software Kansai Ltd | Jcl program conversion device and recording medium |
CN101320315A (en) * | 2007-02-19 | 2008-12-10 | 日本电气株式会社 | Apparatus for generating job network flow from job control statement described in job control language and its method |
CN101887410A (en) * | 2009-05-11 | 2010-11-17 | 日本电气株式会社 | File conversion device, document conversion method and file converter |
CN110494849A (en) * | 2017-03-31 | 2019-11-22 | 甲骨文国际公司 | For determining the successful system and method for cross-platform migration |
KR20170131821A (en) * | 2017-07-21 | 2017-11-30 | 주식회사 티맥스 소프트 | Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment |
CN111208995A (en) * | 2019-12-20 | 2020-05-29 | 中国建设银行股份有限公司 | Method, system, device and storage medium for automatically generating IBM host job |
Also Published As
Publication number | Publication date |
---|---|
CN112181435A (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108563768B (en) | Data conversion method, device, equipment and storage medium for different data models | |
US7509536B1 (en) | Method and system for error handling | |
CN101438272A (en) | System for processing formatted data | |
KR100456023B1 (en) | Method and apparatus for wrapping existing procedure oriented program into component based system | |
CN107578217B (en) | Working electronic flow autonomous generation method and device and office management system | |
EP3467653A1 (en) | Creation and execution of customised code for a data processing platform | |
JPH03111969A (en) | Method for supporting plan formation | |
CN112181435B (en) | Cross-platform job conversion method and device, electronic equipment and storage medium | |
US9304785B2 (en) | Localizing a software product | |
US8521762B2 (en) | Automated business process modeling | |
US7093195B2 (en) | Standards-based formatting of flat files into markup language representations | |
CN115048111A (en) | Code generation method, device, equipment and medium based on metadata | |
CN109325217B (en) | File conversion method, system, device and computer readable storage medium | |
CN111311461A (en) | B-S based editor and generation method for structured dynamic medical record form | |
CN113378007A (en) | Data backtracking method and device, computer readable storage medium and electronic device | |
US6771171B2 (en) | Atomic virtual document generation and tagging | |
CN111273913B (en) | Method and device for outputting application program interface data represented by specifications | |
CN113553826A (en) | Information input method and device combining RPA and AI and electronic equipment | |
WO2006071368A2 (en) | System and method for information encapsulation for providing multiple deliverable formats from one information source | |
JP5326382B2 (en) | Conversion management device | |
US20110047001A1 (en) | Method and system for creating an instance of an adaptable business object | |
JP2001188673A (en) | Software reuse assisting device | |
CN111126015B (en) | Report form compiling method and equipment | |
US20220215320A1 (en) | Process data processing method and apparatus, storage medium, and electronic equipment | |
EP3852033A1 (en) | Method and systems for analyzing software tickets |
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 |