Abstract:
A system for modifying job control language (JCL) parameters optimizes data storage allocations for datasets by collecting historical data concerning actual data storage space requirements and use patterns for each dataset. JCL statements are parsed to find references to datasets and their requested data storage space allocations. The system then generates revised JCL statements with revised space allocation requests and dataset migration information for each dataset based on historical space requirements and usage patterns. Optionally, the system can display each proposed change to the JCL statements for approval by the user. The system can also revise JCL statements requesting allocation of space for each dataset in predetermined data storage areas grouped by predetermined size ranges. Alternatively, some operating systems include a JCL interpreter that translates JCL statements into control blocks having predetermined parameter fields. The present invention can be implemented to process and revise these JCL control blocks instead of generating revised JCL statements.

Description:
RELATED APPLICATION 
     The present application is a continuation-in-part of the Applicant&#39;s co-pending U.S. patent application Ser. No. 08/993,644, entitled &#34;System For Modifying JCL Statements To Optimize Data Storage Allocations&#34;, filed Dec. 18, 1997. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to the field of systems for optimizing data storage in computers. More specifically, the present invention discloses a system for modifying JCL parameters to optimize data storage allocations based on historical space requirements for each dataset. 
     2. Statement of the Problem 
     Many mainframe computers used in business environments run batch jobs controlled by job control language (JCL) statements. The JCL statements provide instructions to the computer operating system specifying each program to be executed and defining the datasets that will be used by the program. A JCL statement typically defines a dataset in terms of its name, physical data storage device, size, and other parameters required by the operating system. 
     It is common practice for a set of JCL statements to be written at the time a new application is first installed. The requested data storage allocations and other parameters for each dataset are based on the estimated needs of the job, before information on the actual data requirements of the job is available. Programmers writing JCL statements tend to err on the side of requesting too much space for each dataset to prevent errors during job execution. This can result in JCL statements that request space allocations that are several times larger than the actual space requirements for datasets. 
     After initial installation, batch jobs are typically run on a periodic basis according to the needs of the particular business (e.g., to generate invoices or paychecks). The JCL statements initially created for a job are often reused without change whenever the job is run due to the difficulty of writing and debugging JCL statements. As a result, JCL statements containing inflated or inaccurate data storage allocation requests continue to be used indefinitely, even after the application has been run for many years. 
     The prior art includes systems that monitor actual data storage requirements for datasets and generate statistical reports. For example, the IBM data facilities storage management system (DFSMS) includes a section that analyzes actual data storage requirements for datasets and generates reports. Sterling Software and Boole &amp; Babbage also offer programs to analyze usage patterns and generate reports. However, these prior art systems do not optimize JCL statements. The JCL programmer must review and understand the printed report and make appropriate revisions to the JCL statements for each job. 
     A somewhat different, but related problem arises from the need to manage the migration of datasets. For example, disk datasets are often periodically moved to tape for archival purposes. Tape datasets may be stored on-site for period of time and then purged or moved off-site for archival storage. Similarly, archival tape datasets are generally purged after some period of time. Many facilities handle this problem of dataset migration on an ad hoc basis or according to historical practices that may, or may not accurately reflect an optimal dataset migration strategy based on actual use patterns for each dataset or class of datasets. 
     The prior art in this field also includes U.S. Pat. No. 5,506,986 (Healy). Healy discloses a storage management system that monitors historical usage patterns for datasets and dynamically selects the most appropriate media type and specific device to store each dataset. However, the Healy system does not modify JCL statements. Instead, Healy system is implemented as part of the operating system, and makes decisions at the time that dataset allocations are actually made. 
     The system described by Healy has a significant disadvantage in that it requires modification of the operating system. JCL is commonly used in association with the operating systems of large mainframe computers that cost millions of dollars. These mainframe computers are typically used by large businesses and governmental entities to handle their central data processing needs. For example, recent Y2K concerns about possible interruption of business and governmental services have largely focused on legacy mainframe systems. Fear of such interruptions makes many mainframe owners justifiably reluctant to consider modifications to their operating systems, except as part of standard upgrades provided by the manufacturer (e.g., IBM). 
     Mainframe owners also have a strong interest in enforcing data storage policies with regard to all users to maintain uniformity, optimize storage use, optimize data migration and archiving procedures, and provide a means for reliably tracing the cause of any storage allocation problems that might occur. In the IBM MVS operating system, these data storage policies are implemented by a portion of the operating system commonly known as the automatic class selection (ACS) procedure. The ACS processes dataset allocation requests after the JCL statements have been parsed and converted into control blocks containing the corresponding parameters. The ACS normally makes the final allocation for each request based on these JCL parameters, consistent with the data storage policies implemented by the mainframe owner. For example, ACS may direct the dataset to a particular data storage device, or a particular type of data storage device based on these data storage policies. It is important to note that the system described by Healy is implemented after the ACS, which leaves open the possibility that the Healy system might override ACS data storage policies. This is particularly troublesome if the Healy system does not provide a clear audit trail of its decision-making process for the allocation of each dataset. 
     3. Solution to the Problem 
     The present invention provides a system for monitoring actual data storage requirements for each dataset and automatically modifying JCL parameters to include space allocations based on historical requirements for each dataset. This can be accomplished either by directly modifying the space allocation requests in such JCL statements, by replacing these parameters in such JCL statements with an appropriate DATACLAS parameter based on the historical space requirements of the dataset, or by modifying the corresponding parameter fields in the control blocks generated from such JCL statements by the JCL interpreter. The present invention can also be used to monitor actual use patterns for each dataset and automatically modify JCL parameters to include an appropriate MGMTCLAS parameter governing dataset migration. 
     In contrast to the system disclosed by Healy, the present invention does not require modification of the operating system. In addition, the present invention also has a significant advantage in that the modified JCL can be viewed by the JCL programmer, unlike Healy. The present invention allows the programmer to review specific proposed changes to the programmer&#39;s JCL statements to optimize allocation of storage resources. The modified JCL can also be reused by the programmer in subsequent job runs. In addition, the present system modifies JCL parameters before they are processed by the ACS. This means that ACS retains ultimate control over the final allocation of each dataset, which eliminates the possibility that the present system might somehow override ACS data storage policies. Therefore, this approach maintains the integrity of ACS data storage policies and controls. 
     SUMMARY OF THE INVENTION 
     This invention provides a system for modifying job control language (JCL) parameters to optimize data storage allocations for datasets. The system collects historical data concerning actual data storage space requirements and use patterns for each dataset. JCL statements are parsed to find references to datasets and their requested data storage space allocations. The system then generates revised JCL statements with revised space allocation requests and dataset migration information for each dataset based on historical space requirements and use patterns. Optionally, the system can display each proposed change to the JCL statements for approval by the user. The system can also revise JCL statements requesting allocation of space for each dataset in predetermined data storage areas grouped by predetermined size ranges. Alternatively, some operating systems include a JCL interpreter that translates JCL statements into control blocks having predetermined parameter fields. The present invention can be implemented to process and revise these JCL control blocks instead of generating revised JCL statements. 
     These and other advantages, features, and objects of the present invention will be more readily understood in view of the following detailed description and the drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention can be more readily understood in conjunction with the accompanying drawings, in which: 
     FIG. 1 is a schematic block diagram of the present system. 
     FIG. 2 is a simplified flow chart of the present invention. 
     FIG. 3(a) is an example of an input JCL statement defining a dataset stored on a disk drive or similar DASD. 
     FIG. 3(b) is an example of the resulting output JCL statement based on input JCL statement from FIG. 3(a). 
     FIG. 4(a) is an example of an input JCL statement defining a dataset stored on a tape. 
     FIG. 4(b) is an example of the resulting output JCL statement based on input JCL statement from FIG. 4(a). 
     FIG. 5 is a table showing the JCL parameters that are candidates for modification and the available options for each. 
     FIG. 6 is a schematic block diagram of an alternative embodiment of the present invention in which parameters in JCL control blocks are modified. 
     FIG. 7(a) is an example of an input JCL control block. 
     FIG. 7(b) is an example of the resulting JCL control block with modified parameters, based on the input JCL control block from FIG. 7(a). 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Turning to FIG. 1, a simplified block diagram is provided of the present system. As shown in this general overview, the system initially collects historical information on the actual space requirements and use pattern for each dataset by extracting this information from SMF (system management facility) data 15 maintained by the operating system. The SMF data extraction block 16 reads and filters SMF records 15 accumulated over a predetermined period of time to build an historical database 17 of the actual space requirements of each dataset. For example, the historical database 17 can include the average size, maximum size, and frequency of use for each dataset. The sample period can be of any length, and should be selected by the user to be fairly representative of normal usage patterns for datasets. This process can be repeated periodically to update the information in the historical database 17. The SMF data extraction block 16 also generates a report for the user summarizing the historical actual usage requirements for each dataset and providing statistics on the overall efficiency of space allocations. 
     During normal operation of the system, the JCL statements 11 for each job are read in and parsed to determine the fields and parameters for each JCL statement. Any JCL statements containing references to new datasets and requested data storage space allocations are passed to the JCL modification block 10. Other JCL statements are left unchanged. 
     The JCL modification block 10 is discussed below in detail and shown in FIG. 2. By way of an overview, the parameters of the data storage space allocation requests contained in the input JCL statements 11 are analyzed using substitution rules contained in the control tables 12. The JCL modification block 10 then generates new JCL statements 13 containing revised data storage space allocation requests and migration information for each dataset based on the substitution rules contained in the control table 12 and the historical data for each dataset from the historical database 17. The revised JCL statements 13 can be displayed 14 for the user to accept, reject, or otherwise edit. If the proposed revisions to the JCL statement are rejected by the user, the original JCL statement is used for the job. The system also generates a report providing a complete audit trail documenting revisions to the JCL statements. 
     FIG. 2 is a simplified flow chart of the JCL modification block 10 from FIG. 1. Each input JCL statement is parsed at step 20 into its respective fields and parameters. At step 22, the JCL statement is analyzed to determine whether it is a dataset definition statement (&#34;//DDname DD . . .&#34;). Other types of JCL statements (e.g., comment lines and EXEC statements) are passed without changes. At step 24, the historical database 17 is searched for an entry having the name of the dataset referenced in the dataset definition statement. If the dataset name is not found, the JCL statement is passed unchanged. On the other hand, if the dataset name is found, the JCL modification block modifies the dataset parameters in the JCL statement based on these historical statistics. The parameters that are candidates for modification are SPACE, AVGREC, STORCLAS, MGMTCLAS, and DATACLAS. The proposed changes to the JCL statement are shown on a display 14 for review by the user. The JCL modification block then proceeds to the next input JCL statement at step 28 until the end of the JCL statements is encountered. 
     FIGS. 3(a)-3(b) and 4(a)-4(b) provide two examples of JCL statements before and after they have been processed by the present system. In FIGS. 3(a) and 3(b), a JCL statement defining a disk dataset has been changed by deleting the SPACE parameter in the second line of the statement and substituting appropriate DATACLAS, STORCLAS, and MGMTCLAS parameters. Similarly, in FIGS. 4(a) and 4(b), a JCL statement defining a tape dataset has been changed by adding appropriate DATACLAS, STORCLAS, and MGMTCLAS parameters. 
     The system can be configured in any of a number of options governing the types of JCL modification that will be undertaken. FIG. 5 is a table showing the actions that the system will take on DD statement parameters depending on the processing option selected by the system administrator. The following is a summary of the available options shown in FIG. 5: 
     Dataclass Option 
     When the dataclass option is selected, the system adds the DATACLAS parameter to the DD statement with a dataclass name reflecting the true maximum space requirements for the dataset. The original SPACE, AVGREC, and DATACLAS parameters in the DD statement are removed. The actual maximum size of the dataset referenced in the DD statement are retrieved from the historical database 17. The system also includes a dataclass table containing a series of rows listing the various permissible dataclass names and their respective ranges of maximum size. In the interest of simplicity, the each dataclass name can be coded as a mnemonic indicating its size range. The system selects the appropriate row from the dataclass table based on the actual maximum size of the dataset referenced in the DD statement as retrieved from the historical database 17. The DATACLAS parameter is then added to the DD statement with the resulting dataclass name. 
     Group Option 
     When the Group option is selected, the system changes DD statement parameters to enable implementation of a special form of pooling, referred to as group allocation. Group allocation essentially eliminates space ABENDs and need for disk defragmentations. Its uniqueness is that, within a given pool, all space allocations (both primary and secondary) are in one given size (e.g., 10K). This option is applied only to DD statements defining permanent disk datasets with a disposition of NEW or MOD. The original SPACE, AVGREC, and DATACLAS parameters are removed from the DD statement. 
     The system includes a group table having a series of rows corresponding to a set of permissible dataclass names ranked by maximum dataset size. In the preferred embodiment of the present invention, the group table also includes an initial row for the minimum dataset size and a bottom row containing the maximum dataset size. 
     The actual maximum size of the dataset referenced in the DD statement is retrieved from the historical database 17 and used to select a row from the group table. If the historical maximum size of the dataset falls outside the bounds of the group table, a predetermined standard SPACE parameter can be added to the DD statement or the parameters from the original DD statement can be used. If the size of the dataset is within the bounds of a row in the group table, the DATACLAS parameter is set to that value and added to the DD statement. 
     Management Class Option 
     When the MGMTCLAS option is selected, the system uses the frequency of use data for the dataset from the historical database 17 to develop a management-class name coded to reflect the actual past usage pattern of the dataset. This option applies only to DD statements defining permanent disk datasets and permanent tape datasets having dispositions of NEW or MOD. Any existing MGMTCLAS parameter in the DD statement is removed. 
     The frequency of use data for the dataset is retrieved from the historical database 17 and analyzed to identify both short and long term usage patterns. In the preferred embodiment of the present invention, approximately 100 management classes are supported. The management class names generated by the system are mnemonic codes reflecting both the short and long term usage patterns. The codes for the short-term usage pattern are designed to support migration decisions for a multi-level storage hierarchy (e.g., primary, ML1, and ML2). The codes for the long-term usage pattern support decisions relative to automatic recall of datasets and disposition or location of ML2 media. 
     Pool Option 
     When the pool option is selected, the system adds a DATACLAS parameter to the DD statement reflecting the actual space required the dataset. The pool option may be selected with the tape-to-disk or management class options and is applied only to DD statements defining permanent disk datasets with a disposition of NEW or MOD. The original SPACE, AVGREC, and DATACLAS parameters in the DD statement are removed. 
     The actual maximum size of the dataset referenced in the DD statement is retrieved from the historical database 17. The system also includes a pool table containing a series of rows listing the various permissible dataclass names and their respective maximum sizes (e.g., small, medium, large, and huge). The system selects the appropriate row from the dataclass table based on the actual maximum size of the dataset referenced in the DD statement as retrieved from the historical database 17. The DATACLAS parameter is then added to the DD statement with the resulting dataclass name. 
     Remove Sortwork Option 
     When the Remove Sortwork option is selected, the system removes all DD statements defining SORTWORK datasets. A sort name table contains the names of various sort programs and a maximum sort size parameter for each sort program. The system examines the PGM parameter in each EXEC statement. If the program name matches a name entry in the sort name table, the maximum size of the input dataset for the step is retrieved from the historical database. If it is less than the maximum sort size specified in the sort name table, all DD statements defining SORTWORK datasets are deleted. 
     Space Recalculation Option 
     When the Space Recalculation option is selected, the system calculates new values for the SPACE parameter reflecting the actual space requirements of the dataset from the historical database 17. The new SPACE parameter and an appropriate AVGREC parameter are inserted into the DD statement in place of the original SPACE and AVGREC parameters. This option applies only to DD statements for permanent and temporary disk datasets having a disposition of NEW or MOD. 
     Tape To Disk Option 
     When the Tape To Disk option is selected, the system adds a DATACLAS parameter to the DD statement accurately reflecting the actual space requirements of the dataset based on statistics from the historical database 17. This option applies only to DD statements defining permanent tape datasets with a disposition of NEW or MOD. 
     The maximum size of the dataset defined in the DD statement is retrieved from the historical database 17. If the dataset is stored on a stacked tape, the maximum size of the stacked tape is also retrieved. A row is selected from the dataclass table for each size, and the appropriate DATACLAS is selected using the mnemonic naming convention described above. The DATACLAS parameter is added to the DD statement. 
     Temp Datasets Option 
     This option applies to DD statements defining temporary disk datasets with a disposition of NEW or MOD. The system adds the DATACLAS parameter to the DD statement with a dataclass name reflecting the true space requirements of the dataset based on statistics from the historical database 17. Here again, the dataclass name is selected from the dataclass table and the appropriate DATACLAS parameter is added to the DD statement using the mnemonic naming convention described above. 
     Replace Storageclass Option 
     The &#34;Replace Storageclass&#34; option determines how the STORCLAS parameter is processed in the Group, Pool, Dataclass, and Temp Datasets options. If it is set to &#34;Yes&#34;, these options replace the STORCLAS parameter with the contents of their table entry. If the table entry is blank, the STORCLAS parameter is removed. If the option is set to &#34;No&#34;, the STORCLAS parameter, if present, is transferred unchanged. 
     Modification of JCL Control Block Parameters 
     Some operating systems, such as the IBM MVS operating system, include JCL interpreter that translates JCL statements into control blocks having predetermined parameter fields. FIG. 6 is a schematic block diagram of an alternative embodiment of the present invention in which these JCL control blocks are processed and revised. To summarize, this embodiment gathers historical information on each dataset to develop a class table that can be used to dynamically assign class information to a dataset immediately prior to allocation. Examples of a JCL control block (before and after revision) are shown in FIGS. 7(a) and 7(b). Class assignment is performed in as operating system Job Entry Subsystem (JES) exit. 
     Turning to FIG. 6, the system initially collects historical information on the actual space requirements and use pattern for each dataset from the SMF data maintained by the operating system, and used this information to build an historical database 17 of the actual space requirements of each dataset. For example, the historical database 17 can include the average size, maximum size, and frequency of use for each dataset. 
     In step 61, the record for each dataset in the historical database 17 is read and assigned class parameters, as described about with regard to step 10 in the first embodiment. Control tables 12 are used to define class parameters to be applied to each dataset. Mapping formats for management class parameters 62 allows use-pattern information to be mapped into management class parameters previously assigned to the dataset. The output from this process is a record for each dataset in the historical database 17 that includes the database key, dataset type, and assigned class parameters. 
     The records created in step 61 are then used in step 63 to build a dynamic class table 64 in key sequence. This class table 64 will be subsequently used in step 65 for assigning appropriate class parameters to each dataset. System control commands can be entered from a terminal 14 and are used to manage the dynamic class table 64. For example, a new table can be created to replace an existing class table, or to set up a test environment. This facilitates adding new table entries or changing class standards. 
     In the pre-allocation processing step 66, JES prepares each data definition (DD) statement for job/step allocations. During this pre-allocation processing, JES makes information available to users via &#34;EXITS.&#34; These &#34;EXITS&#34; are well documented in the IBM MVS operating system and can be used to provide an interface for passing control to an external procedure, such as the present system. The JES pre-allocation processing step 66 reads the JCL control block produced by the JCL interpreter from each JCL statement 11 and passes the JCL control block to step 65. 
     Class parameters are dynamically assigned in step 65 to each new dataset referred in the JCL control block. For each new dataset, the dynamic class table 64 is searched to locate dataset specific information (e.g., the appropriate management class for the dataset). This information is then used to modify the JCL control block to include the appropriate class parameters for the dataset. The modified JCL control block is returned to the JES pre-allocation processing step 66 for continued conventional processing by the operating system. 
     Any JCL control block that do not contain references to new datasets and do not request data storage space allocations are left unchanged by step 65. It should be understood that this embodiment of the present invention can also be employed to modify other parameters associated with the data storage space allocation requests contained in the input JCL control blocks using substitution rules contained in the control tables 12. The step 65 then generates a revised JCL control block containing parameters for revised data storage space allocation requests and migration information for each dataset based on the substitution rules contained in the control table 12 and the historical data for each dataset from the historical database 17. The revised JCL control block 13 can be displayed on a terminal 14 for the user to accept, reject, or otherwise edit. If the proposed revisions to the JCL parameters are rejected by the user, the original JCL control block is used for the job. The system can also generate a report providing a complete audit trail documenting revisions to the JCL parameters. 
     The above disclosure sets forth a number of embodiments of the present invention. Other arrangements or embodiments, not precisely set forth, could be practiced under the teachings of the present invention and as set forth in the following claims.