Previous Topic Next topic Print topic


Demonstrations of .NET COBOL

We provide a number of demonstration programs designed to help you to better understand some of the concepts involved when working with COBOL projects in Visual Studio.

The demonstration programs are installed in subfolders under %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples by default.

You can access the demonstrations with the help of Samples Browser - click Start > All Programs > Micro Focus Enterprise Developer > Samples > Visual COBOL Samples for distributed applications samples, or Start > All Programs > Micro Focus Enterprise Developer > Samples > Mainframe Samples for mainframe code samples .

Note: To start Samples Browser on Windows 8 and Windows Server 2012, go to the Start screen and click the Samples tile.

To view the demonstrations for managed code, select Show managed only from the list in the upper left corner of Samples Browser.

The following demonstrations are supplied:

Azure
Includes demonstrations of how to create COBOL Azure services.
COBOL Book
C# WinBook
Demonstrates how C# can interoperate with managed COBOL. The SmartLinkage functionality enables you to expose COBOL group items as managed types so that other managed languages can interoperate with them.
Sandcastle Integration
Demonstrates how to integrate Microsoft's Sandcastle Help File Builder utility in the Enterprise Developer build process in order to generate a CHM help file from the XML documentation comments in your managed source code. This sample requires more advanced edition of Visual Studio such as Professional, Enterprise or Community Edition. Microsoft's Sandcastle Help File Builder must be installed - download it from the Microsoft Download Center.
WCF Book Service and Client
Demonstrates how to create a WCF service and a COBOL client that accesses the service.

The WCF project types are not available in Microsoft's Visual Studio Shell. To use this sample, you need to use a more advanced of Visual Studio such as Professional, Enterprise or Community Edition.

Web Application Book
A Web Application project which contains a Web form. The form provides a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
Win Book
Shows how to create a Windows form to provide a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
WPF Book
Demonstrates the use of Windows Presentation Foundation (WPF).
COBOL for .NET
Core.Net
Core.NET introduces some of the standard features of the .NET Framework you need to be aware of, and any new COBOL syntax in order to support these features.
All other samples for COBOL for .NET
Each of the demonstrations shows how to use the corresponding COBOL feature within the .NET framework.
Convert ACU and RM to MF
ACU to MF Data Conversion
The solution builds the ACU2MFDataMigration.exe - a utility that converts an ACU Vision indexed file or directory of files to Micro Focus indexed files. You can use executable as delivered, or modify and rebuild the source code as desired.
RM to MF Data Conversion
The solution builds to RMMFDataMigration.exe and RM2MFconvert.dll which enable you to convert an RM/COBOL indexed file or directory of files to Micro Focus indexed files. You can use the executables as delivered, or modify and rebuild the source code as desired.
Games
COBOL Blitz
Demonstrates the use of Windows forms, enumeration types, inheritance, and of sounds and graphics.
COBOLDoKu
Demonstrates Windows Forms using a .NET user control.
COBOL Tic-Tac-Toe
Demonstrates how to use WPF from anEnterprise Developer application.
Help Generation
Sandcastle Integration
Demonstrates how to integrate the Microsoft Sandcastle utility in the build process and generate a CHM help file from the XML documentation comments in your managed source code. Before running this demonstration you must have Sandcastle installed. Download the utility from the Microsoft Download Center.
SQL
SQL (Managed OESQL) - Getting Started
Demonstrates how to use static SQL with OpenESQL under ADO.NET, performing a variety of SQL operations. It also demonstrates the use of different styles of CONNECT statement.
SQL (Managed OESQL) - Connected Demo
Fills a DataSet from a data source, modifies the DataSet and then synchronizes the changes in the DataSet with the data source. The modified contents of the DataSet are displayed in the Output Window. To execute this demonstration, you must first download and install the SQL Server Northwind database from the Microsoft Web site, http://www.microsoft.com. Once there, enter the following search criteria to locate the appropriate download page: northwind pubs database download
SQL (Managed OESQL) - Cursor Demo
Demonstrates how to mix OpenESQL with direct calls to ADO.NET.
SQL (Managed OESQL) - Disconnected Demo
Manipulates offline data in a DataSet. The results of the data manipulation are displayed in the Output Window.
SQL (Managed OESQL) - LOB Demo
Demonstrates how ADO.NET can be used in mixed language projects to insert and select large objects (LOBs). LobDemo shows OpenESQL working with LOB columns in a SQL Server table.
SQL (Managed OESQL) - OrderStatus Demo
Demonstrates how ADO.NET can be used in mixed language projects, and uses COBOL and C#.
SQL (Managed OESQL) - Web Application Book
Includes a COBOL Web Application Project which contains a Web form. The form calls an intermediary program, SqlBookWrapper.cbl, which maps .NET data types onto COBOL data types. The intermediary program then calls the existing COBOL program, sqlbook.cbl, to perform the business logic.
SQL (Managed OESQL) - WPF Book
Includes a Windows Presentation Foundation (WPF) interface written in managed COBOL that interacts with an existing COBOL program. The form calls an intermediary program, SqlBookWrapper.cbl, which maps .NET data types onto COBOL data types. The intermediary program then calls the existing COBOL program, sqlbook.cbl, to perform the business logic.
SQL (DB2 ECM) - Connect Demo
Shows the syntax variants supported by IBM DB2 LUW for connecting to and disconnecting from a DB2 database using Type 1 CONNECTs.
SQL (DB2 ECM) - Dynamic Demo
A simple example of using dynamic SQL with IBM DB2 LUW, performing a variety of SQL operations. If this program was written as a static SQL program, it would have to be broken apart into two programs, since static SQL require the table to already exist or a compile error will result.
SQL (DB2 ECM) - LOB Demo
Illustrates the use of LOB LOCATOR and VALUES functions to retrieve Lob data from DB2 LUW.
SQL (DB2 ECM) - Select Demo
A simple example of using both singleton SELECT and cursor-based FETCH statements with IBM DB2 LUW.
SQL (DB2 ECM) - Whenever Demo
Illustrates the use of EXEC SQL WHENEVER statements for error handling, and using the DB2(MSGAREA) compiler directive to specify a COBOL variable for retrieving error message text larger than the 70 bytes provided in SQLERRMC.
SQLCLR
You need to run the following samples with administrator's rights:
SQLCLR - EmailAddress Type
Shows how to create a Microsoft SQL Server User Defined Type.
SQLCLR - HelloWorld
Shows how to create a simple Microsoft SQL Server stored procedure.
SQLCLR - RecordSet Procedure
Shows how to create a simple Microsoft SQL Server stored procedure that returns a row.
SQLCLR - RegEx User Functions
Shows how to create a simple Microsoft SQL Server stored function and how it can be used to perform field validation.
SQLCLR - TableValue Functions
Shows how to create a Microsoft SQL Server table value function and how it can be used to return multiple rows.
Web Applications
MultiRunUnits
Demonstrates why and how procedural COBOL is compiled and invoked in a multiple user environment. The application is an ASP.NET Web Service and you invoke it through the ASP.NET Development Server.
Web Application Book
A Web Application project which contains a Web form. The form provides a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
Windows Communication Foundation
Note: The WCF project types are not available in Microsoft's Visual Studio Shell. To complete this tutorial, you need to use a more advanced edition of Visual Studio such as Professional, Enterprise or Community Edition.
Syndication Service Library Custom Items
Shows how to create custom syndication feeds using WCF components.
Syndication Service Library Example
Shows how to use WCF components to create a custom syndication feed that uses an existing feed as its data source.
Airport Demo (Managed)
Demonstrates the use of COBOL WCF REST services.
WCF Book Service and Client
Demonstrates how to create a WCF service and a COBOL client that accesses the service.
WCF Read from a File
Shows how to use WCF services.
Web WCF Service
Demonstrates the use of Windows Communication Foundation (WCF) services. To run this demonstration you need to have Microsoft’s Visual Web Developer 2010 installed.
Windows Forms
C# WinBook
Demonstrates how to call COBOL from a C# application.
COBOL Blitz
Demonstrates the use of Windows forms, enumeration types, inheritance, and of sounds and graphics.
COBOLDoKu
Demonstrates Windows Forms using a .NET user control.
LoginFormApplication
This demonstration is a Visual Studio solution containing a login form created from the Login Form template. It contains classes that check whether the entered user name and password are correct.
Samples Browser
Shows a list of the samples installed with your COBOL development system. You can select a sample from the list and view its readme. Click one of the available links to open the sample in Visual Studio, open the directory that stores the sample's files or open its readme.
Win Book
Shows how to create a Windows form to provide a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
Win Hello
Shows how to use Windows Forms to say "Hello World".
Windows Presentation Foundation
COBOL TicTacToe
Demonstrates how to use WPF from anEnterprise Developer application.
Trackball Demo
Demonstrates 3D rendering using WPF components.
WPF Book
Demonstrates the use of Windows Presentation Foundation (WPF).
Uncategorized Samples
Interfacing With Std COBOL
Demonstrates how to use compatible types to interface with standard COBOL, and in particular how to manipulate group items and occurs structures.
Multithreading
Introduces some key aspects of Multithreaded programming using COBOL syntax and the run-time threading APIs.
Platform Invoke
Demonstrates that COBOL can be used to read and write XML documents and shows the use of the treeview and property grid Windows Forms objects.
\Mainframe
\JCL and \CICS
Shows how to create and build Mainframe Subsystem Applications in Visual Studio. You create a MSS-enabled Enterprise Server and configure it for CICS, JCL or IMS support. Then you associate your project with Enterprise Server, deploy the application to the server and debug it in Visual Studio.
\COBOL for .NET
\Core.Net
Core.NET introduces some of the standard features of the .NET Framework you need to be aware of, and any new COBOL syntax in order to support these features.
All other subdirectories under \COBOL for .NET
Each of the demonstrations shows how to use the corresponding COBOL feature within the .NET framework.
\Forms
\CobolDoKu
Demonstrates Windows Forms using a .NET user control.
\BookDemoWebApplication
A Web Application project which contains a Web form. The form provides a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
\BookWrapper
A managed wrapper (written in COBOL .NET), over the Legacy Book library. The WinBook program uses the BookWrapper library to read and write data from the bookfile.dat.
\LegacyBook
A native COBOL library which needs data records from a data (.dat) file.
\LoginFormApplication
This demonstration is a Visual Studio solution containing a login form created from the Login Form template. It contains classes that check whether the entered user name and password are correct.
\WebBook
Shows how to create a Web Forms page to provide a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
\WebHello
Shows how to use Web Forms to say "Hello World".
\Winbook
Shows how to create a Windows form to provide a .NET interface to an existing COBOL program. The BookClass project provides a proxy COBOL program that calls the existing COBOL Book program.
\WinHello
Shows how to use Windows Forms to say "Hello World".
\InterfacingWithStdCOBOL
Demonstrates how to use compatible types to interface with standard COBOL, and in particular how to manipulate group items and occurs structures.
\MultiRunUnits
Demonstrates why and how procedural COBOL is compiled and invoked in a multiple user environment. The application is an ASP.NET Web Service and you invoke it through the ASP.NET Development Server.
\Multithreading
Introduces some key aspects of Multithreaded programming using COBOL syntax and the run-time threading APIs.
\ConnectedDemo
Fills a DataSet from a data source, modifies the DataSet and then synchronizes the changes in the DataSet with the data source. The modified contents of the DataSet are displayed in the Output Window. To execute this demonstration, you must first download and install the SQL Server Northwind database from the Microsoft Web site, http://www.microsoft.com. Once there, enter the following search criteria to locate the appropriate download page: northwind pubs database download
\CursorDemo
Demonstrates how to mix OpenESQL with direct calls to ADO.NET.
\DisconnectedDemo
Manipulates offline data in a DataSet. The results of the data manipulation are displayed in the Output Window.
\LobDemo
Demonstrates how ADO.NET can be used in mixed language projects to insert and select large objects (LOBs). LobDemo shows OpenESQL working with LOB columns in a SQL Server table.
\OrderStatusDemo
Demonstrates how ADO.NET can be used in mixed language projects, and uses COBOL and C#.
\ConnectedDemo
Fills a DataSet from a data source, modifies the DataSet and then synchronizes the changes in the DataSet with the data source. The modified contents of the DataSet are displayed in the Output Window. To execute this demonstration, you must first download and install the SQL Server Northwind database from the Microsoft Web site, http://www.microsoft.com. Once there, enter the following search criteria to locate the appropriate download page: northwind pubs database download
\CursorDemo
Demonstrates how to mix OpenESQL with direct calls to ADO.NET.
\DisconnectedDemo
Manipulates offline data in a DataSet. The results of the data manipulation are displayed in the Output Window.
\LobDemo
Demonstrates how ADO.NET can be used in mixed language projects to insert and select large objects (LOBs). LobDemo shows OpenESQL working with LOB columns in a SQL Server table.
\OrderStatusDemo
Demonstrates how ADO.NET can be used in mixed language projects, and uses COBOL and C#.
\Samples Browser
Shows a list of the samples installed with your COBOL development system. You can select a sample from the list and view its readme. Click one of the available links to open the sample in Visual Studio, open the directory that stores the sample's files or open its readme.
\WCF
Demonstrates the use of Windows Communication Foundation (WCF) services.

The WCF project types are not available in Microsoft's Visual Studio Shell. To use this sample, you need to use a more advanced edition of Visual Studio such as Professional, Enterprise or Community Edition.

Airport Demo (Managed)
Demonstrates how to create a COBOL WCF REST service and then a client application that consumes that service.

The WCF project types are not available in Microsoft's Visual Studio Shell. To use this sample, you need to use a more advanced edition of Visual Studio such as Professional, Enterprise or Community Edition.

\WPF
Demonstrates the use of Windows Presentation Foundation (WPF).
\XMLWinForm
Demonstrates that COBOL can be used to read and write XML documents and demonstrates the use of the treeview and property grid Windows Forms objects.
\pinvoke
Demonstrates that COBOL can be used to read and write XML documents and shows the use of the treeview and property grid Windows Forms objects.
Previous Topic Next topic Print topic