Demonstrations of Native COBOL

We supply a number of demonstration programs to help you 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\Visual COBOL\Samples by default.

You can access the demonstrations with the help of the Visual COBOL Samples Browser for distributed application samples. See To start the Samples Browser for access instructions.

The following categories of demonstrations of native code are available:

CGI
Simple CGI application
Demonstrates how to use native COBOL to create CGI programs which accept data from a form on a Web page and then redisplay that data in another Web page.
Complex CGI application
Demonstrates how to use native COBOL to create CGI programs which accept data from a form on a Web page and then redisplay that data in another Web page.
COBOL
Airport Demo (Native)
Demonstrates how to use a procedural console application to access the functionality defined in a legacy COBOL program.
Preprocessor
Shows a basic preprocessor and how to debug it.
Tictac
Demonstrates how use procedural COBOL.
Data File Tools
Demonstrates how to use procedural COBOL with some record layout definitions.
Games
COBOL Minesweeper
Demonstrates how to create a random generator in native COBOL and how to use advanced console operations such as capturing mouse events in the console.
COBOL Snake
Demonstrates how to create a random generator in native COBOL, dynamic memory allocation and advanced console operations.
MFUnit Testing framework
Demonstrate the capabilities of the Micro Focus Unit Testing framework.
SQL
SQL (Native OESQL) - Getting Started
Demonstrates how to use static SQL with OpenESQL, performing a variety of SQL operations. It also demonstrates the use of different styles of CONNECT statement.
SQL (Native OESQL) - Behavior Demo
Illustrates the use of OpenESQL compiler directives to assist in migrating database applications from the mainframe. The use of the SQL(TRACELEVEL) compiler directive creates an OpenESQL trace file, OpenESQL.processID.log, within the project directory.
SQL (Native OESQL) - Catalog Demo
Displays information about all the data types supported by the data source, a list of all tables in the data dictionary, and information about columns in the table 'orders'.
SQL (Native OESQL) - Connect Demo
A simple example of using static SQL with OpenESQL, performing a variety of SQL operations.
SQL (Native OESQL) - Dynamic Demo
A simple example of using dynamic SQL with OpenESQL, performing a variety of SQL operations. It is functionally equivalent to the code used by the Static sample.
SQL (Native OESQL) - Select Demo
A simple example of using both singleton SELECT and cursor-based FETCH statements with OpenESQL.
SQL (Native OESQL) - Whenever Demo
Illustrates how to use EXEC SQL WHENEVER syntax with error handling. It also uses the MFSQLMESSAGETEXT variable for retrieving errors messages longer than the 70 bytes available within the SQLERRMC field.
Trace
Consolidated Trace Framework - C
Shows how to use the Consolidated Tracing Facility with C.
Consolidated Trace Framework - COBOL
Shows how to use the Consolidated Tracing Facility with COBOL.
XML Extensions and Xcentrisity
Xcentrisity Tutorial
Includes a set of examples that demonstrate the use of XML Extensions and of the Business Information Server product.
XML Extensions Example
Demonstrates some of the capabilities of XML Extensions.