Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEM AND METHOD FOR AN IMPROVED MERGE UTILITY
Document Type and Number:
WIPO Patent Application WO/2007/109249
Kind Code:
A3
Abstract:
Software application that interfaces with a main frame operating a job control language so as to overcome the file limit for processing in the job control language, by dividing files or other data sets into batches that are equal to or less than the limit of the job control language. The software application then provides the batches for processing in the job control language individually, so that the file limit is not exceeded for any processing operation.

Inventors:
GUDIMETLA DHARMENDRA W (US)
Application Number:
PCT/US2007/006855
Publication Date:
December 06, 2007
Filing Date:
March 20, 2007
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
AMERICAN EXPRESS TRAVEL RELATE (US)
GUDIMETLA DHARMENDRA W (US)
International Classes:
G06F9/46
Foreign References:
US6658465B12003-12-02
EP0905622A11999-03-31
Attorney, Agent or Firm:
FITZPATRICK, CELLA, HARPER & SCINTO (New York, NY, US)
Download PDF:
Claims:
- 15 -

WHAT IS CLAIMED IS:

1. A method of overcoming a limit of a number of files that can be processed in a given operation by a first computer application, using a second computer application which interfaces with the first application, the method comprising the steps of:

(a) providing an interface between the first application and the second application, wherein the first application has the limit on the number of files that can be processed in a given operation;

(b) setting a batch size in the second application to be less than or equal to the file limit of the first application;

(c) dividing files to be processed by the first application into a plurality of batches each having the batch size set in the setting step, using the second applications; and

(d) providing, using the second application, each batch individually to the first application for processing of the files of each batch, so as to not exceed the file limit of the first application.

2. The method of claim 1 , wherein the first application is a job control language.

3. The method of claim 2, further comprising a step of setting, using the second application, a utility application to operate in connection with the job control language to process the files of each batch.

4. The method of claim 1, wherein the dividing step includes a sub-steps of: (i) receiving information concerning a format of a list file listing all of the files to be processed;

(ii) reading the list file in accordance with the information concerning the format of the list file; and

(iii) defining each batch based on the files listed in the list file.

- 16 -

5. The method of claim 4, wherein the providing step comprises sub-steps of (i) reading a first batch of files using the file names obtained from the list file; and

(ii) processing the first batch of files read in the reading step using the first application.

6. The method according to claim 5, wherein a next batch of files is read after the processing of the first batch.

7. A computer program product comprising a computer usable medium having control logic stored therein for causing a computer to overcome a limit of a number of files that can be processed in a given operation by a first computer application, using a second computer application which interfaces with the first application, the control logic comprising: first computer readable program code means for causing the computer to provide an interface between the first application and the second application, wherein the first application has the limit on the number of files that can be processed in a given operation; second computer readable program code means for causing the computer to set set a batch size in the second application to be less than or equal to the file limit of the first application; third computer readable program code means for causing the computer to divide files to be processed by the first application into a plurality of batches each having the batch size set by the second computer readable program code means, using the second application; and fourth computer readable program code means for causing the computer to, using the second application, each batch individually to the first application for processing of the files of each batch, so as to not exceed the file limit of the first application.

- 17 -

8. The computer program product of claim 7, wherein the first application is a job control language.

9. The computer program product of claim 8, further comprising fifth computer readable program code means for causing the computer to set, using the second application, a utility application to operate in connection with the job control language to process the files of each batch.

10. The computer program of claim 7, wherein the third computer readable program code means further causes the computer to:

(i) receive information concerning a format of a list file listing all of the files to be processed;

(ii) read the list file in accordance with the information concerning the format of the list file; and

(iii) define each batch based on the files listed in the list file.

11. The computer program of claim 10, wherein the fourth computer readable program code means further causes the computer to:

(i) read a first batch of files using the file names obtained from the list file; and

(ii) process the first batch of files read in the reading step using the first application.

12. The computer program of claim 11 , wherein a next batch of files is prepared after the processing of the first batch.

13. A system for overcoming a limit of a number of files that can be processed in a given operation by a job control language using a computer program, the system comprising:

- 18 -

at least one processor for operating the job control language and the computer program, wherein the job control language has a limit on the number of files that can be processed in a given operation, and the computer program operates in connection with the at least one processor to provide files to be processed in the job control language in batches having a number of files equal to. or less than the limit on the number of files for processing in the job control language; an input for inputting at least one of a batch size indicating the maximum number of files for a batch and a format of a list file listing all of the files to be processed in the job control language, wherein the at least one processor divides the files to be processed in the job control language into batches, each not exceeding the batch size, in accordance with instructions from the computer program.

14. The system of claim 13, wherein the processor, using the computer program, operates the job control language to process the files of each batch.

15. The system of claim 14, wherein the processor operates the computer program to:

(i) receive information concerning a format of a list file listing all of the files to be processed;

(ii) read the list file in accordance with the information concerning the format of the list file; and

(iii) define the batch size based on the files listed in the list file.

16. The system of claim 15, wherein processor operates the computer program to:

(i) read a first batch of files using the file names obtained from the list file; and

(ii) process the files of the first batch using the job control language.

- 19 -

17. The system of claim 16, wherein a next batch of files is prepared after the first batch is read and processed.

Description:

TITLE

SYSTEM AND METHOD FOR AN IMPROVED MERGE UTILITY

CROSS REFERENCE TO RELATED APPLICATIONS

[0001] This application claim priority to, and the benefit of, U.S. Provisional Patent Application Serial No. 60/783,432, filed March 20, 2006, which is hereby incorporated by reference in its entirety.

BACKGROUND OF THE INVENTION Field Of The Invention

[0002] The present invention is generally directed to a system, method and software for interfacing with a mainframe (or other computer) and overcoming limits on the number of items (e.g., files, data sets, etc.) that can be processed by the mainframe (e.g., by a program/language operating thereon or in association therewith) in a given job step (i.e., operation). Such processing limits are typically associated with a job control language of the mainframe and/or other programs operating in connection with the mainframe. A mainframe typically executes jobs in steps, and with each step there is typically a limit on the number of files that can be input.

[0003] Conventional mainframes and associated utility programs may receive multiple inputs from various sources. Often, one or more inputs provide multiple files which need to be organized, consolidated, merged, and/or copied. Known

utility programs are typically used to merge and/or copy files. These utility programs are typically executed in the job control language of the mainframe system.

[0004] Merging generally consists of combining multiple files into a single output file. Copying generally involves copying the contents of one file to another, and usually involves using some sort of filtering process. However, the terms are often used interchangeably in the art, and will be referred to together throughout this application and should be understood broadly to cover various operations performed by utility programs. The merging and copying of files is common when the multiple files from one or more input sources are the same or similar in format, such that the data can be combined into a single file. The combination of the various files or groups of data into a single file allows for ease in processing and storing such data. In addition, the merging and copying processes can be used to combine data from different file types/formats into a file with a single format. [0005] Utilities with merging and copying functions are used in industries such as manufacturing, retail, financial, etc. For example, in financial institutions such as American Express, such a utility may be used to merge the files pertaining to a single merchant for end-of-day processing. This involves receiving from one merchant that accepts American Express cards multiple files, each of which contains information on a transaction/purchase in which the customer paid with an American Express card. Each of those files (i.e., transactions) must be processed so as to update the billing information for the corresponding customer and so that payment can be made to the merchant. Alternatively, the financial capture system of a financial institution may use a utility to merge transactions submitted by various partners, so as to send a single file containing the data sets from the various partners to a corresponding clearing and settlement system. In other situations, a combination of both of these scenarios takes place. Thus, the copying and merging of files is an important function to be performed in connection with the subsequent analysis and storage of data from various files or locations. [0006] Conventionally, the merging/copying process may take a long time to complete, given the complicated operations of the utilities being used. With delays in the merging of files, subsequent dependent jobs are also delayed. Also,

conventional utilities have limits on the number of files they can merge/copy, which limits are typically a function of the limits of the job control language operating on the mainframe, or other computer (while this application refers to mainframes, one of ordinary skill in the art(s) will appreciate that the invention can operate with other types of computers).

[0007] This limit is often inherent to the job control language or other program on which the mainframe runs, and is typically a limit on the number of files or sets of data that can be processed in a single instance. Because the limit is often inherent to the job control language, and the utilities that perform the merging/copying are executed in the job control language, the limit affects the utilities operating on the mainframe.

[0008] The potential number of files to be merged by a given mainframe may be large given the financial industry's landscape, and is likely to grow as the industry grows. When the file limit associated with the mainframe is less than the number of files to be merged/copied, the process is further slowed and complicated. For instance, a conventional job control language may have a file merge limit of 350 files or data sets. Once the utility operating in the job control language merges the 350 files, the process stops or an error occurs, and a user must restart the process in order to merge another 350 files. As one may expect, this is a cumbersome and time-consuming process.

[0009] Another problem is that many conventional utilities copy files one at a time, which slows the process.

[0010] Commercially available utilities are already used by information technology departments in various industries. Examples of known utilities include REXX and IBM COBOLE, among others. Given the foregoing problems, such conventional utilities leave room for improvement with respect to processing times and ease of use.

BRIEF DESCRIPTION OF THE INVENTION

[0011] The present invention overcomes the above-identified problems of conventional utilities by providing a system, method and computer program product which has faster and more convenient operation when the number of

involved files exceeds the processing limit of the underlying software performing the processing.

[0012] In particular, with the present invention, an infinite number of files/sets of data may be used without encountering problems which would otherwise occur due to the limits of the job control language or other piece of software. Further, enhanced speed may be obtained by using dynamic allocation of files and methods such as Basic Direct Access Method (BDAM) access, parallel access, avoiding DASD contention, and controller caching to reduce total CPU time. [0013] In preferred embodiments, the present invention takes the form of a software application that interfaces with the mainframe and job control language so as to overcome the file limit by dividing files or other data sets for processing into batches that are equal to or less than the limit of the mainframe system, and providing the batches one at a time for processing.

[0014] A piece of software according to the present invention may be used on its own or in connection with one or more conventional utilities, giving them additional functionality. Specifically, the present invention may take the form of a program that uses a conventional utility to provide the functionality of merging, copying or otherwise processing files in the job control language. In alternative embodiments, software according to the present invention may act as its own utility that provides the processing functionality which operates in the job control language. The operation and programming of such a utility will be understood of one of ordinary skill in the art(s), and therefore, not repeated herein. [0015] In one aspect, the invention involves a system of merging and copying which determines a limit (e.g., file or input limit) of a conventional utility or other program (or job control language), copies/merges to or below the limit, and then automatically repeats the process as many times as necessary to merge/copy all of the files, until an end of the files to be merged/copied is reached. For instance, a conventional utility or job control language may have a 500-file limit for its usage, but the mainframe may receive 10,000 files to be merged or copied. A programmer may set the limit of files to be copied at a time to be less than or equal to the limit of the operating being used, but in preferred embodiments the system determines the limit by reading a parameter file and dynamically allocates a

number of files to be copied at a setting less than or equal to the limit. The system will then copy to that setting. In doing so, the utility allocates files to be copied and copies data in "chunks" or "batches" that the mainframe can handle, and then moves to the next chunk/batch of data (de-allocating and re-allocating) until all of the files are processed.

[0016] In another preferred embodiment, the present invention is directed to a method of overcoming a limit of a number of files that can be processed in a given operation by a first computer application, using a second computer application which interfaces with the first application. The method involves providing an interface between the first application and the second application, wherein the first application has the limit on the number of files that can be processed in a given operation. The method also sets a batch size in the second application to be less than or equal to the file limit of the first application and divides files to be processed by the first application into a plurality of batches each having the set batch size. Consequently, each batch may be provided individually to the first application for processing of the files of each batch, so as to not exceed the file limit of the first application.

[0017] In an additional preferred embodiment, the present invention is directed to a system for overcoming a limit of a number of files that can be processed in a given operation by a job control language, using a computer program. The system includes at least one processor for operating the job control language and the computer program, wherein the job control language has a limit on the number of files that can be processed in a given operation, and the computer program operates in connection with the at least one processor to provide files to be processed in the job control language in batches having a number of files equal to or less than the limit on the number of files for processing in the job control language. The system also includes an input for inputting at least one of a batch size indicating the maximum number of files for a batch and a format of a list file listing all of the files to be processed in the job control language. The at least one processor divides the files to be processed in the job control language into batches, each not exceeding the batch size, in accordance with instructions from the computer program.

[0018] To add to the speed of the merging/copying process, the invention may incorporate features such as BDAM access, parallel accessing volumes, avoiding DASD contention, and controller caching. BDAM is part of the access methodology for IBM operating system. BDAM access is a file access method to access sequential files. Parallel accessing can be defined as accessing files as a shared stream of data. A DASD connection can be defined as avoiding device and intra-flle contention. Controller caching can be defined as caching to minimize external resources access.

[0019] Further features and advantages of the present invention as well as the structure and operation of various embodiments of the present invention are described in detail below with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The features and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference numbers indicate identical or functionally similar elements. Additionally, the left-most digit of a reference number identifies the drawing in which the reference number first appears. [0021] Figure 1 is a table comparing the merge performance of one embodiment of the present invention with conventional systems. .

[0022] Figure 2 is a flowchart illustrating a merge/copy process according to one embodiment of the present invention.

[0023] Figure 3 is a high level flow diagram of a process according to one aspect of the present invention.

[0024] Figure 4 is a block diagram of an exemplary computer system useful for implementing the present invention.

DETAILED DESCRIPTION I. Overview

[0025] The present invention is directed to a system, method and computer program product for an improved merge utility. The present invention is now described in more detail herein in terms of the above exemplary improvement

over existing. This is for convenience only and is not intended to limit the application of the present invention. In fact, after reading the following description, it will be apparent to one skilled in the relevant art(s) how to implement the following invention in alternative embodiments (e.g., other utilities, other computer systems, etc.).

II. Process

[0026] Figure 1 is a table showing the merge performance on an MVS operating system for 1,286,994 records in 220 files. As can be seen, the "Merge Utility" of the present invention is significantly faster than that of the IBM COBOLE and REXX utilities.

[0027] Figure 2 is a flow chart depicting the operation a software application according to one aspect of the present invention.

[0028] In step 201, the program starts. The start of the program involves the reading of a parameter file, which takes place in step 202. The parameter file is set up in advance of execution of the program in order to define parameters in which the software will operate. For instance, the parameter file will typically list the number of files to be processed (i.e., allocated). In addition, the parameter file may include information concerning the starting position of each file name in a list file, so that the program knows where to begin reading. Further, the parameter file may indicate the number of characters in the name of the file, so that the program can properly read the file names. Also, in embodiments in which the program itself will not provide the functionality for merging, copying, or otherwise processing the files, the parameter file will identify the external routine to be used in the processing of the files. Thus, the present invention can be used with existing utility programs to enhance their operation to overcome the file processing limits from which the utilities suffer (typically due to the limits of the job control language on which they operate). Of course, in other embodiments, the software of the present invention may include functionality that allows it to operate as the needed utility, as will be appreciated by those of ordinary skill in the art(s).

[0029] In general, these parameters preferably allow the program to establish where the information to processed may be found and any formatting information the program may need to process the input list file or the files to be processed. [0030] In step 203, all of the counter variables are initialized, to set any counters being used to initial states so as to properly track progress of the process. In step 204, the input list file is read and inputted. The input list file preferably contains a list of all the files to be allocated and processed. Specifically, the file names of the input file are read one at a time. After reading each file name, it is determined (in step 205) whether the current file being read is the end of the file list (i.e., whether the grouping is the last of the files to be copied/merged).

[0031] If the file is not the end of the list of files, the process proceeds to step 206. In that step, the file name just read is added to an allocate string of names of files to be processed by the mainframe. In step 207, the number of file names read in the process is made to equal the number previously read plus one. Thus, the counter that is tracking the number of file names added to the allocate string is increased by one to account for the file name added in step 206. In step 208, the process determines whether the number of file names read is greater than or equal to the number of file names to be allocated in a single batch, as previously defined in step 202 by the parameter file.

[0032] In practice, the number of file names read should not be greater than the number of file to be allocated, since this step is performed when each new name is added to the allocate string. Thus, as soon as the allocate string has a number of file names equal to the number to be allocated, the process proceeds to allocation and processing of those files, as will be discussed below.

[0033] When the number of file names read is less than the number of files to be allocated, the process proceeds to step 209. In that step, the input list file is again ' read for the next file name. If there is another file to be read in step 209, the process returns to step 206 (through step 210), and the process is repeated until the number of files in the allocate string equals the number of files to be allocated (i.e., the batch size). Once that happens, in step 208, the batch of files in the allocate string are allocated and processed.

[0034] Specifically, in step 211, all of the files read from the list file and added to the allocate string for processing are allocated to the SORTIN DD. More specifically, all the data sets corresponding to those file names are read from the memory in which they are stored for processing. In step 212, the external sort is called; namely, the external routine which is to be used to process the data, as set in step 202, is called for action. This external sort is performed in accordance with the functions defined by the specific utility being used and is executed in the job control language of the mainframe. Because the number of files or data sets in the allocate string is set to be less than the limit for processing in the job control language, the processing of the files can take place without an error or break in the processing.

[0035] In step 213, the process de-allocates the SORTTN DD after the processing is complete (for instance, by removing the files being processed from the memory in which they were stored in the allocation). In step 214, the counters used in the process are reset. For instance, the number of files read from the list file and added to the allocate string is set to zero. By so doing, the process can continue with the next batch of files to be allocated. This process continues batch by batch until all the files have been processed. Because each batch is set below the file limit of the job control language, the process can continue unimpeded until completion, without the need for a technician to manually send each batch or restart the utility each time the limit is reached.

[0036] Specifically, after step 214, the process returns to step 209 to read the next file name from the list file and, if the end of the list file has not been reached, to start adding to a new allocation string in step 206.

[0037] Once all of the batch have been allocated, the process ends in step 215. The end is prompted either through step 205 or 210, each of which determine whether all of the file names from the list file have been read.

[0038] In connection with step XX05, if the process has already reached the end of the file, for instance if there is only one filed to be processed, the process proceeds to step 216. In that step, it is determined whether the number of files is greater than zero, to ensure that there is something to be processed (as opposed to having some error in which there are no files listed in the input list file). If there are no

fϊles, the process ends immediately. If there is a file to be processed, the process proceeds to step 211 so that the file can be processed in accordance with the external routine, before the process ends.

[0039] The program according to the present invention can be run on the mainframe, or called up from a remote location.

[0040] The above example process can be further enhanced by the use of BDAM access. BDAM access is an access method that allows for direct processing on files. BDAM files do not have a particular sequence or organization, and are accessed using their disk addresses. Also, the use of parallel accessing may further enhance the processing by providing the ability to access DASD volumes concurrently. .

[0041] In addition, avoiding DASD contention can also help the process by avoiding the need to define DASD connection.

[0042] In addition, controller cache may be used to separate the internal mechanical read/write operations from transfers over the channel, and to hold recently accessed data.

[0043] Figure 3 shows a high level flow for a merge process according to one aspect of the present invention. As can be seen, files to be merged go through a merge process involving the Utility Program and External Sort Utility, so as to be combined in a merged output file. Specifically, Figure 3 shows the existence of the list file which preferably contains the names (and preferably locations) of the files to be merged. The files to be merged are stored separately. The merge process uses the list file to identify and process the files in batches, using the utility program of the present invention and, as shown here, an external sort utility for providing the merge function. The result is the merged output file.

[0044] Also provided herein is Annex A, which is software code from an example merge utility according to one aspect of the invention.

[0045] Preferably, the present invention takes the form of software code which executes the process to provide the functionality to the mainframe or other computer system. The invention can be embodied in the actual method performed, the hardware implementing the method, and/or a computer-readable memory medium containing the necessary software code. As will be appreciated by one of

ordinary skill in the relevant arts, the invention is not limited to the embodiments discussed herein, which are only examples of the implementation of the functions of the present invention.

πi. Example Implementations

[0046] The present invention or any part(s) or function(s) thereof) may be implemented using hardware, software or a combination thereof and may be implemented in one or more computer systems or other processing systems. However, the manipulations performed by the present invention were often referred to in terms, such as adding or comparing, which are commonly associated with mental operations performed by a human operator. No such capability of a human operator is necessary, or desirable in most cases, in any of the operations described herein which form part of the present invention. Rather, the operations are machine operations. Useful machines for performing the operation of the present invention include general purpose digital computers or similar devices. [0047] In fact, in one embodiment, the invention is directed toward one or more computer systems capable of carrying out the functionality described herein. An example of a computer system 400 is shown in Figure 4. [0048] The computer system 400 (which may take the form of a main frame computer) includes one or more processors, such as processor 404. The processor 404 is connected to a communication infrastructure 406 (e.g., a communications bus, cross-over bar, or network). Various software embodiments are described in terms of this exemplary computer system. After reading this description, it will become apparent to a person skilled in the relevant art(s) how to implement the invention using other computer systems and/or architectures. [0049] Computer system 400 can include a display interface 402 that forwards graphics, text, and other data from the communication infrastructure 406 (or from a frame buffer not shown) for display on the display unit 430. [0050] Computer system 400 also includes a main memory 408, preferably random access memory (RAM), and may also include a secondary memory 410. The secondary memory 410 may include, for example, a hard disk drive 412 and/or a removable storage drive 414, representing a floppy disk drive, a magnetic

tape drive, an optical disk drive, etc. The removable storage drive 414 reads from and/or writes to a removable storage unit 418 in a well known manner. Removable storage unit 418 represents a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 414. As will be appreciated, the removable storage unit 418 includes a computer usable storage medium having stored therein computer software and/or data. [0051] In alternative embodiments, secondary memory 410 may include other similar devices for allowing computer programs or other instructions to be loaded into computer system 400. Such devices may include, for example, a removable storage unit 422 and an interface 420. Examples of such may include a program cartridge 1 and cartridge interface (such as that found in video game devices), a removable memory chip (such as an erasable programmable read only memory (EPROM), or programmable read only memory (PROM)) and associated socket, and other removable storage units 422 and interfaces 420, which allow software and data to be transferred from the removable storage unit 422 to computer system 400.

[0052] Computer system 400 may also include a communications interface 424. Communications interface 424 allows software and data to be transferred between computer system NOO and external devices. Examples of communications interface 424 may include a modem, a network interface (such as an Ethernet card), a communications port, a Personal Computer Memory Card International Association (PCMCIA) slot and card, etc. Software and data transferred via communications interface 424 are in the form of signals 428 which may be electronic, electromagnetic, optical or other signals capable of being received by communications interface 424. These signals 428 are provided to communications interface 424 via a communications path (e.g., channel) 426. This channel 426 carries signals 428 and may be implemented using wire or cable, fiber optics, a telephone line, a cellular link, a radio frequency (RF) link and other communications channels.

[0053] In this document, the terms "computer program medium" and "computer usable medium" are used to generally refer to media such as removable storage drive 414, a hard disk installed in hard disk drive 412, and signals 428. These

computer program products provide software to computer system 400. The invention is directed to such computer program products.

[0054] Computer programs (also referred to as computer control logic) are stored in main memory 408 and/or secondary memory 410. Computer programs may also be received via communications interface 424. Such computer programs, when executed, enable the computer system 400 to perform the features of the present invention, as discussed herein. In- particular, the computer programs, when executed, enable the processor 404 to perform the features of the present invention. Accordingly, such computer programs represent controllers of the computer system 400.

[0055] In an embodiment where the invention is implemented using software, the software may be stored in a computer program product and loaded into computer system 400 using removable storage drive 414, hard drive 412 or communications interface 424. The control logic (software), when executed by the processor 404, causes the processor 404 to perform the functions of the invention as described herein.

[0056] In another embodiment, the invention is implemented primarily in hardware using, for example, hardware components such as application specific integrated circuits (ASICs). Implementation of the hardware state machine so as to perform the functions described herein will be apparent to persons skilled in the relevant art(s).

[0057] In yet another embodiment, the invention is implemented using a combination of both hardware and software.

rv. Conclusion

[0058] While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example, and not limitation. It will be apparent to persons skilled in the relevant art(s) that various changes in form and detail can be made therein without departing from the spirit and scope of the present invention. Thus, the present invention should not be limited by any of the above described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.

[0059] In addition, it should be understood that the figures and screen shots illustrated in the attachments, which highlight the functionality and advantages of the present invention, are presented for example purposes only. The architecture of the present invention is sufficiently flexible and configurable, such that it may be utilized (and navigated) in ways other than that shown in the accompanying figures.

[0060] Further, the purpose of the foregoing Abstract is to enable the U.S. Patent and Trademark Office and the public generally, and especially the scientists, engineers and practitioners in the art who are not familiar with patent or legal terms or phraseology, to determine quickly from a cursory inspection the nature and essence of the technical disclosure of the application. The Abstract is not intended to be limiting as to the scope of the present invention in any way. It is also to be understood that the steps and processes recited in the claims need not be performed in the order presented.

ANNEX A

15 merge

* PROGRAM : NU3O5UTL * * *

* SYSTEM : CLEARING AND SETTLEMENT ft

* PURPOSE UTILITY USED TO MERGE FILES WHICH ARE ALL PASSED *

* AS AN INPUT THROUGH LIST FILE. LIST FILE WILL CONTAIN* ft ALL THE FILES NEED TO BE MERGED. PARM FILE IS * ft ANOTHER INPUT PASSED TO THE PROGRAM WHICH IS USED TO *

* DETERMINE THE FOLLOWING: * ft SERVICE UTILITY: *

* NAME OF THE SERVICE UTILITY NEED TO BE USED *

TO MERGE ALL FILES. *

* INPUT DD: * * NAME OF THE INPUT DD WHICH WILL BE DYNAMICALLY* * ALLOCATED USING REXX ALLOC COMMAND. * * STARTING POSITION: * * STARTING POSITION OF THE FILE NAME IN THE *

LIST FILE. *

* FILE NAME LENGTH: *

* NO OF CHARACTERS OF THE FILE FROM THE STARTING* * POSITION. *

NO OF ALLOCATION: *

* NUMBER OF FILES NEED TO BE USED PER ALLOCATION*

* *

DATA BASE USAGE: ft

NONE

******4****^ r*

*

* FILE USAGE: *

* DDNAME DESCRIPTION I/O TYPE ft

NU3O5PRM PARM FILE I DATALIB * NU3O5INP LIST FILE I FLAT FILE * ft * * CALLED MODULES: ft ft PGM ID DESCRIPTION *

* ft ft IKJEFTSR TO EXECUTE THE TSO COMMAND THRU COBOL ft ILBOABNO ABEND ROUTINE * ft GOADYNOO USED FOR DYNAMIC FILE ALLOCATION ft

* INCLUDES : *

* ft

* WHENCMPL - WHEN COMPILED INFORMATION *

* NU3O5CPY - PARM FILE LAYOUT *

* GOADYNLI - PARMS IN USED TO CALL GOADYNOO ROUTINE *

* GOADYNLO - PARMS OUT USED TO CALL GOADYNOO ROUTINE *

***ftft**ftft***iftft*44ft*t*ft***ftft******************* *******************

*

ABENDS : *

*

* CODE REASON/REQUIRED ACTION ft

* 9001 ERROR WHILE READING PARM FILE OR EMPTY FILE ft

* 9002 ERROR ENCOUNTERED IN PARM INPUT ft

* 9003 ERROR WHILE OPEINING LIST FILE ft

* 9004 ERROR WHILE READING LIST FILE ft

Page 1

merge

* 9005 ERROR WHILE CLOSING LIST FILE

* 9006 ERROR CALLING IKJEFTSR

* 9007 ERROR CALLING SERVICE UTIL

* 9008 ERROR BUFFER LENGTH EXCEEDS FOR GIVEN NUMBER OF ALLOC

;-**** *

* H I S T O R Y O F C H A N G E S * * * DATE BY DESCRIPTION i-

__*

IDENTIFICATION DIVISION, PROGRAM-ID. NU3O5UTL.

AUTHOR. ARUL CHANDRASEKARAN. DATE-WRITTEN. DEC, 2004.

*****************:

E N V I R O N M E N T D I V I S I O N

* **** * * ******

ENVIRONMENT DIVISION. CONFIGURATION SECTION.

SOURCE-COMPUTER. IBM-3090.

OBJECT-COMPUTER. IBM-3090.

INPUT-OUTPUT SECTION. FILE-CONTROL.

SELECT PARM-FILE ASSIGN TO NU3O5PRM.

D A TA D I V I S I O N * t****r

OATA DIVISION. FILE SECTION.

FD PARM-FILE

LABEL RECORDS ARE STANDARD

BLOCK CONTAINS 0 RECORDS

RECORDING MODE IS F. 01 PARM-FILE-REC PIC X(80)

W O R K I N G S T O R A G E S E C T I O N

******************

WORKING-STORAGE SECTION. 01 WOOO-WORKING-STORAGE-ID.

05 FILLER PIC X(43) VALUE

1 BEGIN WORKING-STORAGE AREA FOR PROGRAM = ' .

* PROGRAM COMPILE INFORMATION

Hr****************************:

Ol WHEN-COMPILED-INFORMATION. COPY WHENCMPL.

Page 2

merge

* COPYBOOK FOR PARAM FILE. *

************ft*******#***r*****ftλft*********<:****** ************<r*i-*i-*

01 PARM-FILE-LAYOUT. COPY NU3O5CPY.

* THESE COPY BOOKS ARE USEO TO CALL GOADYNOO ROUTINE ϊ*********************-

01 GOADYNOO-PARMS-IN. COPY GOADYNLI.

01 GOADYNOO-PARMS-OUτ. COPY GOADYNLO.

***********************«.-*******

* C O U N T E R S

***************** ******

Ol W400-NUMERGE-COUNTERS . 05 W400-RECORD-COUNT PIC S9C04) USAGE COMP. OS W400-START-POSITION PIC S9(04) USAGE COMP. 05 W400-BUFFER-START-POS PIC S9(08) USAGE COMP. 05 W400-FILES-MERGED PIC S9(08) USAGE COMP. 05 W400-SERVICES-CALLED PIC S9(04) USAGE COMP. 05 W400-BUFFER-RANGE PIC S9(08) USAGE COMP.

Ol W500-NUMERGE-FLAGS. 05 W500-ERROR-FLAG PIC XCOl).

88 W500-ERROR-OCCURED VALUE 'Y *

88 W500-ERROR-NOT-OCCURED VALUE 'N 1

05 W500-PARM-FILE-FLAG PIC X(Ol).

88 W500-PARM-FILE-END-YES 88 W500-PARM-FILE-END-NO VALUE 1 N 1 . 05- W500=LIST-FILE-FL-AG ------ PIC-X<θ1) .

88 W500-LIST-FILE-END-YES VALUE 1 Y' 88 W500-LIST-FILE-END-NO VALUE 'N '

C O N S T A N T S

***************** ^

Ol W600-CONSTANTS . 05 W600-PGM-ID PIC X(08) VALUE 'NU3O5UTL' 05 W600-IK3 EFTSR PIC X(08) VALUE 'IK]EFTSR' 05 W600-QUOTES PIC X(02) VALUE 05 W600-GOADYN00 PIC X(08) VALUE 'GOADYNOO' 05 W600-INPUT-DD PIC X(08) VALUE 'NU3O5INP' 05 W600-ABEND-ROUTINE PIC X(08) VALUE 'ILBOABNO 1 05 W600-ERROR-READ-PARM-FILE PIC X(50) VALUE

'ERROR READING PARM FILE OR EMPT TYY F FIILLEE.. 1 '.. 05 W600-ERROR-OPEN-LIST-FILE PIC X(50) VALUE

'ERROR OPENING LIST FILE.'. 05 W600-ERROR-READ-LIST-FILE PIC XC50) VALUE

'ERROR READING LIST FILE. * . 05 W600-NO-OF-ALLOCATION PIC XC50) VALUE

'NUMBER OF ALLOCATION INVALID 05 W600-MAX-LIMIT-ERROR PIC X(50) VALUE

'NUMBER OF ALLOCATION EXCEEDS THE LIMIT. '

Page 3

merge 05 W600-INVALID-STR-POS PIC X(50) VALUE

'INVALID STARTING POSITION. 1 . 05 W600-INVALID-FILE-NE-LEN PIC X(50) VALUE

'FILE NAME LENGTH INVALID. * . 05 W600-NO-OF-CHAR-EXCEED PIC X(SO) VALUE

'FILE NAME LENGTH EXCEEDS THE LIMIT. 1 . 05 W600-INPUT-DD-REQ PIC X(50) VALUE

'INPUT DD REQUIRED. ' . 05 W600-UTIL-NAME-REQ PIC X(50) VALUE

'UTILITY NAME REQUIRED. ' . 05 W600-ERROR-PARM-FILE PIC X(SO) VALUE

'ERROR ENCOUNTERED IN PARM FILE.'. 05 W600-BUFFER-LEN-EXCEEDS PIC X(50) VALUE

'ERROR BUFFER LENGTH EXCEEDS". 05 W600-ERROR-CALL-IKJEFTSR PIC X(50) VALUE

"** ERROR CALLING IKJEFTSR - VARS DUMP **'. 05 WβOO-ERROR-CALL-SERVICE-UTIL PIC X(SO) VALUE

'ERROR CALLING SERVICE UTIL.'. 05 W600-GOADYN00-OPEN-ERROR PIC X(SO) VALUE

1 GOADYNOO FAILED TRYING TO OPEN FILE 1 . 05 W600-GOADYN00-READ-ERROR PIC X(50) VALUE

'GOADYNOO FAILED TRYING TO READ FILE 1 . 05 W600-GOADYN00-CLOSE-ERROR PIC X(50) VALUE

'GOADYNOO FAILED TRYING TO CLOSE FILE'.

* VARIABLE WORK AREAS

***********************

01 W700-IK3EFTSR-VARS. 05 W700-DUMMY PIC S9(08) USAGE COMP. 05 W700-RETURN-CODE PIC S9(08) USAGE COMP. 05 W700-REASON-CODE PIC S9(O8) USAGE COMP. 05 W700-INFO-CODE PIC S9(08) USAGE COMP. 05 W700-CPPL-ADDRESS PIC S9(08) USAGE COMP. 05 W700-FLAGS PIC X(4) VALUE

X'00010001'. 05 W700-BUFFER PIC X(12100). 05 W700-LENGTH PIC S9(08) USAGE COMP VALUE

+12100.

01 W7OO-NU3O5UTL-VARIABLES. 05 W700-REC-LENGTH PIC 9(04). 05 W700-START-POS-DS PIC 9(04). 05 W700-LENGTH-OF-DS PIC 9(04). 05 W700-NO-OF-ALLOC PIC 9(08). 05 W700-FIL-MRG PIC Z(07)9. 05 W700-SRV-CLD PIC Z(07)9. 05 W700-DUMMY-EDIT PIC +Z(07)9. 05 W700-RETURN-C0DE-EDIT PIC +Z(07)9. 05 W700-REASON-CODE-EDIT PIC +Z(O7)9. 05 W700-INFO-CODE-EDIT PIC +Z(07)9. 05 W700-CPPL-ADDRESS-EDIT PIC +Z(07)9. 05 W700-LENGTH-EDIT PIC +Z(07)9. 05 W700-FILE-STATUS PIC X(02). 05 W700-PARA-NAME PIC X(40). 05 W700-GOADYN-MSG PIC X(SO). 05 W700-FREE-COMMAND. 10 W700-FREE-LINE1 PIC X(08) VALUE

"FREE FI(". 10 W700-FREE-DD-NM PIC X(08). 10 W700-FREE-LINE3 PIC X(Ol) VALUE

Page 4

merge

05 W700-CMD-STMT.

10 W700-TSO-CMD-LINE1 PIC XC09) VALUE

"ALLOC FlC". 10 W7O0-DD-NM-CMD-LINE2 PIC XC08) . 10 W700-TSO-CMD-LINE3 PIC XCO5) VALUE

") DAC".

05 W700-COMMAND-END PIC XCIl) VALUE ') SHR REUSE 1 .

05 W700-PARAGRAPH-NM PIC XC30) VALUE SPACES. 05 W700-ERROR-MESSAGE PIC XC50) VALUE SPACES. 05 W700-ABEND-COOE PIC XC04) VALUE SPACES.

05 W700-MRG-REC.

10 W700-MRG-FILE-NAME PIC XCOl) OCCURS 1 TO 1000

DEPENDING ON W700-REC-LENGTH.

P R O C E D U R E D I V I S I O N

PROCEDURE DIVISION. / * MAIN PROCESS

* DESCRIPTION 1. INITIALIZE PROCESS AND CLOSE FILES *

* PERFORM 1000-INITIALIZATION *

* 2000-PROCESS * * 9000-EXIT-PROGRAM * * PERFORM BY NONE * ************

0000-MAIN-PROCESS .

MOVE "0000-MAIN-PROCESS" TO W700-PARAGRAPH-NM

PERFORM 1000-INITIALIZATION THRU 1000-EXIT

PERFORM 2000-PROCESS THRU 2000-EXIT

PERFORM 9000-EXIT-PROGRAM

THRU 9000-EXIT. 0000-EXIT. GOBACK.

/ ** INITIALIZTION

* DESCRIPTION : ASSIGN THE WHEN COMPILED INFORMATION TO THE *

* OUTPUT. OPEN ALL INPUT FILES AND VALIDATE. * * PERFORM 1100-OPEN-LIST-FILE *

* 1200-VALIDATE-INPUTS *

* PERFORM BY 0000-MAIN-PROCESS *

1000-INITIALIZATION .

MOVE ' 1000-INITIALIZATION ' TO W700-PARAGRAPH-NM

SET WSOO-ERROR-NOT-OCCURED TO TRUE SET W500-PARM-FILE-END-NO TO TRUE SET W500-LIST-FILE-END-NO TO TRUE MOVE W600-PGM-ID TO WHEN-COMPILED-MODULE MOVE WHEN-COMPILED TO WHEN-COMPILED-TIME-DATE DISPLAY ' '

DISPLAY WHEN-COMPILED-INFO DISPLAY ' ' . MOVE ZEROS TO W400-RECORD-COUNT

Page 5

merge

W400-FILES-MERGED

W400-SERVICES-CALLED

W400-BUFFER-RANGE

OPEN INPUT PARM-FILE PERFORM 1100-OPEN-LIST-FILE

THRU 1100-EXIT PERFORM 1200-VALIDATE-INPUTS

THRU 1200-EXIT. 1000-EXIT. EXIT.

/

** OPEN LIST FILE ************************************************

DESCRIPTION OPEN THE INPUT LIST FILE BY CALLING THE GOAOYNOO MODULE. CALL ROUTINE TO HANDLE THE ERROR .

PERFORM : 9200-DYN-ERROR-HANDLE PERFORM BY : 1000-INITIALIZATION

1100-OPEN-LIST-FILE.

MOVE "llOO-OPEN-LIST-FILE" TO W700-PARAGRAPH-NM

MOVE W600-INPUT-DD TO DYN-IN-DDNAME

SET DYN-IN-OPEN-INPUT-PS TO TRUE

MOVE 9003 TO W700-ABEND-CODE

MOVE W600-GOADYN00-OPEN-ERROR TO W700-GOADYN-MSG

MOVE W600- ERRORr-OPEN-LIST-FILE TO W700-ERROR-MESSAGE

CALL W600-GOADYN00 USING GOADYN00-PARMS-IN GOADYNOO-PARMS-OUT END-CALL

PERFORM 9200-DYN-ERROR-HANDLE THRU 9200-EXIT

MOVE DYN-IN-DCB-RECORD-SIZε TO W700-REC-LENGTH. 1100-EXIT. EXIT.

** PROCESS PARM FILE

* DESCRIPTION : READS AND VALIDATES THE INPUT OF PARM FILE.

* PERFORM 1400-READ-PARM-FILE * 1500-VALIDATE-FILE-PARM PERFORM BY 1000-INITIALIZATION *

1200-VALIDATE-INPUTS .

MOVE "1200-VALIDATE-INPUTS 1 TO W700-PARAGRAPH-NM

PERFORM 1300-READ-PARM-FILE THRU 1300-EXIT

UNTIL W500-PARM-FILE-END-YES PERFORM 1400-VALIDATE-FILE-PARM

THRU 1400-EXIT MOVE ZEROS TO W400-RECORD-COUNT PERFORM 1500-CHK-BUFFER-RANGE

THRU 1500-EXIT. 1200-EXIT. EXIT.

/

** READ PARM FILE *****************************************i-*i-t***

* DESCRIPTION : READ PARM FILE UNTIL END OF FILE AND ABEND IF *

* FILE IS EMPY. *

* PERFORM : 9999-ABEND-ROUTINE *

* PERFORM BY : 1200-VALIDATE-INPUTS *

Page 6

merge

13OO-READ-PARM-FILE.

MOVE "1300-READ-PARM-FILE" TO W700-PARAGRAPH-NM

READ PARM-FILE INTO PARM-FILE-LAYOUT AT END

SET W500-PARM-FILE-END-YES TO TRUE END-READ

IF W500-PARM-FILE-END-NO

IF PARM-FILE-LAYOUT(I: 1) = '*'

CONTINUE ELSE

ADD 1 TO W400-RECORD-COUNT

SET W500-PARM-FILE-END-YES TO TRUE END-IF END-IF

IF W500-PARM-FILE-END-YES AND W400-RECORD-COUNT = ZEROS MOVE 9001 TO W700-ABEND-CODE

MOVE W600-ERROR-READ-PARM-FILE

TO W700-ERROR-MESSAGE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-IF.

1300-EXIT. EXIT.

/

** VALIDATE FILE PARM ******************************************* * DESCRIPTION : VALIDATE INPUT FIELDS FROM PARM FILE. *

PERFORM : 9999-ABEND-ROUTINE *

PERFORM BY : 1200-VALIDATE-INPUTS *

1400-VALIDATE-FILE-PARM.

MOVE '1400-VALIDATE-FILE-PARM' TO W700-PARAGRAPH-NM

DISPLAY **************** START PARM INFO *******************" DISPLAY 'SERVICE UTILITY NAME NU3O5CPY-UTIL-NAME DISPLAY 'INPUT DD NAME NU3O5CPY-INPUT-DD DISPLAY 'STARTING POSITION NU305CPY-ST-POS-DS DISPLAY 'LENGTH OF THE DATASET NU305CPY-LEN-OF-DS DISPLAY 'NUMBER OF ALLOCATION NU305CPY-NO-OF-ALLOC-PCALL DISPLAY ' *************** END PA R M I NFO *********************

IF NU3O5CPY-ST-POS-DS IS NUMERIC

MOVE NU305CPY-ST-POS-DS TO W400-START-POSITION ELSE

DISPLAY W600-INVALID-STR-POS

SET W500-ERROR-OCCURED TO TRUE END-IF

IF NU305CPY-LEN-OF-DS IS NUMERIC

MOVE NU3O5CPY-LEN-OF-DS TO W700-LENGTH-OF-DS

IF W700-LENGTH-OF-DS > ZEROS AND W700-LENGTH-OF-DS < 45

CONTINUE ELSE

DISPLAY W600-NO-OF-CHAR-EXCEED SET W500-ERROR-OCCURED TO TRUE END-IF ELSE

DISPLAY W600-INVALID-FILE-NE-LEN SET W500-ERROR-OCCURED TO TRUE END-IF

Page 7

merge

IF NU3O5CPY-INPUT-DD = SPACES

DISPLAY W600-INPUT-DD-REQ

SET W500-ERROR-OCCURED TO TRUE END-IF

IF NUBOSCPY-NO-OF-ALLOC-PCALL IS NUMERIC

MOVE NUBOSCPY-NO-OF-ALLOC-PCALL

TO W700-NO-OF-ALLOC ELSE

DISPLAY W600-NO-OF-ALLOCATION

SET W500-ERROR-OCCURED TO TRUE END-IF

IF NU3O5CPY-UTIL-NAME = SPACES

DISPLAY W600-UTIL-NAME-REQ

SET W500-ERROR-OCCUREO TO TRUE END-IF

IF W500-ERROR-OCCURED

MOVE 9002 TO W700-ABEND-CODE

MOVE W600-ERROR-PARM-FILE TO W700-ERROR-MESSAGE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-IF. 1400-EXIT. EXIT.

/

** f"i-|iζ BUFFER RANGE **********************************************

* DESCRIPTION : BUFFER LENGTH IS CALCULATED IN ORDER TO CHECK *

* NUMBER OF ALLOCATION * LENGTH OF DATA SET WILL *

* FIT INTO THE BUFFER VARIABLE. ABEND PROGRAM *

* IF THE NUMBER OF CHARACTERS EXCEEDS BUFFER *

* LENGTH. *

* PERFORM : 9999-ABEND-ROUTINE *

* PERFORM BY : 1200-VALIDATE-INPUTS *

1500-CHK-BUFFER-RANGE .

MOVE "1500-CHK-BUFFER-RANGE" TO W700-PARAGRAPH-NM.

COMPUTE W400-BUFFER-RANGE = LENGTH OF W700-CMD-STMT + LENGTH OF W700-COMMAND-END.

COMPUTE W400-BUFFER-RANGE = W400-BUFFER-RANGE + (W700-NO-OF-ALLOC * W700-LENGTH-OF-DS) + CW700-NO-OF-ALLOC * 2) + W700-NO-OF-ALLOC

IF W400-BUFFER-RANGE > LENGTH OF W700-BUFFER DISPLAY W600-BUFFER-LEN-EXCEEDS

MOVE 9008 TO W700-ABEND-CODE

MOVE W600-BUFFER-LEN-EXCEEDS TO W700-ERROR-MESSAGE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-IF. 1500-EXIT. EXIT.

/

** PROCESS FILE ft***********************************************^*

* DESCRIPTION : READ THE LIST FILE UNTIL END OF FILE. *

* PERFORM : 2100-READ-FILE *

* PERFORM BY : 0000-MAIN-PROCESS *

***************

2000-PROCESS.

Page 8

merge

MOVE "2000-PROCESS 1 TO W700-PARAGRAPH-NM

PERFORM 2100-READ-FILE THRU 2100-EXIT

UNTIL W500-LIST-FILE-END-YES. 2000-EXIT. EXIT.

** RE AD -FIL E *****************************************************

DESCRIPTION READ RECORD ONE BY ONE FROM THE INPUT FILE AND CALLS THE DYNAMIC ALLOCATION OF INPUT DD WHICH THEN CALLS THE SERVICE UTILITY.CALLS SUBROUTINE TO HANDLE THE ERRORS.

PERFORM 2200-MERGE-PROCESS 9200-DYN-ERROR-HANDLE

* PERFORM BY 2000-PROCESS .

2100-READ-FILE .

MOVE "2100-READ-FILE 11 TO W700-PARAGRAPH-NM

MOVE W600-INPUT-DD TO DYN-IN-DDNAME

SET DYN-IN-READ-PS TO TRUE

MOVE W600-GOADYN00-READ-ERROR TO W700-GOADYN-MSG

MOVE 9004 TO W700-ABEND-CODE

MOVE W600-ERROR-READ-LIST-FILE TO W700-ERROR-MESSAGE

CALL W600-GOADYN00 USING GOADYNOO-PARMS-IN GOADYNOO-PARMS-OUT W700-MRG-REC

END-CALL

PERFORM 9200-DYN-ERROR-HANDLE THRU 9200-EXIT

IF DYN-END-OF-FILE

SET W500-LIST-FILE-END-YES TO TRUE

IF W400-RECORD-COUNT = ZEROS •

CONTINUE ELSE

PERFORM 2200-MERGE-PROCESS

THRU 2200-EXIT END-IF

ELSE

PERFORM 2200-MERGE-PROCESS

THRU 2200-EXIT END-IF. 2100-EXIT. EXIT.

/

MERGE PROCESS DESCRIPTION : DYNAMIC ALLOCATION PROCESS WILL BE CALLED BASED * ON THE NO OF ALLOCATION AND MERGE IS CALLED. *

* PERFORM 2300-ASSIGN-TO-BUFFER

3000-MERGE-FILE * PERFORM BY 2100-READ-FILE

2200-MERGE-PROCESS .

MOVE " 2200-MERGE- PROCESS 1 TO W700-PARAGRAPH-NM

IF W500-LIST-FILE-END-YES AND

W400-RECORD-COUNT <= W700-NO-OF-ALLOC PERFORM 3000-MERGE-FILE

Page 9

merge

THRU 3000-EXIT ELSE

IF W400-RECORD-COUNT = 0

MOVE SPACES TO W700-BUFFER

MOVE NU3O5CPY-INPUT-DD TO W7OO-DD-NM-CMD-LINE2

MOVE W700-CMD-STMT TO

W700-BUFFER(l: LENGTH OF W700-CMD-STMT) MOVE LENGTH OF W700-CMD-STMT

TO W400-BUFFER-START-POS

ADD 1 TO W400-BUFFER-START-POS

END-IF

ADD 1 TO W400-RECORD-COUNT

PERFORM 2300-ASSIGN-TO-BUFFER

THRU 23OO-EXIT

IF W400-RECORD-COUNT >= W700-NO-OF-ALLOC PERFORM 3000-MERGE-FILE

THRU 3000-EXIT END-IF END-IF. 2200-EXIT. EXIT.

/

** ASSIGN TO ARRAY ***********************************************

* DESCRIPTION : STRIP SPACES IN THE FILE NAME AND ADD SAME IN *

* BUFFER VARIABLE. *

* PERFORM : NONE *

* PERFORM BY : 2200-MERGE-PROCESS *

2300-ASSIGN-TO-BUFFER.

MOVE "2300-ASSIGN-TO-BUFFER" TO W700-PARAGRAPH-NM

ADD 1 TO W400-FILES-MERGED

MOVE W600-QUOTES TO

W700-BUFFER(W400-BUFFER-START-POS: 1)

ADD 1 TO

W400-BUFFER-START-POS MOVE W700-MRG-RECCW400-START-POSITION:W700-LENGTH-OF-DS)

TO W700-BUFFER(W400-BUFFER-START-POS:W700-LENGTH-OF-DS)

COMPUTE W400-BUFFER-START-POS = W700-LENGTH-OF-DS + W400-BUFFER-START-POS

MOVE W600-QUOTES TO

W700-BUFFER(W400-BUFFER-START-POS:2)

ADD 2 TO

W400-BUFFER-START-POS

MOVE SPACE TO

W700-BUFFER(W400-BUFFER-START-POS : 1) . 2300-EXIT. EXIT.

/ ****************************************** ******* *

* DESCRIPTION : PARAGRAPH PERFORM FOLLOWING FUNCTION: *

* 1. DYNAMIC ALLOCATION OF INPUT FILE FOR SERVICE *

* UTILITY. *

* 2. CALL SERVICE UTILITY. *

* 3. DEALLOCATE THE INPUT FILE WHICH COULD BE *

* ALLCKATED AGAIN FOR THE NEXT SET OF MERGE. *

* PERFORM : 3100-CALL-ALLOC *

Page 10

merge

: 3200-CALL-SERVICE-UTIL : 3300-CALL-DEALLOC PERFORM BY : 2200-MERGE-PROCESS

Ir:

3000-MERGE-FILE.

MOVE "3000-MERGE-FILE" TO W700-PARAGRAPH-NM

PERFORM 3100-CALL-ALLOC

THRU 3100-EXIT PERFORM 3200-CALL-SERVICE-UTIL

THRU 32OO-EXIT PERFORM 3300-CALL-DEALLOC

THRU 3300-EXIT. 3000-EXIT. EXIT.

7 CALL ALLOO

* DESCRIPTION : ALLOC TSO COMMAND IS EXECUTED USING THE *

* 'IKJEFTSR' PROGRAM AND ALSO CHECKS THE RETURN *

* CODE. *

* PERFORM : 3400-IKJEFTSR-CHK-STATUS *

* PERFORM BY : 3000-MERGE-FILE *

3100-CALL-ALLOC.

MOVE "3000-CALL-ALLOC" TO W700-PARAGRAPH-NM

MOVE W700-COMMAND-END TO

W700-BUFFER(W400-BUFFER-START-POS: 11) ADD LENGTH OF W700-COMMAND-END TO W400-BUFFER-START-POS

CALL W600-IKJEFTSR USING W700-FLAGS

W700-BUFFER W700-LENGTH W700-RETURN-CODE W700-REASON-CODE W700-DUMMY

END-CALL.

PERFORM 3400-IKJEFTSR-CHK-STATUS

THRU 3400-EXIT. 3100-EXIT. EXIT.

CiALL StRVICt. UlXL

* DESCRIPTION : EXECUTES THE SERVICE UTILITY PASSED FROM *

* PARM FILE AND DEALLOCATES THE INPUT FILE.ABEND *

* ROUTINE IS CALLED IF ANY ERROR.

* PERFORM : 9999-ABEND-ROUTINE *

* PERFORM BY : 3000-MERGE-FILE *

3200-CALL-SERVICE-UTIL.

MOVE "3100-CALL-SERVICE-UTIL" TO W700-PARAGRAPH-NM

CALL NU3O5CPY-UTIL-NAME END-CALL

EVALUATE RETURN-CODE WHEN ZEROS

MOVE ZEROS TO W400-RECORD-COUNT

ADD 1 TO W400-SERVICES-CALLED

WHEN OTHER

MOVE 9007 TO W700-ABEND-CODE

MOVE W600-ERROR-CALL-SERVICE-UTIL

Page 11

merge

TO W700-ERROR-MESSAGE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-EVALUATE. 3200-EXIT.

EXIT. /

CALL

* DESCRIPTION : DEALLOC TSO COMMAND IS EXECUTED USING THE * * 1 IKJEFTSR 1 PROGRAM AND ALSO CHECK RETURN CODE. * PERFORM : 3400-IKJEFTSR-CHK-STATUS * PERFORM BY : 3000-MERGE-FILE

3300-CALL-DEALLOC.

MOVE "3300-CALL-DEALLOC" TO W700-PARAGRAPH-NM

MOVE SPACES TO W700-BUFFER

MOVE NU3O5CPY-INPUT-DD TO W700-FREE-DD-NM

MOVE W700-FREE-COMMAND TO W700-BUFFER.

CALL W600-IKJEFTSR USING W700-FLAGS W700-BUFFER W700-LENGTH W700-RETURN-CODE W700-REASON-CODE W700-DUMMY

END-CALL

PERFORM 3400-IKJEFTSR-CHK-STATUS

THRU 3400-EXIT. 3300-EXIT. EXIT.

/** IKJEFTS T CHK S TATUS ******************************************

* DESCRIPTION : ROUTINE CALLED WHEN CALL MADE TO IKJEFTSR *

* IN ORDER TO CHECK THE RETURN CODE OF IKJEFTSR * UTILITY AND TO ABEND PROGRAM IF THE RETURN CODE * IS OTHER THAN ZERO. *

PERFORM 9999-ABEND-ROUTINE

* PERFORM BY 3100-CALL-ALLOC. * 3300-CALL-DEALLOC

3400-IKJEFTSR-CHK-STATUS.

MOVE '3400-IKJEFTSR-CHK-STATUS' TO W700-PARAGRAPH-NM

EVALUATE W700-RETURN-CODE

WHEN 0

CONTINUE

WHEN OTHER

MOVE W700-DUMMY TO W700-DUMMY-EDIT MOVE W700-RETURN-CODE TO W700-RETURN-CODE-EDϊT MOVE W700-REASON-CODE TO W700-REASON-CODE-EDIT MOVE W700-INFO-CODE TO W700-INFO-CODE-EDIT MOVE W700-CPPL-ADDRESS TO W700-CPPL-ADDRESS-EDIT MOVE W700-LENGTH TO W700-LENGTH-EDIT DISPLAY '** ERROR CALLING IKJEFTSR - VARS DUMP **' DISPLAY 'FLAGS VALUE ' W700-FLAGS

DISPLAY 'BUFFER VALUE 1 W700-BUFFER

DISPLAY 'LENGTH VALUE ' W700-LENGTH-EDIT

DISPLAY "RETURN CODE ' W700-RETURN-CODE-EDIT

DISPLAY 'REASON CODE ' W700-REASON-CODE-EDIT

DISPLAY 'DUMMY VAR VALUE : ' W700-DUMMY-EDIT MOVE 9006 TO W700-ABEND-CODE

Page 12

merge MOVE W600-ERROR-CALL-IKJEFTSR

TO W700-ERROR-MESSAGE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-EVALUATE. 3400-EXIT. EXIT. f EXIT PROGRAM " *

* DESCRIPTION : DISPLAY THE STATISTICS AND CLOSE ALL FILES. *

* PERFORM : 9100-CLOSE-LIST-FILE *

* PERFORM BY : 0000-MAIN-PROCESS *

9000-EXIT-PROGRAM .

MOVE ' 9000-EXIT-PROGRAM' TO W700-PARAGRAPH-NM

MOVE W400-FILES-MERGED TO W700-FIL-MRG

MOVE W400-SERVICES-CALLED TO W700-SRV-CLD

DISPLAY **************** START EXIT PROGRAM LOG************* 1

DISPLAY "NUMBER OF FILES MERGED : " W700-FIL-MRG

DISPLAY "NUMBER OF TIMES SERVICES UTIL CALLED: " W700-SRV-CLD

DISPLAY **************** END EXIT PROGRAM LOG***************'

CLOSE PARM-FILE

PERFORM 9100-CLOSE-LIST-FILE

THRU 9100-EXIT. 9000-EXIT. . EXIT.

/

** CLOSE LIST FILE **********************************************

* DESCRIPTION : PARAGRAPH TO CLOSE THE LIST FILE USING GOADYNOO.*

* ABEND PROGRAM IF ANY ERROR WHILE CLOSING FILE. *

* PERFORM : 9200-DYN-ERROR-HANDLE *

* PERFORM BY : 9000-EXIT-PROGRAM *

9100-CLOSE-LIST-FILE.

MOVE '9100-CLOSE-LIST-FILE' TO W700-PARAGRAPH-NM

MOVE W600-INPUT-DD TO DYN-IN-DDNAME

SET DYN-IN-CLOSE-PS TO TRUE

MOVE 9005 TO W700-ABEND-CODE

MOVE W600-ERROR-OPEN-LIST-FILE TO W700-ERROR-MESSAGE MOVE W600-GOADYN00-CLOSE-ERROR TO W700-GOADYN-MSG CALL W600-GOADYN00 USING GOADYNOO-PARMS-IN

GOADYNOO-PARMS-OUT END-CALL PERFORM 9200-DYN-ERROR-HANDLE

THRU 9200-EXIT. 9100-EXIT.

EXIT. / ** DYN ERROR HANDLE **********************************************

* DESCRIPTION : PARAGRAPH USED TO HANDLE THE ERRORS FOR GOADYN *

* ROUTINE. *

* PERFORM NONE *

* PERFORM BY 1100-OPEN-LIST-FILE *

* 2100-READ-FILE *

9100-CLOSE-LIST-FILE *

9200-DYN-ERROR-HANDLE. IF DYN-NO-ERRORS

CONTINUE ELSE

DISPLAY W700-GOADYN-MSG page 13

merge EVALUATE DYN-OUT-ERROR-CLASS

WHEN 1

DISPLAY "CONFIGURATION ERROR* WHEN 2

DISPLAY "OPERATION ERROR 1 WHEN 3

DISPLAY "SECURITY ERROR* WHEN 4

DISPLAY 'USER ERROR - BAD PARM INPUT * WHEN 5

DISPLAY 'INTERNAL ERROR" WHEN 6

DISPLAY "EXTERNAL ERROR" WHEN OTHER

DISPLAY "UNDOCUMENTED ERROR' END-EVALUATE

DISPLAY 1 GOADYNOO PARMS IN: ' GOADYNOO-PARMS-IN DISPLAY 1 GOADYNOO ERROR INFO: " DYN-OUT-ERROR-INFORMATION DISPLAY 1 GOADYNOO ERROR CODE: ' DYN-OUT-STATUS-INFO DISPLAY "MVS DECIMAL REASON CODE: * DYN-OUT-ERROR-CODE PERFORM 9999-ABEND-ROUTINE

THRU 9999-EXIT END-IF. 9200-EXIT. EXIT.

/

** CALL A BE N D R O UTINE ******************************************** * DESCRIPTION : PARAGRAPH WHICH CALLS THE ABEND ROUTINE. *

* PERFORM H00-OPEN-LIST-FILE * 1300-CHK-BUFFER-RANGE * 1400-READ-PARM-FILE * 1500-VALIDATE-FILE-PARM * 2100-READ-FILE *

3200-CALL-SERVICE-UTIL

* 3400-IKJEFTSR-CHK-STATUS * 9100-CLOSE-LIST-FILE

PERFORM BY 9000-EXIT-PROGRAM

9999-ABEND-ROUTINE.

DISPLAY '*************** START ABEND LOG ******************

DISPLAY 'PROGRAM NAME W600-PGM-ID

DISPLAY 'ABEND CODE 1 W700-ABEND-CODE

DISPLAY 'ABEND MESSAGE 1 W700-ERROR-MESSAGE

DISPLAY 'ABEND PARAGRAPH 1 W700-PARAGRAPH-NM

DIS PL AY **************** END ABEND LOG ******************

CALL W600-ABEND-ROUTINE USING W700-ABEND-CODE END-CALL. 9999-EXIT. EXIT.

****************** E N D O F P R OG R A M *********************

Page 14