ObjectStar Data Access - Impulse Solutions
Transcription
ObjectStar Data Access - Impulse Solutions
12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ TITLE OSB™ Rule Maintenance AUTHOR David Crichton, Impulse Solutions Ltd. CLASSIFICATION Technical Paper RELEASE 1.0 – 11th November 2013 This document describes the tools and processes available to users of the ISL OSB™ Tool Kit for creating, maintaining, analyzing and validating OSB™ Business Rules. Printed on 12/11/13 Page 1 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 1 Contents 1 Contents ................................................................................................ 2 1.1 List of Figures .................................................................................... 2 1.2 Changes from Previous Issue ............................................................... 3 1.3 Document Cross References ................................................................ 3 1.4 Revision History ................................................................................. 3 1.5 Impulse Solutions Ltd ......................................................................... 3 2 Introduction .......................................................................................... 4 2.1 Intellectual Property Rights.................................................................. 4 3 OSB™ Rule Concepts ............................................................................. 5 3.1 Overview ........................................................................................... 5 3.2 OSB™ Data Access ............................................................................. 5 3.3 Embedded COMMITs ........................................................................... 6 3.4 Node Consistency ............................................................................... 6 4 Rule Management Tools ........................................................................ 8 4.1 Extended Rule Editor .......................................................................... 8 4.2 Rule Linkage Validation ....................................................................... 8 4.3 TAM Access Validation ......................................................................... 9 4.4 Rule Scanner ................................................................................... 11 5 Rule Structure Monotoring .................................................................. 13 5.1 Rule Tree Display ............................................................................. 13 6 Rule Promotion Management .............................................................. 14 6.1 Promotion Manager .......................................................................... 14 6.2 Rule Comparator .............................................................................. 14 7 The Tool Kit.......................................................................................... 16 1.1 List of Figures Figure 1: Rule List ............................................................................................ 8 Figure 2: Linkage Check report .......................................................................... 9 Printed on 12/11/13 Page 2 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 3: TAM Analysis - Level 1 ...................................................................... 10 Figure 4: TAM Analysis - Level 4 ...................................................................... 10 Figure 5: Numeric Selection in Character Field ................................................... 11 Figure 6: Rule Scan for COMMIT....................................................................... 12 Figure 7: Filtered display for COMMIT; .............................................................. 12 Figure 8: Rule Tree Display ............................................................................. 13 Figure 9: Rule Tree - Rule Summary ................................................................. 13 Figure 10: Rule Promotion display .................................................................... 14 Figure 11: Rule Library Comparison .................................................................. 15 1.2 Changes from Previous Issue None 1.3 Document Cross References The distributed ISL OSB™ Tool Kit manuals should be used to provide additional reference together with the current OSB™ Release Manuals. 1.4 Revision History 1.0 11th November 2013 1.5 Impulse Solutions Ltd Impulse Solutions Ltd is an OSB™ Consultancy which has been developing utilities and add-ons for OSB™ for over nineteen years. It has also provided resource for application development and maintenance at a number of European and Australian customer sites and has contributed a number of functions to the OSB™ IDE graphical tool. Printed on 12/11/13 Page 3 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 2 Introduction This document is intended to provide a guide to the tools provided as part of the ISL OSB™ Tool Kit for the maintenance, analysis and validation of OSB™ Business Rules. These provide functionality which is not available in the distributed product. 2.1 Intellectual Property Rights Tools described in this document which are additional to the distributed functionality have been designed and developed by Impulse Solutions Ltd which retains the intellectual property rights to the techniques and specific implementation. Printed on 12/11/13 Page 4 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 3 OSB™ Rule Concepts 3.1 Overview The unique features of the ISL™ Business Rule coding structure provide a highly efficient process for development and maintenance of applications with productivity levels significantly higher than any other comparable process. In particular, the ‘code and go’ ability to run code without any need for compilation or linkage enables fast iterative development and testing. However, the cost of this is the relatively small size of each individual piece of code (or Rule) determined by the amount that can be stored in the LIBRARY table. This requires techniques that will be familiar to anyone who has ever developed a z/OS Type 4 SVC (as I learned over 35 years ago!). With the ability to reuse Rules and to build structures for common usage it can very easy to lose track of the relationships especially when making design changes to an existing process. In addition, when code has been accepted for production and promoted to the SITE library, further maintenance or enhancement may require management of a mixture of rules in either the local development library, SITE or both. This can be difficult when using the distributed Rule Editor as it can only process code in a single library. Finally, the process of promotion itself can be difficult to manage in order to ensure that all relevant Rules and non-rule objects are included in the generated set of promotions. Where development takes place in more than one local library this process becomes even more complex and open to error. 3.2 OSB™ Data Access The very simple process used in OSB™ to access data with its use of a single externally-defined reference for any data source – something made necessary by the limited size of Rules – and the resultant absence of data definitions in individual rules is a very powerful mechanism. More information about these concepts can be found in the ISL OSB™ Data Management Guide which can be downloaded without charge from the ISL website at www.impulse-solutions.co.uk. In addition, the Assignment by Name feature (A.* = B.*) makes the process of transferring data from one table buffer to another simple and concise. A potential problem exists with this feature when the fields of individual tables with the same name have not been created using the Global Field option and have conflicting characteristics which may result in either an assignment error or data overflow depending on the circumstances. Printed on 12/11/13 Page 5 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Data selection is in turn simplified by the very powerful WHERE options which are critical for development of effective data processing routines. However, when complex selection is used it can be difficult to ensure that selection is actually limited to those data rows required and does not result in every row being read (a table sweep) which can create significant overheads if the table contains a large number of data rows. Finally, a specific overhead was created in recent release of the product in cases where a numeric value is used for selection when a complete table sweep will occur. All of these conditions are detected by the ISL TAM Analyser. 3.3 Embedded COMMITs A specific problem relates to applications which have been developed with earlier versions of the product efore the amount of data that could be accumulated before saving was extended in all platform versions. This required the use of the COMMIT verb to update permanent data tables in the middle of a transaction rather than at its end. While this is a valid process in specific circumstances it can cause data integrity issues should an error occur within such code. It is recommended that early applications be analysed to determine if such procedures have been used and if so to rebuild them to remove the embedded COMMITs. Because COMMIT is actually an operation code it cannot be found by basic scanning of object code. The ISL Rule Scanner, however, can detect these and display any rules containing this operation. 3.4 Node Consistency If a correctly managed promotion process is used to migrate code from the development node up to the final production system the contents of the SITE library will remain consistent and allow further changes to be promoted successfully. However, when promotions have been rolled back or temporary fixes made to production systems which have not been carried back to previous nodes inconsistencies can occur which may cause subsequent promotions to fail or introduce logic errors which affect processing. One major client subcontracted support for its production node to an outside organization which did exactly that with the result that a major upgrade encountered a large number of issues and required extensive reengineering. ISL provides a Rule Library Comparator tool which can be used to detect such inconsistencies easily. If distributed processing is implemented this can be done directly between the SITE libraries in two different nodes. If Printed on 12/11/13 Page 6 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ not, a copy of SITE from, for example, the production node can be unloaded and reloaded into the development node under a different name and comparison made. Printed on 12/11/13 Page 7 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 4 Rule Management Tools 4.1 Extended Rule Editor This displays a selection of rules from a local library in a similar format to the standard Rule Editor but also includes any matching rules in the SITE library to give an integrated set, with the addition of extra fields to indicate whether a rule is in the local library, SITE or both. If it is present in both then the differences between the two can be displayed. The Linkage Validation and TAM Check tools can be invoked from this tool for individual rules. The entry rule is GENX_EDITX or it can be selected directly from the ISL Tool Box utility framework. Figure 1: Rule List 4.2 Rule Linkage Validation This scans a set of rules to detect a number of error conditions and generates a MSGLOG report. The conditions checked are: • • • • Call to non-existent rule Call with incorrect number of arguments Attempt to call a function rule Attempt to invoke a non-function rule as a function Printed on 12/11/13 Page 8 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 2: Linkage Check report 4.3 TAM Access Validation This scans a set of rules to detect errors in data access definitions or assignment errors. It can be run at one of 5 levels where each condition is included in the higher levels: 1. Inefficient Access only 2. Definition issues in table references 3. Above plus missing tables and indirect call option 4. Above plus validation of table/field assignments 5. Above plus unresolvable indirect references Printed on 12/11/13 Page 9 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 3: TAM Analysis - Level 1 Figure 4: TAM Analysis - Level 4 Printed on 12/11/13 Page 10 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 5: Numeric Selection in Character Field 4.4 Rule Scanner This scans a set of rules for a specified string or reserved word. It can be used specifically to detect embedded COMMIT verbs. Printed on 12/11/13 Page 11 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 6: Rule Scan for COMMIT Figure 7: Filtered display for COMMIT; Printed on 12/11/13 Page 12 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 5 Rule Structure Monotoring 5.1 Rule Tree Display This tool displays the call structure of the descendents of an entry rule, including embedded rules and indirect calls where these can be resolved. Optionally, a summary list of rules in the structure can also be displayed. Figure 8: Rule Tree Display Figure 9: Rule Tree - Rule Summary Printed on 12/11/13 Page 13 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 6 Rule Promotion Management 6.1 Promotion Manager This tool displays a set of objects of a specific class and shows where these have been assigned to an open Promotion. Unallocated objects can be added to a Promotion from a selection list. Figure 10: Rule Promotion display 6.2 Rule Comparator This tool can be used to compare rule libraries to display differences between them. Printed on 12/11/13 Page 14 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ Figure 11: Rule Library Comparison Printed on 12/11/13 Page 15 of 16 Release 1.0 12/11/13 OSB™ Rule Maintenance Rel 1.0 _______________________________________________________________________________ 7 The Tool Kit In addition to the tools referred to above, the Impulse Solutions Ltd Tool Kit provides a large number of routines for maintenance and analysis of code. These tools are described more fully in the relevant Impulse Solutions Ltd User Guides. Printed on 12/11/13 Page 16 of 16 Release 1.0