1 / 31

COBOL and Distributed Architecture

COBOL and Distributed Architecture. Boris Gilad COBOL Solutions Manager Boris.gilad@ness.com borisg@cobol.co.il. Agenda. Object Oriented COBOL COBOL - Java interaction COBOL and XML COBOL and Web Services COBOL and EJB COBOL.Net Q & A. COBOL and others - then and now.

samira
Télécharger la présentation

COBOL and Distributed Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COBOL and Distributed Architecture Boris Gilad COBOL Solutions Manager Boris.gilad@ness.com borisg@cobol.co.il

  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

  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> <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 = 1Service Add-Record lnk-function = 2 Input lnk-stocknoInput lnk-stockno Output lnk-file-status lnk-text-details lnk-text-detailsOutput lnk-file-status lnk-retail lnk-onhand lnk-sold Service DeleteRecord lnk-function = 3Service Add-Record lnk-function = 2 Input lnk-stocknoOutput lnk-file-status Output lnk-file-statuslnk-stockno lnk-text-details lnk-retail lnk-onhand lnk-sold

  17. EJB Interface Interface Mapping Toolkit (IMTK) COM Non-ES Windows only Deployment Generation 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. Users COBOL programs Server Pool Decode ‘Direct’ COBOL Web services Net Express/Server Express Enterprise Server Insurance Broker application Workload Dispatcher SOAP Listener SOAP/HTTP Generated by Interface Mapping Toolkit No Java footprint on the server

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

  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 C# VB.NET … MSIL (Intermediate Language) Micro Focus Application Server Common Language Runtime Net Express 5.0 Visual Studio 2005 .NET Framework 2.0 Framework Classes ADO.NET Winforms Webforms Win32 COBOL Development COBOL Deployment COBOL Inside the .NET Framework • 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 Data Access RDB ISAM Application Read / Write Disconnected Data Access Application COBOL, C#, VS.NET Program RDB ISAM Download Dataset(s) Upload COBOL, C#, VB.NET Program Connected and Disconnected Data Access • 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-COBOLapplications • 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

More Related