   =========================================================================
                           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
   =========================================================================
                              PROJECT WHENEVER
                              ================

   TABLE OF CONTENTS
   =================
       INTRODUCTION
       SOURCE FILES
       REQUIREMENTS
       OPERATION


   INTRODUCTION
   ============

   WHENEVER illustrates the use of WHENEVER for error handling, and
   using the DB2 directive MSGAREA to specify a COBOL variable for
   retrieving error message text longer than the 70 bytes provided in
   SQLERRMC.

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

   WHENEVER.CBL  (main program)
   SQLCA.CPY

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

   WHENEVER is written to operate with the DB2 SAMPLE database supplied
   with various versions of DB2 Universal Database V5 software products.
   You must have been granted BIND/ADD authority on this database and
   SELECT authority on the STAFF table.

   If you use a copy of the SAMPLE database created by some other
   person, you will need to either create an ALIAS for the STAFF table
   or qualify all references in the example program to specify the
   schema name used to create the SAMPLE database otherwise you will
   get a -204 SQL error compiling the program.


   OPERATION
   =========

   WHENEVER uses the WHENEVER SQLERROR GO TO clause for error handling
   and the WHENEVER NOT FOUND PERFORM clause to test for no row found
   condition.  It executes a invalid DISCONNECT statements in order to
   provoke a SQL error which will be reported by the error procedure.
   The error procedure displays both SQLERRMC and SQL-ERR-MSG, which if
   declared may be used to retrieve more than the 70 bytes of message
   text provided in the SQLCA field SQLERRMC.  The SELECT INTO is
   defined to generate a NO FIND condition which just displays a "Row
   not found" message.


   =========================================================================
   Micro Focus is a registered trademark, and Server Express is a trademark,
   of Micro Focus International Limited. All other trademarks are the 
   property of their respective owners.
   =========================================================================
   Copyright (C) 1999 Micro Focus International Limited. 
   All rights reserved.

