US20190258462A1 - Batch script decomposer - Google Patents
Batch script decomposer Download PDFInfo
- Publication number
- US20190258462A1 US20190258462A1 US15/898,771 US201815898771A US2019258462A1 US 20190258462 A1 US20190258462 A1 US 20190258462A1 US 201815898771 A US201815898771 A US 201815898771A US 2019258462 A1 US2019258462 A1 US 2019258462A1
- Authority
- US
- United States
- Prior art keywords
- computer
- nodes
- annotations
- original script
- dependencies
- 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
Links
- 238000013515 script Methods 0.000 title claims abstract description 140
- 238000012545 processing Methods 0.000 claims abstract description 36
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000004590 computer program Methods 0.000 claims abstract description 19
- 238000003860 storage Methods 0.000 claims description 26
- 238000010586 diagram Methods 0.000 description 14
- 239000003550 marker Substances 0.000 description 9
- 230000001419 dependent effect Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 4
- 239000000470 constituent Substances 0.000 description 4
- 238000010923 batch production Methods 0.000 description 3
- DOMWKUIIPQCAJU-LJHIYBGHSA-N Hydroxyprogesterone caproate Chemical compound C1CC2=CC(=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@@](C(C)=O)(OC(=O)CCCCC)[C@@]1(C)CC2 DOMWKUIIPQCAJU-LJHIYBGHSA-N 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000135 prohibitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/169—Annotation, e.g. comment data or footnotes
-
- G06F17/241—
-
- G06F17/27—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
-
- 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/41—Compilation
- G06F8/45—Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
- G06F8/456—Parallelism detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45508—Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
- G06F9/45512—Command shells
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- 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/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/433—Dependency analysis; Data or control flow analysis
Definitions
- the present invention relates generally to a batch script decomposer, and more particularly to a batch script decomposer generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions.
- End of day processing in a banking system is an example of batch process.
- Such batch process is frequently implemented as a large script that sequentially invokes a series of processing programs.
- Some of the processing programs depend on the results of a prior step and must be executed in the correct sequence. However, not all of these processing programs are dependent on each other.
- Some, perhaps many of the processing programs can be performed in parallel. The parallel execution may significantly reduce the total duration of execution of the entire script (batch window).
- a method for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions comprises receiving, by a computer, an original script, wherein the original script includes annotations defined by a user.
- the method further comprises building, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script.
- the method further comprises associating, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or files accessed by the execution steps.
- the method further comprises determining, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by the execution steps.
- the method further comprises modifying, by the computer, the dependencies between the nodes in the graph, using instructions contained in the annotations.
- the method further comprises generating, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies.
- the method further comprises generating, by the computer, a script that defines dependencies between the scripts.
- a computer program product for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions.
- the computer program product comprising one or more computer-readable tangible storage devices and program instructions stored on at least one of the one or more computer-readable tangible storage devices.
- the program instructions executable to: receive, by a computer, an original script, wherein the original script includes annotations defined by a user; build, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script; associate, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or files accessed by the execution steps; determine, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by the execution steps; modify, by the computer, the dependencies between the nodes in the graph using instructions contained in the annotations; generate, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies; and generate, by the computer, a script that defines dependencies between the scripts.
- a computer system for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions comprises one or more processors, one or more computer readable tangible storage devices, and program instructions stored on at least one of the one or more computer readable tangible storage devices for execution by at least one of the one or more processors.
- the program instructions are executable to receive, by a computer, an original script, wherein the original script includes annotations defined by a user.
- the program instructions are further executable to build, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script.
- the program instructions are further executable to associate, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or the files accessed by the execution steps.
- the program instructions are further executable to determine, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by execution steps.
- the program instructions are further executable to modify, by the computer, the dependencies between the nodes in the graph using instructions contained in the annotations.
- the program instructions are further executable to generate, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies.
- the program instructions are further executable to generate, by the computer, a script that defines dependencies between the scripts.
- FIG. 1 is a flowchart illustrating operational steps for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions, in accordance with one embodiment of the present invention.
- FIG. 2 is a diagram illustrating an example of a sequence of execution in an original script, in accordance with one embodiment of the present invention.
- FIG. 3 is a diagram illustrating an example of a sequence of execution after determining dependencies between steps and after processing annotations, in accordance with one embodiment of the present invention.
- FIG. 4 is a diagram illustrating components of a computer device for executing the operational steps shown in FIG. 1 , in accordance with one embodiment of the present invention.
- Embodiments of the present invention provide a method for transformation of a batch execution script.
- the method disclosed in the present invention analyzes an original script and generates a new script or a set of scripts that is functionally equivalent to the original script.
- the new script or the set of scripts has an important difference—steps in the original script are executed in sequence one by one; however, in the new script or the set of scripts, some steps are executed in parallel.
- the method disclosed in the present invention detects dependencies between steps and preserves the order only for those steps where it is functionally necessary.
- Embodiments of the present invention disclose a method for generating definition of a set of dependencies between the steps allowing execution of dependent processing steps in a correct order.
- Embodiments of the present invention disclose a method for generating a set of scripts, each of which represents a step extracted from the original script.
- dependent scripts are executed in the correct order and independent scripts are executed in arbitrary order.
- independent scripts are executed in parallel potentially on different systems in a cluster of systems, time savings are realized.
- FIG. 1 is a flowchart illustrating operational steps for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions, in accordance with one embodiment of the present invention. The steps are implemented by a computer which is described in detail in latter paragraphs with reference to FIG. 4 .
- the computer receives an original script including annotations defined by a user.
- the original script is a multiple-step script that describes batch processing.
- Some examples of such batch script are IBM® z/OS® JCL (Job Control Language) stream or Unix® shell script.
- JCL is a set of statements that a user codes to tell the z/OS® operating system about the work the user wants it to perform.
- a Unix® shell script is a computer program designed to be run by the Unix® shell, a command-line interpreter.
- a scripting language may not be expressive enough to make all dependencies obvious or to make a lack of dependency obvious. For example, if a series of steps are using the same data set but do not update it, there is no real dependency between them; however, an analysis algorithm must necessarily be conservative and must assume that dependency exists.
- the disclosed method allows providing additional information to the analysis phase.
- the additional information is defined as “annotations to the original script”.
- the annotations are expressed in some suitable syntax (tag language) and are added to the original script inside comments.
- annotations will not affect the execution of the original script because the annotations look like comments; however, the annotations allow a user (for example an application administrator) to explicitly add or remove dependencies based on the user's knowledge of the specifics of the application. More details of the annotations will be described in detail in latter paragraphs with reference with an example.
- the computer recognizes distinct execution steps in the original script during parsing the original script. Further, during the parsing the original script, at step 130 , the computer builds a graph representing the distinct execution steps.
- the graph comprises nodes each representing one of the distinct execution steps. The original set of dependencies between steps at this stage is chronological sequence.
- a node in the graph does not have to necessarily represent a single execution step (or a single application); it may be convenient that the node represents a subset of steps as a single indivisible unit.
- the computer associates one or more attributes to each of the nodes.
- the one or more attributes may be specifications of data sets or files accessed by the respective steps; the one or more attributes may also be original texts of the original script for the respective steps.
- step 150 through analyzing the graph, the computer determines dependencies between the nodes, based on accessing data sets or files by the distinct execution steps. Steps accessing the same data sets or files are assumed to be dependent on each other. Chronological sequence determined from the original script determines the direction of this dependency; for example, if step B is after step A in the original script and accesses the same data set, then it can be concluded that step B must be executed after step A. On the other hand, steps having no data sets or files in common are assumed to be independent.
- the computer modifies the dependencies between the nodes in the graph, using instructions contained in the annotations to the original script defined by a user.
- the computer generates a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies determined at steps 150 and 160 .
- the scripts are generated for the respective nodes in the graph, each script for one node.
- the script for an execution step is generated using saved text from the execution step in the original script.
- the scripts require modifications to allow the scripts to become separately executable units. For example, with z/OS® JCL, each job requires a separate job statement. In addition, some attributes of the original script that have been specified at the script level will need to be inserted into the resulting scripts.
- the computer generates an additional script that defines dependencies between the scripts.
- computer generates job groups and constituent job definition statements using z/OS® JCL.
- the additional script is the definition of a job group. Examples of the job group and the constituent job definition statements using z/OS® JCL are given in detail in later paragraphs.
- JEC Java Execution Control
- DJC Dependent Job Control
- JEC is a feature available for this purpose in z/OS® JES2 component.
- DJC is a similar feature available in z/OS® JE3 component.
- JES2 and JES3 are two job entry subsystems provided by z/OS® and they provide different ways to describe dependencies between jobs. The job control constructs allow ordering of jobs; most importantly, they can specify which jobs can run concurrently.
- the annotation of ⁇ No-dependency-demarcation> is added inside some execution steps and specifies that this execution step has no dependency on any other step within the script.
- STEPB and STEPC are dependent on the output from STEPA. Both STEPB and STEPC can run after STEPA since they can share the output of STEPA. STEPA, STEPD, STEPE, and STEPF can run at the same time. STEPG can only run after STEPD. This dependency is explicitly specified via the annotation of ⁇ After-demarcation-marker>.
- FIG. 2 illustrates the sequence of execution the original script
- FIG. 3 illustrates the sequence of execution after determining dependencies between steps and after processing annotations shown in the above example.
- the job execution control model is JEC, which is specified by ⁇ Job_control_model> annotation.
- the jobs run serially even though a step has no dependency on another.
- usage of ⁇ After-demarcationmarker> annotation demonstrates how to define a dependency which cannot be detected by parsing the original JCL stream.
- JEC job group is as follows:
- JCL stream for constituent jobs is as follows:
- the user can submit the job group and then submit the JCL stream for the constituent jobs shown above.
- JOBA, JOBD, JOBE, and JOBF can all run concurrently. Maximum parallel execution is achieved.
- FIG. 4 is a diagram illustrating components of computer device 400 for executing the operational steps shown in FIG. 1 , in accordance with one embodiment of the present invention. It should be appreciated that FIG. 4 provides only an illustration of one implementation and does not imply any limitations with regard to the environment in which different embodiments may be implemented.
- the computer device may be any electronic device or computing system capable of receiving input from a user, executing computer program instructions, and communicating with another electronic device or computing system via a network.
- computer device 400 includes processor(s) 420 , memory 410 , and tangible storage device(s) 430 .
- Communications among the above-mentioned components of computer device 400 are denoted by numeral 490 .
- Memory 410 includes ROM(s) (Read Only Memory) 411 , RAM(s) (Random Access Memory) 413 , and cache(s) 415 .
- One or more operating systems 431 and one or more computer programs 433 reside on one or more computer readable tangible storage device(s) 430 .
- One or more computer programs 433 include one or more program for executing the operational steps shown in FIG. 1 to generate a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions.
- Computer device 400 further includes I/O interface(s) 450 .
- I/O interface(s) 450 allows for input and output of data with external device(s) 460 that may be connected to computer device 400 .
- Device 400 further includes network interface(s) 440 for communications between computer device 400 and a computer network.
- the present invention may be a system, a method, and/or a computer program product.
- the computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
- the computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
- the computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- a non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device, such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing.
- RAM random access memory
- ROM read-only memory
- EPROM or Flash memory erasable programmable read-only memory
- SRAM static random access memory
- CD-ROM compact disc read-only memory
- DVD digital versatile disk
- memory stick a floppy disk
- mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing
- a computer readable storage medium is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
- Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network (LAN), a wide area network (WAN), and/or a wireless network.
- the network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers.
- a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
- Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, and conventional procedural programming languages, such as the C programming language, or similar programming languages.
- the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
- the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
- electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry in order to perform aspects of the present invention.
- These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer,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/acts specified in the flowchart and/or block diagram block or blocks.
- These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture, including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
- the computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
- each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the block may occur out of the order noted in the figures.
- two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
- The present invention relates generally to a batch script decomposer, and more particularly to a batch script decomposer generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions.
- Many applications have regular maintenance performed by batch processes. “End of day” processing in a banking system is an example of batch process. Such batch process is frequently implemented as a large script that sequentially invokes a series of processing programs. Some of the processing programs depend on the results of a prior step and must be executed in the correct sequence. However, not all of these processing programs are dependent on each other. Some, perhaps many of the processing programs can be performed in parallel. The parallel execution may significantly reduce the total duration of execution of the entire script (batch window).
- Currently existing tools can describe the dependencies between the execution steps in the script and invoke processing steps in the correct order, allowing, at the same time, to execute independent steps in parallel. However, the cost of manual conversion of the batch script using such tools can be prohibitive.
- In one aspect, a method for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions is provided. The method comprises receiving, by a computer, an original script, wherein the original script includes annotations defined by a user. The method further comprises building, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script. The method further comprises associating, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or files accessed by the execution steps. The method further comprises determining, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by the execution steps. The method further comprises modifying, by the computer, the dependencies between the nodes in the graph, using instructions contained in the annotations. The method further comprises generating, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies. The method further comprises generating, by the computer, a script that defines dependencies between the scripts.
- In another aspect, a computer program product for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions is provided. The computer program product comprising one or more computer-readable tangible storage devices and program instructions stored on at least one of the one or more computer-readable tangible storage devices. The program instructions executable to: receive, by a computer, an original script, wherein the original script includes annotations defined by a user; build, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script; associate, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or files accessed by the execution steps; determine, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by the execution steps; modify, by the computer, the dependencies between the nodes in the graph using instructions contained in the annotations; generate, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies; and generate, by the computer, a script that defines dependencies between the scripts.
- A computer system for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions is provided. The computer system comprises one or more processors, one or more computer readable tangible storage devices, and program instructions stored on at least one of the one or more computer readable tangible storage devices for execution by at least one of the one or more processors. The program instructions are executable to receive, by a computer, an original script, wherein the original script includes annotations defined by a user. The program instructions are further executable to build, by the computer, a graph comprising nodes, wherein the graph represents execution steps in the original script. The program instructions are further executable to associate, by the computer, one or more attributes to the nodes in the graph, wherein the one or more attributes are specifications of data sets or the files accessed by the execution steps. The program instructions are further executable to determine, by the computer, by analyzing the graph, dependencies between the nodes, based on accessing the data sets or the files by execution steps. The program instructions are further executable to modify, by the computer, the dependencies between the nodes in the graph using instructions contained in the annotations. The program instructions are further executable to generate, by the computer, a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies. The program instructions are further executable to generate, by the computer, a script that defines dependencies between the scripts.
-
FIG. 1 is a flowchart illustrating operational steps for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions, in accordance with one embodiment of the present invention. -
FIG. 2 is a diagram illustrating an example of a sequence of execution in an original script, in accordance with one embodiment of the present invention. -
FIG. 3 is a diagram illustrating an example of a sequence of execution after determining dependencies between steps and after processing annotations, in accordance with one embodiment of the present invention. -
FIG. 4 is a diagram illustrating components of a computer device for executing the operational steps shown inFIG. 1 , in accordance with one embodiment of the present invention. - Embodiments of the present invention provide a method for transformation of a batch execution script. The method disclosed in the present invention analyzes an original script and generates a new script or a set of scripts that is functionally equivalent to the original script. The new script or the set of scripts has an important difference—steps in the original script are executed in sequence one by one; however, in the new script or the set of scripts, some steps are executed in parallel. The method disclosed in the present invention detects dependencies between steps and preserves the order only for those steps where it is functionally necessary.
- Embodiments of the present invention disclose a method for generating definition of a set of dependencies between the steps allowing execution of dependent processing steps in a correct order. Embodiments of the present invention disclose a method for generating a set of scripts, each of which represents a step extracted from the original script. When the scripts in the set are executed under control of the definition mentioned above, dependent scripts are executed in the correct order and independent scripts are executed in arbitrary order. When the independent scripts are executed in parallel potentially on different systems in a cluster of systems, time savings are realized.
-
FIG. 1 is a flowchart illustrating operational steps for generating a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions, in accordance with one embodiment of the present invention. The steps are implemented by a computer which is described in detail in latter paragraphs with reference toFIG. 4 . - At
step 110, the computer receives an original script including annotations defined by a user. The original script is a multiple-step script that describes batch processing. Some examples of such batch script are IBM® z/OS® JCL (Job Control Language) stream or Unix® shell script. JCL is a set of statements that a user codes to tell the z/OS® operating system about the work the user wants it to perform. A Unix® shell script is a computer program designed to be run by the Unix® shell, a command-line interpreter. - Referring to
step 110 ofFIG. 1 , a scripting language may not be expressive enough to make all dependencies obvious or to make a lack of dependency obvious. For example, if a series of steps are using the same data set but do not update it, there is no real dependency between them; however, an analysis algorithm must necessarily be conservative and must assume that dependency exists. In the present invention, the disclosed method allows providing additional information to the analysis phase. The additional information is defined as “annotations to the original script”. The annotations are expressed in some suitable syntax (tag language) and are added to the original script inside comments. Such annotations will not affect the execution of the original script because the annotations look like comments; however, the annotations allow a user (for example an application administrator) to explicitly add or remove dependencies based on the user's knowledge of the specifics of the application. More details of the annotations will be described in detail in latter paragraphs with reference with an example. - At
step 120, the computer recognizes distinct execution steps in the original script during parsing the original script. Further, during the parsing the original script, atstep 130, the computer builds a graph representing the distinct execution steps. In some embodiments, the graph comprises nodes each representing one of the distinct execution steps. The original set of dependencies between steps at this stage is chronological sequence. In other embodiments, a node in the graph does not have to necessarily represent a single execution step (or a single application); it may be convenient that the node represents a subset of steps as a single indivisible unit. - At
step 140, the computer associates one or more attributes to each of the nodes. For example, the one or more attributes may be specifications of data sets or files accessed by the respective steps; the one or more attributes may also be original texts of the original script for the respective steps. - At
step 150, through analyzing the graph, the computer determines dependencies between the nodes, based on accessing data sets or files by the distinct execution steps. Steps accessing the same data sets or files are assumed to be dependent on each other. Chronological sequence determined from the original script determines the direction of this dependency; for example, if step B is after step A in the original script and accesses the same data set, then it can be concluded that step B must be executed after step A. On the other hand, steps having no data sets or files in common are assumed to be independent. - At
step 160, the computer modifies the dependencies between the nodes in the graph, using instructions contained in the annotations to the original script defined by a user. Atstep 170, the computer generates a set of scripts that perform processing equivalent to the original script and achieve maximum parallel executions, based on the nodes of the graph and the dependencies determined atsteps - At
step 170, the computer generates an additional script that defines dependencies between the scripts. For example, computer generates job groups and constituent job definition statements using z/OS® JCL. In this example, the additional script is the definition of a job group. Examples of the job group and the constituent job definition statements using z/OS® JCL are given in detail in later paragraphs. - Possible annotations are shown below as an example. Note that the syntax used below is just an example; in the original script including the annotations, instructions can be expressed by the annotations in any suitable syntax. The example of the original script (z/OS® JCL stream as an example) including the annotations is as follows. Note that the lines with bold fonts are annotations.
-
// <Job — control — model==JEC> //EXAMPLE JOB 1234,..... //STEPA EXEC PGM=PROGA //X DD DSN=FRED,DISP=(NEW,CATLG),..... //* //STEPB EXEC PGM=PROGB //X DD DSN=FRED,DISP=(SHR),..... //* //STEPC EXEC PGM=PROGC //X DD DSN=FRED,DISP=(SHR),..... //* //STEPD EXEC PGM=PROGD /* <Demarcation — marker==marker1> //X DD DSN=WILMA,DISP=(NEW,CATLG),..... //* //STEPE EXEC PGM=PROGE //X DD DSN=DINO,DISP=(SHR),..... //* //STEPF EXEC PGM=PROGF //X DD DSN=BARNEY,DISP=(SHR),..... //* //STEPG EXEC PGM=PROGG /*<After-demarcation-marker==Marker1.> //X DD DSN=BETTY,DISP=(SHR),..... - In this example, the annotation of <Job_control_model==JEC> expresses an instruction that specifies a target control language if more than one is available. JEC (Job Execution Control) and DJC (Dependent Job Control) are examples of z/OS®-based control languages that express parallel execution of work steps. JEC is a feature available for this purpose in z/OS® JES2 component. DJC is a similar feature available in z/OS® JE3 component. JES2 and JES3 are two job entry subsystems provided by z/OS® and they provide different ways to describe dependencies between jobs. The job control constructs allow ordering of jobs; most importantly, they can specify which jobs can run concurrently.
- In the example given above, the annotation of <No-dependency-demarcation> is added inside some execution steps and specifies that this execution step has no dependency on any other step within the script. The annotation of <Demarcation_marker==markerX> is added inside some execution steps and provides a reference marker to be used in other annotations. The annotation of <After-demarcation-marker==MarkerX.> is added inside some execution steps and specifies that this step has an “after” dependency on another step identified by a marker established by a <Demarcation_marker> annotation; the annotation indicates that a current step must be executed after another step. The annotation of <Before-demarcation-marker==MarkerX.> is similar to the “after” annotation, but it establishes a “before” dependency which is a reverse of the “after” dependency.
- In the example given above, STEPB and STEPC are dependent on the output from STEPA. Both STEPB and STEPC can run after STEPA since they can share the output of STEPA. STEPA, STEPD, STEPE, and STEPF can run at the same time. STEPG can only run after STEPD. This dependency is explicitly specified via the annotation of <After-demarcation-marker>.
FIG. 2 illustrates the sequence of execution the original script, whileFIG. 3 illustrates the sequence of execution after determining dependencies between steps and after processing annotations shown in the above example. - In the example given above, the job execution control model is JEC, which is specified by <Job_control_model> annotation. Without the method disclosed in the present invention, the jobs run serially even though a step has no dependency on another. Also, usage of <After-demarcationmarker> annotation demonstrates how to define a dependency which cannot be detected by parsing the original JCL stream.
- The example of the JEC job group is as follows:
-
//EXAMPLE JOBGROUP,... //* //JOBD GJOB //* //JOBE GJOB //* //JOBF GJOB //* //JOBA GJOB // CONCURRENT NAME=(JOBD,JOBE,JOBF) //* //JOBB GJOB // AFTER NAME=JOBA //* //JOBC GJOB // AFTER NAME=JOBA //* //JOBG GJOB // AFTER NAME=JOBD //* //EXAMPLE ENDGROUP - The example of a JCL stream for constituent jobs is as follows:
-
//JOBA JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPA EXEC PGM=PROGA //X DD DSN=FRED,DISP=(NEW,CATLG),..... //* //JOBB JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPB EXEC PGM=PROGB //X DD DSN=FRED,DISP=(SHR),..... //* //JOBC JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPC EXEC PGM=PROGC //X DD DSN=FRED,DISP=(SHR),..... //* //JOBD JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPD EXEC PGM=PROGD //X DD DSN=WILMA,DISP=(NEW,CATLG),..... //* //JOBE JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPE EXEC PGM=PROGE //X DD DSN=DINO,DISP=(SHR),..... //* //JOBF JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPF EXEC PGM=PROGF //X DD DSN=BARNEY,DISP=(SHR),..... //* //JOBG JOB 1234,..... // SCHEDULE JOBGROUP=EXAMPLE //STEPG EXEC PGM=PROGG //X DD DSN=BETTY,DISP=(SHR),..... - The user can submit the job group and then submit the JCL stream for the constituent jobs shown above. In the above examples, JOBA, JOBD, JOBE, and JOBF can all run concurrently. Maximum parallel execution is achieved.
-
FIG. 4 is a diagram illustrating components ofcomputer device 400 for executing the operational steps shown inFIG. 1 , in accordance with one embodiment of the present invention. It should be appreciated thatFIG. 4 provides only an illustration of one implementation and does not imply any limitations with regard to the environment in which different embodiments may be implemented. The computer device may be any electronic device or computing system capable of receiving input from a user, executing computer program instructions, and communicating with another electronic device or computing system via a network. - Referring to
FIG. 4 ,computer device 400 includes processor(s) 420,memory 410, and tangible storage device(s) 430. InFIG. 4 , communications among the above-mentioned components ofcomputer device 400 are denoted bynumeral 490.Memory 410 includes ROM(s) (Read Only Memory) 411, RAM(s) (Random Access Memory) 413, and cache(s) 415. One ormore operating systems 431 and one ormore computer programs 433 reside on one or more computer readable tangible storage device(s) 430. One ormore computer programs 433 include one or more program for executing the operational steps shown inFIG. 1 to generate a set of scripts that perform processing equivalent to an original script and achieve maximum parallel executions.Computer device 400 further includes I/O interface(s) 450. I/O interface(s) 450 allows for input and output of data with external device(s) 460 that may be connected tocomputer device 400.Device 400 further includes network interface(s) 440 for communications betweencomputer device 400 and a computer network. - The present invention may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
- The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device, such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
- Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network (LAN), a wide area network (WAN), and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
- Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, and conventional procedural programming languages, such as the C programming language, or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry in order to perform aspects of the present invention.
- Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
- These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer,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/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture, including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
- The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
- The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/898,771 US10409573B1 (en) | 2018-02-19 | 2018-02-19 | Batch script decomposer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/898,771 US10409573B1 (en) | 2018-02-19 | 2018-02-19 | Batch script decomposer |
Publications (2)
Publication Number | Publication Date |
---|---|
US20190258462A1 true US20190258462A1 (en) | 2019-08-22 |
US10409573B1 US10409573B1 (en) | 2019-09-10 |
Family
ID=67617978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/898,771 Expired - Fee Related US10409573B1 (en) | 2018-02-19 | 2018-02-19 | Batch script decomposer |
Country Status (1)
Country | Link |
---|---|
US (1) | US10409573B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10642801B2 (en) * | 2017-08-29 | 2020-05-05 | Bank Of America Corporation | System for determining the impact to databases, tables and views by batch processing |
US20220091830A1 (en) * | 2020-09-18 | 2022-03-24 | Earthly Technologies Inc. | System and method for a hybrid development platform |
Family Cites Families (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6064819A (en) | 1993-12-08 | 2000-05-16 | Imec | Control flow and memory management optimization |
US7047232B1 (en) | 1999-01-13 | 2006-05-16 | Ab Initio Software Corporation | Parallelizing applications of script-driven tools |
US6904424B1 (en) | 1999-10-21 | 2005-06-07 | International Business Machines Corporation | Method and a system for managing shell script file development and execution |
EP2561441A1 (en) * | 2010-04-23 | 2013-02-27 | Vector Fabrics B.V. | Improved embedded system performance |
US20120110433A1 (en) * | 2010-10-28 | 2012-05-03 | Microsoft Corporation | Parallel web page processing |
US8495352B2 (en) * | 2010-12-08 | 2013-07-23 | International Business Machines Corporation | System and method for instantiation of distributed applications from disk snapshots |
US8413047B2 (en) * | 2011-05-12 | 2013-04-02 | Qualcomm Incorporated | Concurrent parsing and processing of HTML and JAVASCRIPT® |
US20140053056A1 (en) * | 2012-08-16 | 2014-02-20 | Qualcomm Incorporated | Pre-processing of scripts in web browsers |
US9557879B1 (en) * | 2012-10-23 | 2017-01-31 | Dell Software Inc. | System for inferring dependencies among computing systems |
US9317410B2 (en) * | 2013-03-15 | 2016-04-19 | International Business Machines Corporation | Testing functional correctness and idempotence of software automation scripts |
WO2015041711A1 (en) * | 2013-09-20 | 2015-03-26 | Yottaa, Inc. | Systems and methods for managing loading priority or sequencing of fragments of a web object |
US9652286B2 (en) * | 2014-03-21 | 2017-05-16 | Oracle International Corporation | Runtime handling of task dependencies using dependence graphs |
GB2531586A (en) * | 2014-10-23 | 2016-04-27 | Ibm | Methods and systems for starting computerized system modules |
US9436449B1 (en) * | 2015-06-02 | 2016-09-06 | Microsoft Technology Licensing, Llc | Scenario-based code trimming and code reduction |
US9430200B1 (en) * | 2015-06-04 | 2016-08-30 | Microsoft Technology Licensing Llc | Cross-library framework architecture feature sets |
US10474445B2 (en) * | 2015-12-07 | 2019-11-12 | Microsoft Technology Licensing, Llc | Updating dependent services |
CN106936871B (en) * | 2015-12-30 | 2020-05-29 | 阿里巴巴集团控股有限公司 | Method and device for displaying data on interface |
US10481876B2 (en) * | 2017-01-11 | 2019-11-19 | Microsoft Technology Licensing, Llc | Methods and systems for application rendering |
US10983816B2 (en) * | 2017-10-11 | 2021-04-20 | International Business Machines Corporation | Self-adaptive building container images |
-
2018
- 2018-02-19 US US15/898,771 patent/US10409573B1/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10642801B2 (en) * | 2017-08-29 | 2020-05-05 | Bank Of America Corporation | System for determining the impact to databases, tables and views by batch processing |
US10824602B2 (en) | 2017-08-29 | 2020-11-03 | Bank Of America Corporation | System for determining the impact to databases, tables and views by batch processing |
US20220091830A1 (en) * | 2020-09-18 | 2022-03-24 | Earthly Technologies Inc. | System and method for a hybrid development platform |
Also Published As
Publication number | Publication date |
---|---|
US10409573B1 (en) | 2019-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11663110B2 (en) | Analysis to check web API code usage and specification | |
US11734584B2 (en) | Multi-modal construction of deep learning networks | |
US9569288B2 (en) | Application pattern discovery | |
US11164574B2 (en) | Conversational agent generation | |
US9626283B1 (en) | System and method for automatically assigning a defect to a responsible party | |
US11029975B2 (en) | Automated container image assembly | |
US11934287B2 (en) | Method, electronic device and computer program product for processing data | |
US11645122B2 (en) | Method, device, and computer program product for managing jobs in processing system | |
US10318621B2 (en) | Collating and intelligently sequencing installation documentation | |
US11461291B2 (en) | Method, electronic device and computer program product for processing machine learning model | |
US10592304B2 (en) | Suggesting application programming interfaces based on feature and context analysis | |
US10409573B1 (en) | Batch script decomposer | |
US10664336B2 (en) | System, method and computer program product for adaptive application log analysis | |
US20190073198A1 (en) | Multi-flavored software execution from a singular code base | |
US10705824B2 (en) | Intention-based command optimization | |
US11182272B2 (en) | Application state monitoring | |
US10331436B2 (en) | Smart reviews for applications in application stores | |
CN113722007B (en) | Configuration method, device and system of VPN branch equipment | |
US20180322427A1 (en) | System and method for time critical automation | |
US10936297B2 (en) | Method, device, and computer program product for updating software | |
CN114238831A (en) | HTML code fragment processing method, system, electronic equipment and storage medium | |
CN113297081A (en) | Execution method and device of continuous integration assembly line | |
CN113220501A (en) | Method, apparatus and computer program product for data backup | |
CN113032004A (en) | Method, apparatus and program product for managing development jobs in a development environment | |
US9235322B1 (en) | Systems, methods and computer program products for a cloud application editor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:KATHMANN, KEVIN J.;PUCHKOFF, GARY S.;PYTEL, ALEXEI L.;AND OTHERS;SIGNING DATES FROM 20180215 TO 20180216;REEL/FRAME:044963/0937 |
|
FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
FEPP | Fee payment procedure |
Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
LAPS | Lapse for failure to pay maintenance fees |
Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20230910 |