      *
      * @(#)cobmain.cbl	1.0

      $set ans85 mf

      ************************************************************************
      * Copyright (C) 1998-1999 Micro Focus International Ltd.
      * All rights reserved.
      *  
      * This demonstration program is provided for use by users of 
      * Micro Focus products (the "Software") and may be used, 
      * modified and distributed as part of your application provided 
      * that you properly acknowledge the copyright of Micro Focus in this
      * material.
      *     
      * All conditions, warranties and undertakings, express or implied, 
      * statutory or otherwise, on the part of Micro Focus are excluded, 
      * including without limitation those of merchantability or fitness  
      * for purpose. This shall not, however, purport to exclude or 
      * restrict the liability of Micro Focus to any extent not 
      * permitted by law.
      *
      * IN NO EVENT WILL MICRO FOCUS BE LIABLE FOR ANY INDIRECT, 
      * INCIDENTAL, SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT 
      * OF THE USE OF THE DEMONSTRATION PROGRAM DISTRIBUTED WITH THE 
      * SOFTWARE, WHETHER OR NOT INFORMED OF THE POSSIBILITIES OF 
      * DAMAGES IN ADVANCE.  THESE LIMITATIONS APPLY TO ALL CAUSES OF 
      * ACTION, INCLUDING BREACH OF CONTRACT, BREACH OF WARRANTY, STRICT
      * LIABILITY, AND ANY ACTIONS IN TORTS.
      ************************************************************************
      
      ************************************************************
      * 							 *
      * 		    COBMAIN.CBL				 *
      * 							 *
      * 							 *
      * This program is used in conjunction with csub.c to	 *
      * demonstrate the mixed language debugging facilities.	 *
      * 							 *
      ************************************************************
       identification division.
	   program-id. cobmain.
       environment division.
       configuration section.
	   source-computer. ibm-pc.
	   object-computer. ibm-pc.
       special-names.
	   console is crt.
       data division.
       working-storage section.
       01 a	pic s9(8) comp-5.
       01 b	pic x(10).
       01 myptr procedure-pointer.
       01 mybadptr procedure-pointer.
       procedure division.

           set mybadptr to entry "ohhdear"
           set myptr to entry "csub"
           if mybadptr equal myptr
               stop "Unable to load csub"
               stop run
           end-if
           move 1 to a
           move "Hello " to b
           display "a = " a
           display "b = " b
           call "csub1" using a b
           display "a = " a
           display "b = " b
           call "csub2" using a b
           display "a = " a
           display "b = " b
           call "csub3" using a b
           display "a = " a
           display "b = " b
           stop run.
