Presentation is loading. Please wait.

Presentation is loading. Please wait.

COBOL and Distributed Architecture

Similar presentations


Presentation on theme: "COBOL and Distributed Architecture"— Presentation transcript:

1 COBOL and Distributed Architecture
Boris Gilad COBOL Solutions Manager

2 Agenda Object Oriented COBOL COBOL - Java interaction COBOL and XML COBOL and Web Services COBOL and EJB COBOL.Net Q & A

3 COBOL and others - then and now
From COBOL To COBOL Past Call Using Linkage Section Call “System” Invoking from command line Present COBOL-RPC COBOL-CGI CORBA OO COBOL COBOL RTS as OO Class Future COBOL XML Consuming WS from COBOL Exposing COBOL as WS Exposing COBOL as EJB .Net

4 Object Oriented COBOL concepts
Objects and Classes Object References Predefined Object References Methods Method Invocation Interfaces Polymorphism Class Inheritance ETC, ETC, ETC

5 Object Oriented COBOL demo program

6 Calling Java from COBOL
Access JDBC Data Sources from COBOL Send messages to Java Objects from COBOL using the Java Domain

7 Calling Procedural COBOL from Java
Access existing COBOL assets from Java using mfcobol.runtime class

8 Calling Object COBOL from Java
Access COBOL objects from Java Programs Wizard generates Java wrapper class

9 Micro Focus COBOL/XML Syntax
Provide a higher level COBOL orientated approach to COBOL/XML Adds significant new syntax to handle XML documents to consume, create, update and XML documents from COBOL Based on familiar approach used with COBOL I/O support Provides both SAX style or DOM style parsing Map to/from XML W3C Compliant Schemas COBOL Record CBL2XML XML Schema

10 Micro Focus Syntax - SELECT
SELECT statement is the foundation Just like COBOL File I/O SELECT xml-bookdb ASSIGN "c:bookrw.xml“ ORGANIZATION IS xml DOCUMENT-TYPE IS "bookdb.xsd" FILE STATUS IS xml-bookdb-status.

11 Micro Focus Syntax - XD XD stucture - the association between XML and COBOL records xd xml-bookdb. 01 xml-bookdb-query identified by "query“. 03 xml-book occurs 3 identified by “book”. 05 xml-bq-author pic x(40) identified by "author". 05 xml-bq-title pic x(40) identified by "title". represents an XML document that has structure: <query> <book> <author>Author Name</author> <title>Book Title</title> </book> </query>

12 Micro Focus Syntax – Basic Verbs
OPEN {input|output|i-o} file-name surprise, surprise, surprise READ file-name Read entire XML document WRITE file-record Write entire XML document CLOSE file-name more surprises…

13 COBOL XML Demo

14 What is Service? What Service do I provide? What Input do I receive?
What Output do I return? Where to find me?

15 COBOL Program as Service
linkage section. 01 lnk-function pic x. 88 read-record value "1". 88 add-record value "2". 88 delete-record value "3". 88 next-record value "4". 01 lnk-file-status pic xx. 01 lnk-details. 03 lnk-text-details. 05 lnk-title pic x(50). 05 lnk-type pic x(20). 05 lnk-author pic x(50). 03 lnk-stockno pic x(4). 03 lnk-retail pic 99v99. 03 lnk-onhand pic 9(5). 03 lnk-sold pic 9(5) comp-3.

16 COBOL Program as Service
Service Read_Record lnk-function = Service Add-Record lnk-function = 2 Input lnk-stockno Input lnk-stockno Output lnk-file-status lnk-text-details lnk-text-details Output lnk-file-status lnk-retail lnk-onhand lnk-sold Service DeleteRecord lnk-function = Service Add-Record lnk-function = 2 Input lnk-stockno Output lnk-file-status Output lnk-file-status lnk-stockno lnk-text-details

17 Interface Mapping Toolkit (IMTK)
COM Non-ES Windows only Generation Deployment EJB Interface Java Application Server Web Services COBOL Interface (Linkage Section) Enterprise Server Test Client

18 Direct COBOL Web Services
The ability to Create, Consume and Deploy COBOL Web services without requiring any 3rd Party Software Create New tool in Net Express 4.0 called the Interface Mapping Toolkit builds a Web service from an existing COBOL Interface Consume COBOL can access a Web service built not only with Net Express but say .NET or IBM WebSphere Deploy Direct COBOL Web services can be deployed with Enterprise Server Complete COBOL Web services Solution

19 ‘Direct’ COBOL Web services
Net Express/Server Express Enterprise Server Users COBOL programs Decode Insurance Broker application SOAP/HTTP SOAP Listener Workload Dispatcher Server Pool Generated by Interface Mapping Toolkit No Java footprint on the server

20 Mapping COBOL Programs as EJB
Interface Mapper IDT COBOL Program Map. XML EJB, JSP and Servlet Generator Checker INT Data Dict. XML EJB Classes JSP Servlet Classes

21 Enterprise Server – Transaction Processing
Enterprise Server defines a COBOL Container for UOW transaction execution Follows the ‘Container Managed Transaction’ model No explicit syntax required Transaction characteristics defined when deployed Web services transactions are single-phase stateless transactions Supports Micro Focus ISAM and ‘leading’ RDBMS Acts as a resource manager to J2EE XA transaction protocols

22 COBOL Inside the .NET Framework
Net Express 5.0 Visual Studio 2005 COBOL C# VB.NET MSIL (Intermediate Language) .NET Framework 2.0 Framework Classes ADO.NET Winforms Webforms Win32 COBOL Development COBOL Deployment Common Language Runtime Application Server Micro Focus COBOL – an equal player in .NET COBOL generates IL as other Microsoft languages COBOL is deployed inside the .NET Framework under the CLR COBOL gains access to Framework classes and functionality

23 Visual Studio 2005 Integration
Colorization in COBOL editor distinguishes reserved words, data names, comments, etc. Intellisense lists method-name choices Productive COBOL Development and extension with Visual Studio Develop composite .NET COBOL/C#/VB.NET applications using same IDE Access .NET Framework from COBOL COBOL compiles to managed or verifiable code Solution contains multiple projects, one for each programming language involved. This solution involves COBOL and C#

24 .NET WinForms and WebForms in COBOL
Win Form painter with Properties dialog box COBOL code is created to support the Win Form. Use Visual Studio Painter to create and maintain windows forms and web pages to interact with existing COBOL programs Win Form with data during program execution. Solution Explorer shows entire web site Web Form screen designer Toolbox for adding controls to Web form COBOL code behind the Web form Web Form with data during execution

25 Create, Reuse and Extend
Reuse existing COBOL Business logic in .NET Use Procedural or Object Oriented COBOL under .NET Extend COBOL applications to utilize .NET functionality - Access to .NET Framework Classes program-id. ShowMessageBox as "ShowMessageBox". environment division. configuration section. repository. class Message-Box as "System.Windows.Forms.MessageBox". data division. working-storage section. procedure division. invoke Message-Box "Show" using "Hello COBOL World". end program ShowMessageBox.

26 Connected and Disconnected Data Access
Application Read / Write RDB ISAM Connected Data Access Disconnected Data Access COBOL, C#, VS.NET Program COBOL, C#, VB.NET Program Dataset(s) Download Upload ADO.NET provides for Connected and Disconnected data access Disconnected data access liberates SQL application from a continual connection to a database Enhance the performance of web and other applications Share data across composite applications Make ISAM and other data available to non-COBOL applications Export data to XML

27 Expose COBOL as Web Services
Use Visual Studio .NET to create and extend COBOL applications CLASS-ID. Stock INHERITS WEBSERVICE. REPOSITORY. CLASS WEBSERVICE AS "System.Web.Services.WebService" CLASS WEBMETHOD AS "System.Web.Services.WebMethodAttribute". OBJECT. PROCEDURE DIVISION. METHOD-ID. StockQuote CUSTOM-ATTRIBUTE IS WEBMETHOD. Microsoft IIS ASP.NET COBOL COBOL Application

28 COBOL.Net demo program

29 Summary ?????????????? ????? ???????????? ????????????????????? ?????????????? ?????????????

30 Q&A

31 VIVA COBOL ! Thank You


Download ppt "COBOL and Distributed Architecture"

Similar presentations


Ads by Google