Introducing Micro Focus Net Express to Develop and Extend COBOL Applications within.net White Paper



Similar documents
Agile Business Suite: a 4GL environment for.net developers DEVELOPMENT, MAINTENANCE AND DEPLOYMENT OF LARGE, COMPLEX BACK-OFFICE APPLICATIONS

Programmabilty. Programmability in Microsoft Dynamics AX Microsoft Dynamics AX White Paper

IBM WebSphere ILOG Rules for.net

Micro Focus Database Connectors

WHITE PAPER. TimeScape.NET. Increasing development productivity with TimeScape, Microsoft.NET and web services TIMESCAPE ENTERPRISE SOLUTIONS

Programming in C# with Microsoft Visual Studio 2010

Integrating SharePoint Sites within WebSphere Portal

Key Benefits of Microsoft Visual Studio 2008

Complementing Your Web Services Strategy with Verastream Host Integrator

Upgrading a Visual Basic Application to.net:

Done. Imagine it. c Consulting. c Systems Integration. c Outsourcing. c Infrastructure. c Server Technology.

Version Overview. Business value

4D and SQL Server: Powerful Flexibility

DEPLOYMENT ARCHITECTURE FOR MICROSOFT.NET ENVIRONMENTS

SERVICE OVERVIEW SERVICES CATALOGUE

Base One's Rich Client Architecture

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

CrossPlatform ASP.NET with Mono. Daniel López Ridruejo

Extending Legacy Applications to Consume Web Services. OpenSpan White Paper Series: Extending Legacy Applications to Consume Web Services

Integrating Mainframe Systems in Microsoft Environments

Moving Your COBOL Assets to Microsoft.NET: Fujitsu NetCOBOL for.net

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Building Applications Using Micro Focus COBOL

Developing Database Business Applications using VB.NET

Mainframe Application Development Strategy White Paper

Advanced Web Application Development using Microsoft ASP.NET

Executive summary. Table of Contents. Technical Paper Minimize program coding and reduce development time with Infor Mongoose

Introducing the.net Framework 4.0


Extend the value of your core business systems.

DEVELOP. Choosing a Development Tool. Microsoft Dynamics GP. White Paper

Service Oriented Architectures

Business Process Analysis & Management. Corporate Synergy

ASNA Case Study. ASNA Visual RPG paves the path to.net for Management Control. Leaders in IBM i Modernization. Real Life Challenges

IBM INFORMATION MANAGEMENT SYSTEMS (IMS ) MIGRATION AND MODERNIZATION - CONVERSION OF HIERARCHICAL DL/1 STRUCTURES TO RDBMS

Improve business agility with WebSphere Message Broker

Web Application Development for the SOA Age Thinking in XML

SequeLink Server for ODBC Socket

Data Sheet VISUAL COBOL WHAT S NEW? COBOL JVM. Java Application Servers. Web Tools Platform PERFORMANCE. Web Services and JSP Tutorials

DEPLOYMENT ARCHITECTURE FOR JAVA ENVIRONMENTS

Page 1. Overview of System Architecture

ASP &.NET. Microsoft's Solution for Dynamic Web Development. Mohammad Ali Choudhry Milad Armeen Husain Zeerapurwala Campbell Ma Seul Kee Yoon

A Comparison of Web Development Technologies: WebObjects vs. ASP.NET

Turning ClearPath MCP Data into Information with Business Information Server. White Paper

CA IDMS Server r17. Product Overview. Business Value. Delivery Approach

Visual COBOL ASP.NET Shopping Cart Demonstration

Ultimus Adaptive BPM Suite V8

Visual Basic. murach's TRAINING & REFERENCE

Your Data, Any Place, Any Time.

Advanced Web Application Development using Microsoft ASP.NET

How To Create A C++ Web Service

Programming with the Microsoft.NET Framework Using Microsoft Visual Studio 2005 (VB)

Fujitsu Global Legacy Modernization Modernization to Cloud Services

Your Data, Any Place, Any Time. Microsoft SQL Server 2008 provides a trusted, productive, and intelligent data platform that enables you to:

A standards-based approach to application integration

Understanding Business Process Management

zen Platform technical white paper

IBM WebSphere application integration software: A faster way to respond to new business-driven opportunities.

1 What Are Web Services?

Service-oriented architecture in e-commerce applications

How To Develop A Web Development Software For A Business

Unlock the Value of Your Microsoft and SAP Software Investments

Manage Software Development in LabVIEW with Professional Tools

Modern Software Development Tools on OpenVMS

2311A: Advanced Web Application Development using Microsoft ASP.NET Course 2311A Three days Instructor-led

Accenture Duck Creek Driving efficiency and high performance through Property & Casualty insurance software

Web. Studio. Visual Studio. iseries. Studio. The universal development platform applied to corporate strategy. Adelia.

Answers to Top BRMS Questions

Oracle Application Development Framework Overview

Pivot Charting in SharePoint with Nevron Chart for SharePoint

Data Security and Governance with Enterprise Enabler

DB2 Application Development and Migration Tools

OpenText Information Hub (ihub) 3.1 and 3.1.1

WHITE PAPER MATTERSPHERE TECHNOLOGY AND FUNCTIONALITY REVIEW CONNECTING YOU WITH WHAT MATTERS

CT30A8901 Chapter 10 SOA Delivery Strategies

PIE. Internal Structure

Scalability and BMC Remedy Action Request System TECHNICAL WHITE PAPER

Choosing a Development Tool

Realizing business flexibility through integrated SOA policy management.

Micro Focus Mainframe Solutions There s a future in the present

Crystal Reports. For Visual Studio.NET. Reporting Off ADO.NET Datasets

Attunity Integration Suite

How To Build A Financial Messaging And Enterprise Service Bus (Esb)

1 What Are Web Services?

Preguntas + frecuentes sobre Embarcadero Delphi Prism XE

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

Web-based Solution Helps Death Care Service Provider Cut Costs, Scale Up

SOACertifiedProfessional.Braindumps.S90-03A.v by.JANET.100q. Exam Code: S90-03A. Exam Name: SOA Design & Architecture

New Features... 1 Installation... 3 Upgrade Changes... 3 Fixed Limitations... 4 Known Limitations... 5 Informatica Global Customer Support...

Crystal Reports.NET Overview

Transcription:

Introducing Micro Focus Net Express to Develop and Extend COBOL Applications within.net White Paper

Abstract This paper will introduce the capabilities of Micro Focus Net Express that allows COBOL to operate within the.net environment. This provides a variety of options for enhancing and extending existing systems. IT leaders have many concerns and businesses have a short list of imperatives. They want to: 1) reduce cost, but not at the expense of value, 2) reach more customers, 3) offer more flexible channels through which their services can be delivered, and 4) reduce complexity within the organization. 1 Such business needs translate into challenges for IT managers and architects such as how to extend the reach of existing applications to new users through the web, how to integrate COBOL applications with other applications across the enterprise, and how to provide a productive development environment to motivate and retain COBOL programmers. In this paper, we will discuss how Micro Focus helps to extend and modernize COBOL applications reusing existing code within the Microsoft.NET architecture. COBOL applications can now be developed with Microsoft Visual Studio 2005 for deployment into the.net Framework, existing procedural COBOL code can be reused, while Micro Focus and Visual Studio tooling can be used to extend such applications, exposing COBOL business processes as Web services or adding a.net Windows Form or WebForm interface to an existing COBOL application. For more information, please visit www.microfocus.com. 1 Barnett, Gary. Life on the Front Line the Reality of End-users IT in 2002, Ovum, July 2002. 1

Contents Introduction...3 COBOL Inside Visual Studio 2005...4 Setting Breakpoints...5 Pointer Tip Functionality...5 Bookmarks...5 Run Options...6 Reusing Procedural COBOL...7 Wrapper Approach...7 Object COBOL...9 Web Services...12 SQL...13 Disconnected Mode: ADO the Dataset...14 WinForms and WebForms...15 WinForms...17 WebForms...19 Further Development and Deployment Capability...20 Conclusion...21 2

Introduction This paper introduces the fundamental functions for creating, extending and reusing COBOL applications in the.net environment. Most existing applications contain a large volume of traditional COBOL business logic combined with SQL or VSAM/ISAM data access code. A large percentage of this code can be reused in the.net Framework migrating, providing existing application functionality as managed code. However, when migrating existing code into the.net Framework, it is often with a view to extending the use of the application. The ease with which an application can be extended will, in part, depend on the structure and nature of the existing application itself. When extending an application, it is necessary to provide a means (or interface) to access the business functions that are to be extended. Where such an interface can be defined, it is possible to continue to reuse the existing procedural business logic and access it from other applications in the enterprise either through Web services, or by modernizing the user interface through which the application functionality is accessed. In essence, with this approach the traditional business processes encapsulated in the COBOL business logic are exposed as services. These services will be accessed either directly from other.net languages such as Microsoft C#, Microsoft Visual Basic.NET or from extended COBOL code. As COBOL is migrated to the.net environment, COBOL applications build to intermediate language code in the same way as other Microsoft.NET languages. This means that COBOL as a language now, has full access to the.net Framework classes and functions in the same way as other languages. In this sense, COBOL is not connecting or even integrating with the.net Framework, COBOL is now inside the.net Framework architecture. The following diagram shows an example of COBOL modules inside the.net Framework. 3

COBOL Inside Visual Studio 2005 As part of the integration with.net, the COBOL language is now integrated with Visual Studio 2005. This means that the same Integrated Development Environment (IDE) can now be used for managed COBOL code as for other Microsoft languages such as Visual Basic or C#, allowing a developer working on both of these languages to learn just one IDE. A further advantage is that for composite applications comprised of COBOL and other.net languages, not only can the same IDE be used for their development, but all the application elements can be held in the same Visual Studio solution. This provides for the seamlessly testing and debugging between the application components within a solution regardless of their source language. The following graphics provide a visual representation of the COBOL-based Visual Studio 2005 IDE functionality resulting from this integration: 4

Setting Breakpoints Pointer Tip Functionality Bookmarks 5

Run Options In addition, COBOL within Visual Studio takes advantage of the IntelliSense, complete word, outlining to expand or contract code detail and object browser functions to extend and assist reusability of core COBOL routines. 6

Reusing Procedural COBOL Micro Focus provides the option for developers to maintain existing COBOL procedural code intact within the.net Framework. This retains application integrity and valuable business rules, and at the same time provides COBOL teams with the opportunity to expose COBOL application to.net using two possible approaches. The first approach utilizes a proxy or wrapper routine which acts as an object interface between the original COBOL application and the remainder of the system object routines. The second approach makes the original COBOL routine even more accessible and reusable by exposing it as a Web service, which is then the starting point for a future change to a Service Oriented Architecture (SOA). This approach is described later in the Web Services section. Wrapper Routine Approach Sometimes referred to as a proxy routine, but probably more aptly known as a Wrapper Routine. This approach wraps an object interface around the original procedural COBOL routine, which is subsequently called from within the wrapper code similar to any subroutine in COBOL. Unless it has been decided to make changes to the original code for external reasons, there is no need to make changes to the original COBOL routine, thereby eliminating the need to rewrite the current functioning routine. The original COBOL routine is added into a project within a.net solution making it available within the multi-faceted.net application. By exposing the application in this way, the concept of single threading as dictated by non-.net procedural applications, is changed as it enables multi-tasking and multithreading. The Micro Focus Server COBOL runtime enables this change by invoking the default NOILSTATIC COBOL compiler option within the Build process. This allows the use of multiple run units within an application domain, ensuring that each instance of the procedural COBOL code will receive a unique copy of its data. 7

Net Express application Build functions are fully.net compliant and compile existing COBOL applications to Microsoft Intermediate Language code (MSIL). As part of the.net Common Language Runtime (CLR), the application gets converted into native code via the Just-In-Time Compiler function. As a result, the COBOL application is exposed in the language independent.net environment as a COBOL object and can interface with all the Framework functions. This concept substantially increases both the reusability and extensibility of COBOL applications, allowing greater flexibility and adaptability for subsequent changes in the system strategy. COBOL applications in.net provide an easy transition into a managed code environment. Subsequent changes can be made to move into a multi-tiered configuration, breaking the original application into more flexible interoperable COBOL modules. The following graphic demonstrates this process. 8

Object COBOL Moving COBOL applications into a.net managed code environment provides developers with greater flexibility in design and coding techniques, including the opportunity to utilize streamlined Object COBOL syntax, thus providing a natural and concise way for COBOL to employ the capabilities of.net. In the latest release of Net Express, the changes are part of the ongoing strategy to automate code generation and to induce more systematic code links between various components in the application. The following examples show some of the changes in syntax available in order to both reduce transitory code required where applicable, and to maintain consistent managed code routines using predefined types. For ease of definition, the older full syntax is shown in the left half of the illustration and the equivalent 2005 syntax is in the right half. The above example highlights the ability to build in standard predefined classes to avoid repetitious manual coding, thereby making the object code an extension to existing procedural syntax. 9

Example below demonstrates the simplification of the array definitions associated with typical OCCURS clauses in linkage records to be passed to other objects. Note the effect of cleaning up the old code by appropriate use of predefined fields in the first example. Finally, the following example highlights the power of the :: in order to define and set method parameters. 1 0

Similarly, more consistent error handling to increase program robustness can be added to routines using the Try Catch arrangement for preempting errors and providing default solutions to stabilize processing. TRY INVOKE ConvertClass "ToSingle" USING BY VALUE TextProperty OF retailprice RETURNING convertedvalue CATCH convertexception SET TextProperty OF retailprice TO "00.00" - END-TRY - In this case, the above error check ensures only correct numeric definitions are used and therefore improves program robustness. The Micro Focus runtime has exceptions defined for specific COBOL errors such as subscript overflow or file handling errors: TRY Set data-item to 11 move "X" to table-item( data-item) CATCH objectoverflow Display Object Overflow Exception FINALLY Display In finally syntax END-TRY Multiple Exceptions CATCH anullrefexception This statement will be executed only if the exception thrown matches the type specified above. However, the order in which you specify your CATCH statements is important. The Common Language Runtime will evaluate the type of the exception object that has been raised and execution will jump to the first appropriate CATCH handler in the list. This will be the first CATCH block that specifies an exception that is either a descendant or equal to the class of the exception that has been thrown. 1 1

Web Services Web service is a discreet, standalone interoperable business function which is reusable. This opens up corporate systems to being leaner, more focused on business requirements and equally more adaptable to change. By adhering to a set of protocols and standards for exchanging data within the.net environment, Web services allow companies greater flexibility in reusing application code. It allows common business functions to be made available to various applications. Common Web services can be embedded into applications to expand the functionality of a routine. The.NET Framework provides the perfect environment for the exchange of data between applications and other Web services written in various programming languages and running on various platforms. This interoperability means that many common business routines can now be replaced by a single Web service, meaning that only one piece of code (i.e. Web service) needs to be maintained. All of these changes move us closer to the ideal scenario for platform and language independence, and the desire for loosely coupled systems that can be quickly altered to reflect changes in the business. This paper is not intended to detail the construction of a Service Oriented Architecture (SOA), but to explain the way COBOL applications are particularly suitable as Web services and the options available within Net Express to extend COBOL routines as a Web service for deployment under Windows.NET. An alternative not described in this paper is the Interface Mapping Toolkit that supports the extension of COBOL business processes for extension to Web services that are deployed outside the.net Framework on Windows, UNIX or Linux. Web service is a piece of callable application code that exposed on either the Internet or an Intranet to perform a specific function when supplied with certain parameters. When a COBOL subroutine is called, it frequently accesses parameters passed to it via its linkage section. It is therefore not surprising that most COBOL subroutines have the potential to become Web Services. When a Web service is created from a COBOL application in.net, it is done via.wsdl files. The WSDL files are invoked from a server, or by amending the COBOL program to turn it into a class object and incorporating the code-behind attributes. An executable is then built to be deployed using either a.asmx or.wsdl file on a server. Within.NET, the Web service can then be accessed from a list of available services, regardless of the program s language which accesses the service or the platform from where it is called. The ease of creating Web services coupled with the synergy with procedural COBOL subroutines makes COBOL Web services an attractive proposition for development shops. This approach broadens the exposure of core COBOL applications within the organization, and makes them widely accessible in the language independent.net environment. 1 2

SQL Since its launch in 1997, Net Express has provided the ability to create database independent COBOL SQL code known as OpenESQL, which is translated into ODBC calls. Under the.net Framework, Net Express provides the ability to reuse OpenESQL COBOL SQL and map it without code change to ADO.NET, providing managed code data access. The OpenESQL Assistant enables developers to create and test their SQL in isolation to the program and then paste the generated SQL code into the program in the correct and tested format. This provides the developer with the ability to interrogate the data source separately from the application providing the ability to verify SQL prior to embedding the generated SQL syntax into the COBOL. 1 3

Disconnected Mode: ADO the Dataset.NET takes data connectivity further using ADO.NET with the concept of operating in Disconnected mode. This supports application requirements to retrieve rows of data to be used for interrogation functions and passing the data into memory as rows and columns, and then execute SQL while Disconnected. This capability provides a number of previously available options, but without the cost of tying up connection time to the original data source. The OpenESQL Assistant has been enhanced to provide automated code generation for the dataset syntax needed for creating, populating, manipulating and deleting the information being processed in Disconnected mode. Existing OpenESQL applications with ANSI-based EXEC SQL code can be reused under.net using the DBMAN directive to choose between ODBC and ADO.NET. Functionality such as datasets described above is added by the new EXEC ADO syntax. The EXEC ADO syntax provides a more concise COBOL oriented way for the COBOL programmer to access ADO.NET specific functions. 1 4

WinForms and WebForms Contemporary.NET user interfaces can be created in COBOL using Windows Forms (WinForms) or WebForms. WinForms are a good choice when the need exists to create a rich client interface within a Windows application requiring high performance. WinForms enable developers to interface COBOL routines with optimum front-end graphical user interfaces. Using Net Express with the Visual Studio 2005 designer, developers can paint the screen to generate COBOL code behind automatically. This allows the developers to add the additional event logic with the assistance of IntelliSense. While WinForms are a true Graphical User Interface, WebForms provide a Web browser interface for use over the Internet/Intranet. Both appear the same as they do have similar components, but are different in terms of objects and functionality. WinForm controls should not be confused with WebForm controls. WebForm controls contain additional Web server based code. WinForms are the user interface of a program. The user interface and the program can be either in the same language or different languages. Within.NET, the ability to mix and match objects of different languages keeps all options open. 1 5

WebForms as you will see in the following pages, displays the information on the Web pages which has additional supporting program code and requires a Web Browser. 1 6

WinForms Net Express latest release allows developers to stay with COBOL, but use the richer format WinForm objects that can bring to their Windows Graphical User Interface (GUI). The existing Microsoft WinForm option has been supplemented by a corresponding COBOL WinForm painter tool, which conforms to the Microsoft standard. It is completely transparent to end-users that the GUI is COBOL-based. The functionality complies with.net standards utilizing the option for enhanced COBOL syntax. A typical COBOL WinForm would be defined as shown in the Solution Explorer view below. 1 7

As you can see, the original COBOL procedural code remains unchanged and called as required from the wrapper routine. The wrapper object then acts as the prime interface for the information displayed or keyed through the GUI. The application would result in the GUI objects below. The above example uses COBOL as the primary language. It is not a mixed language application. However, if it were written in different languages, the application would appear and behave the same. The difference would be the required data translation between the components of different languages. 1 8

WebForms Using similar tools and process to those used in WinForms, ASP.NET allows developers to create a Web application that displays a graphical user interface or WebForm which runs on the Internet/Intranet and processes information for distributed systems. Using a browser, such Web applications can be executed from anywhere. The starting point in Visual Studio 2005 is via the website menu to ensure Internet applications are kept separate from conventional Windows applications. Each WebForm is made up of two components, the.aspx file which contains everything related to the WebForm or user interface and the code behind the WebForm and its graphical objects. The WebForm s code behind file is displayed in the Solution Explorer and contains the program code that is executed when the user interacts with the WebForm. Opening up COBOL applications to the Web requires additional functionality to overcome threading issues, as it is likely the application will have multiple simultaneous users. The ability for multi-threading and re-entrancy is an integral part of the COBOL executables. This is now handled by default with Multiple Run Unit Support within the Micro Focus managed code runtime, it is important to ensure that the default NOILSTATIC directive remains unchanged. 1 9

Further Development and Deployment Capability This paper concentrated on the capabilities of Micro Focus Net Express which allows COBOL to operate within the.net environment as an equal partner with other language-based components. Further important, development capability is added with Micro Focus Studio for Mainframe Migration which provides the ability to extend and migrate COBOL CICS applications into a lower cost deployment environment. Applications developed with Micro Focus Net Express or Micro Focus Studio are deployed with Micro Focus Server. Micro Focus Server for.net provides deployment support for managed and verifiable code COBOL applications under the.net Framework and is the deployment platform for the applications discussed in this paper. Micro Focus Server for SOA adds a scalable, managed and high-performance transactional environment for the deployment of COBOL applications and services, COBOL/J2EE applications and direct COBOL Web services to Windows, UNIX and Linux. Micro Focus Server for Mainframe Migration adds the capability to deploy CICS and JCL code migrated from an IBM mainframe to Windows, UNIX or Linux. Such migrated core corporate COBOL applications deployed with Micro Focus Server for Mainframe Migration can then be readily extended to meet new business requirements, modernize the user interface to.net, and integrate with existing systems across the enterprise. Micro Focus Studio for Mainframe Migration capability includes the mapping of an existing CICS BMS interface, COMMAREA or Workflow to a.net COBOL WinForm, WebForm or Web services.. It is important to note that the CICS application does not change and continues to execute as normal, and if required, is still accessible through a standard green screen mode using a 3270 interface in addition to its new and extended usage. The ability to build these interfaces without having to modify existing applications and the ability to reuse existing valuable and critical business transactions provides a powerful step forward for business and IT support of that business. 2 0

Conclusion Micro Focus Net Express provides the ability not only to reuse, but to create and extend COBOL in the Microsoft.NET Framework. Micro Focus Server for.net provides the ability in conjunction with the Microsoft Common Language Runtime to deploy COBOL applications as managed or verifiable code. It is not necessary to convert COBOL applications to be object oriented or to reuse them under.net. Existing procedural code can be retained and Multiple Run Unit support enables its reuse in the multi-use Web environment. New COBOL code can be created using the productive Visual Studio 2005 environment. COBOL applications can now benefit from a truly contemporary graphical or Web user interface through COBOL WinForm and WebForm support. The combination of Visual Studio integration, managed and verifiable code support, WinForms and WebForm support, SQL and ADO.NET support, as well as the extension of COBOL business logic as Web services truly makes COBOL a First Class Citizen in the world of.net. 2 1

Micro Focus Micro Focus - Unlocking the Value of Legacy Micro Focus is a leading provider of legacy development and deployment software for enterprise platforms. Micro Focus enables organizations to reduce costs and increase agility with minimal risk by reusing their legacy applications with contemporary architectures and Web services. Founded in 1976, Micro Focus is a global company with principal offices in the United Kingdom, United States, Germany and Japan. For more information, visit www. microfocus.com. Micro Focus Worldwide Australia... 1800 632 626 Austria... 0800 293 535 Belgium... 0800 11 282 Canada... 905 824 7397 France... 0800 835 135 Germany... 0800 182 5443 Italy... 800 784 420 Japan... 81 3 5793 8550 Luxembourg... 800 23743 Netherlands... 0800 022 8562 Norway... 47 22 91 07 20 Switzerland... 0800 564 247 United Kingdom... 0800 328 4967 United States... 877 772 4450 Other Countries... 44 1635 32646 2006 Micro Focus. All Rights Reserved. Micro Focus and Net Express are registered trademarks, and Unlocking the Value of Legacy is a trademark of Micro Focus. Other trademarks are the property of their respective owners. WPNXDE1006-US 2 2