
   =========================================================================
                        M I C R O   F O C U S

                   S E R V E R   E X P R E S S  5.0
   =========================================================================
                              SORT DEMO
                              =========

   TABLE OF CONTENTS
   =================
       DESCRIPTION
       SOURCE FILES
       REQUIREMENTS
       HOW TO COMPILE AND RUN THIS DEMO
       WHAT THIS DEMO DOES


   DESCRIPTION
   ===========

   This demo shows:

   o How to write a simple COBOL Java object

   o How to call Object COBOL methods using Java

   o How to call Java methods using Object COBOL

   o How to deal with Java objects as parameters and as return values


   SOURCE FILES
   ============

   SortDemo.cbl		- Object COBOL class
   Compare.java		- Java comparison interface
   SortClient.java	- Java client
   SortDemo.java	- Java class


   REQUIREMENTS
   ============

   Set up the COBOL and Java environments as described in Chapter 1
   of your Distributed Computing book.


   HOW TO COMPILE AND RUN THIS DEMO
   ================================

   1. A script is provided that compiles all the programs. To invoke
      the script, enter:

      sh ./build.sh

   2. Enter:

      cobjrun SortClient


   WHAT THIS DEMO DOES
   ===================

   The demo sorts collections of numbers and strings into ascending
   numerical or character values, and displays the output. To do this, the
   COBOL class implements two methods, "sort" and "merge", which in turn
   use two simple Java comparison classes for numbers and strings.

   The "sort" method takes a Java vector object and a Java comparison 
   object with which to aid sorting. It splits the vector into two new
   vector objects each containing half of the contents of the original,
   invokes the "merge" method with these, and returns the result. 

   The "merge" method sorts each vector (recursively, using the "sort" 
   method and the comparison object) and returns a new vector which
   is the combination of the two sorted vectors in sorted order.
  

   =========================================================================
   Micro Focus is a registered trademark, and Server Express is a trademark,
   of Micro Focus International Limited. 
   =========================================================================
   Copyright (C) 1996-2000 Micro Focus International Limited. 
   All rights reserved.

