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

                                  DIALOG DEMO
                                  ===========


   TABLE OF CONTENTS

   =================

   INTRODUCTION
     Section 1: The Application Program Interface
     Section 2: Running the Program with the Trap 
     Section 3: Case Sensitivity in Screensets 
     Section 4: Using Different Screensets 
   SOURCE FILES

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

   This demo consists of four sections, please read through the text below
   to use the demo.

   Section 1: The Application Program Interface
   --------------------------------------------
   
   In this tutorial you will see a simple update program interfacing to a
   screenset. This and the next three tutorials use the same program with
   four different screensets. The screensets will behave in very different
   ways, but the underlying program in each case is identical. 

   The files you need for this tutorial are: 

   CUSTOMER.S1
   CUSTOMER.CBL
   DS-CNTRL.MF
   CUSTOMER.CPB 
   CUSTOMER.ERR 

   1. Generate the file CUSTOMER.CPB. Go into the definition software and
   load the screenset CUSTOMER.S1. 

   2. Select F5=generate, then press Enter. 

   3. Press F2 to generate the data descriptions. 

   This generates the CUSTOMER.CPB file for you. You can set various
   defaults for this generation, which are described in the Dialog System
   Character Mode User Guide chapter "Generating the Copyfile".
   Do not worry about them here. 

   The program CUSTOMER.CBL updates an indexed customer file. 

   4. CUSTOMER.CPB is also supplied in the demo directory.

   5. Look at the Data Block in the screenset. You can see that, apart from
   the obvious fields, there are some fields which appear to be used as flags.
   If you look at the PROGRAM-BODY SECTION in the program listing,
   you can see how the program acts on these flags. You can see a SETF
   function (SET Flag) in the dialog. Its effect is to put the value 1
   into the field defined in the parameter. 

   Apart from the SETF function, you can see the RETC function
   (RETurn to Calling program). If you look at the first line in the dialog
   you can see that the F2 key causes the LOAD-FLG to be set. 

   6. Save this screenset as CUSTOMER.S and run the screenset through the
   trap. Observe its behavior. 

   The CUSTOMER.CPB program requires a screenset called CUSTOMER.S,
   which is why you saved the screenset with that name. 

   You now need to compile your program to test it running.

   7. Compile CUSTOMER.CBL using cob.

   8. Animate this program and spend some time observing its behavior
   until you are fully familiar with all the features of the program. 


   Section 2: Running the Program with the Trap
   --------------------------------------------

   In this tutorial you will learn more about the behavior of a screenset
   and its relation to the calling program. You will also learn how to run
   a program through the trap. 

   The files you need for this tutorial are: 

   CUSTOMER.S2
   CUSTOMER.CBL
   DS-CNTRL.MF
   CUSTOMER.CPB
   CUSTOMER.ERR 

   The program is the same program that you have just used, but the
   screenset CUSTOMER.S2 is different. Before the program can use this new
   screenset, you must load it and save it as CUSTOMER.S. 

   1.Look at the local dialog in each of the panels. 

   Look especially at the dialog in the panel "MENU-SCR". This panel
   contains a fixed text group that is used as a menu. The menu items can
   be selected either by typing a key letter or using the selection bar
   and pressing Enter. 

   2.Run this screenset with trace until you fully understand its behavior,
   and then run the program. 

   It might be useful to run the program and the trap at the same time.
   You can do this using the following steps. 

   3.Edit the program CUSTOMER.CBL to change the line: 
          78  DIALOG-SYSTEM     VALUE "DSRUN".

      to: 

          78  DIALOG-SYSTEM     VALUE "DS".

   4. Compile CUSTOMER.CBL using cob.

   5. Run the program CUSTOMER.int. 

   The program is now calling the trap. This enables you to have all the
   trap functions except for two; you cannot change the screenset name and
   you cannot change the control field. It is probably important here
   for you to consider how this facility will help you in developing your
   applications. 

   6. Edit the program CUSTOMER.CBL to change the line back to its
   original form. 

   7. Compile CUSTOMER.CBL using cob again ready for the next section.


   Section 3: Case Sensitivity in Screensets
   -----------------------------------------

   In this tutorial you will learn more about the behavior of a screenset
   and its relation with the calling program. 

   The files you need for this tutorial are: 

   CUSTOMER.S3
   CUSTOMER.CBL
   DS-CNTRL.MF
   CUSTOMER.CPB
   CUSTOMER.ERR 

   The program is the same program that you have just used, but the
   screenset CUSTOMER.S3 is different. Before the program can use this new
   screenset, you must load it and save it as CUSTOMER.S. 

   1. Look at the local dialog in each of the panels. 

   2. Run this screenset with trace until you fully understand its
   behavior, and then run the program. 

   You can see that you are now forced to enter upper case values into the
   customer code. This is because case sensitivity off was selected when
   the field was placed on the panel. Also you cannot access any
   customer records whose key contains lower case letters. This
   illustrates why you must decide in advance whether you wish to force
   upper case on keys. 


   Section 4: Using Different Screensets
   -------------------------------------

   In this tutorial you will learn more about the behavior of a screenset
   and its relation with the calling program. 

   The files you need for this tutorial are: 

   CUSTOMER.S4
   CUSTOMER.S5
   CUSTOMER.CBL
   DS-CNTRL.MF
   CUSTOMER.CPB
   CUSTOMER.ERR 

   Just like the other examples, load the screensets and run them through
   the trap before you run the program.  Save the screenset to use as
   CUSTOMER.S so you can use it with the program CUSTOMER.CBP. 

   In CUSTOMER.S4, the screenset shows the menu permanently and switches
   between menu and input screen using the F10 key. 

   The screenset CUSTOMER.S5 is included as an example of a user interface
   still using the same CUSTOMER program and created by the action bar and
   pulldown generation facility included with Dialog System. 


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

   CUSTOMER.CBL
   CUSTOMER.CPB
   CUSTOMER.ERR
   CUSTOMER.S
   CUSTOMER.S1
   CUSTOMER.S2
   CUSTOMER.S3
   CUSTOMER.S4
   CUSTOMER.S5
   DSDEMO.ERR
   DSDEMO1.S
   DSDEMO2.S
   DSDEMO3.S
   DSDEMO4.S
   DSDEMO5.CBL
   DSDEMO5.FLE
   DSDEMO5.S
   DSDEMO7.S
   DSDEMO8.S
   Q.ERR
   Q1.S
   Q2.S
   Q3.S
   Q4.S
   Q5.S
   Q6.S
   Q7.S
   Q8.S
   Q9.S

   The files in the Source Files list named Q1.S, Q2.S etc, are demonstration
   screensets that illustrate the responses to the numbered questions in
   chapter 17 of the User Guide; Common Questions and Answers.

   The files in the Source Files list named DSDEMO* are a collection of
   screensets for perusal and running under the TRAP, to demonstrate a variety
   of techniques.

   The files DSDEMO5.* form a complete application which you can compile &
   animate. There is guidance text in the sourcefile DSDEMO5.CBL.


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


