
INTRODUCTION
____________


This README file is intended to give the user an overview of how to install and
use the CELDIAL sample code.  The code is a further development of the original
SUNDIAL demo code, so familiarity with that demo will be an asset in setting up
and running this demo.


******** IMPORTANT NOTE ********
This demonstration should be installed on a disk that has been formatted using 
the HPFS File System.  If it is installed on a FAT system, you will experience 
problems with the long filenames used for the customer files.  

There is a problem which is being raised as an APAR, in that if your system is
set up with a FTB1TEMP directory defined in the CONFIG.SYS, then the Drag/Drop
used in this application will not work.  The symptom of this error is an FTB7004
error at line 229.
**********************************




FILES
_____


There are four files associated with the source of this demo, CELDIAL.PGM
CELDIAL.WIN CELDIAL.MAK and MESSSAGE.WIN.  They are compiled from the make file
to produce the running application.  In addition to these files, there is a
control file called CUSTOM.TAB which is a Visualizer table with the following
column structure.

Column 1 Seq
A key column for the table.  Not used in the application.

Column 2 MyQual
This contains the qualifier (database owner ID) for the tables.

Column 3 MyDB
This contains the name of the database containing the tables.

Column 4 ShowSQL
This contains a flag which when set to YES will display the generated SQL.

Column 5 MyBit
This has several values in it.  1 is the full path in which the application is
installed, 2 is the name of the bitmap which appears in the right hand side of
the application initially, 3 to 6 contains the names of the bitmaps which appear
on the pushbuttons.

Column 6 Audio
This column can be used to initiate an audio response to a selection containing
no orders.  This will only work if OS/2 MMPM is installed.  Set this field to
YES to enable audio, or NO to disable it.

Other files used in the application are the compiled application itself
(CELDIAL.APN) and also the bitmap (.BMP) files indicated in the CUSTOM.TAB
above.  If the audio feedback is used, then an MMPM wave file (NOORDER.WAV) will
also be needed in the same directory.




INSTALLATION
____________


All the files, with the exception of the source files must be installed into the
same directory.  The source may be held separately if required.  In addition,
please ensure that the following lines are not contained in your CONFIG.SYS, as
they will affect the creation and display of metafiles.

   RUN=C:\OS2\EPW.EXE
   RUN=C:\OS2\EPWROUT.EXE -1

These lines are usually added when DB2/2 or Comunications Manager/2 is
installed.  If they are required, they may be placed in the STARTUP.CMD file.




DATABASE
________


This demonstration uses the SWS CELDIAL database.  If this database is not
installed, then it may be obtained by issuing the following VM command

   TOOLS SENDTO USDIST MKTTOOLS MKTTOOLS GET CELDATA PACKAGE *

Alternatively, a subset of this database may be installed by importing the IXF
files supplied in the IXF subdirectory.

          IXF File            Database File
      ------------       -------------
      CUSTOMER.IXF       CUSTOMER
      ORDER_SU.IXF       ORDER_SUMMARY
      ORDER_DE.IXF       ORDER_DETAIL
      AR_HIST.IXF         AR_HISTORY




CUSTOMER FILES
______________


There are a number of customer files required to run this demo, a few are
supplied with this code, but more may be added at any time.  The structure of
these files are as follows.

The file name can be anything you like, as can the icon, but the file must be a
plain text file.  (Can be created by using the OS/2 E editor.)

In the file itself, the first line must be the name of one of the customers in
the CUSTOMER table.  In fact the query generated uses the SQL LIKE function, so
a close match will suffice, ie it could be DANTON for DANTON INDUSTRIES.

Additional text may be added from line 3. This text will appear in the window in
the application.

The CUSTOMER files are supplied in the CUSTOMER directory together with an 
installation .CMD file called CUSTINST.CMD.  Switch to the A:\CELDIAL\CUSTOMER 
directory and run the command file.  It will ask you for a location in which to 
install the customer files.  It will create the directory if necessary, copy the 
the files and rename them as appropriate.  

To run the demonstration, it is recommended that the Customer folder and 
CELDIAL.APN file is shadowed onto the Desktop.




RUNNING THE APPLICATION
_______________________


Start up the CELDIAL.APN and also open a folder with customer files in it.  Drag
a customer file from the folder and drop it onto the application window.  The
name of the customer should appear in the left hand side of the application, and
the details from line 3 onwards of the customer file should replace the logo in
the right hand side of the application window.  This shows access to local data,
which can be personalised as required by the end user.

Pressing the SUMMARY button will start a query against the database tables,
doing a three table join to find the total number of outstanding orders for this
customer, and also the total value of all these orders.  If there are no
outstanding orders for the customer, then a message will indicate this, and in
addition, if the audio feature is enabled, the NOORDER.WAV file will be played.

If there are orders for this customer, then the HISTORY button will be enabled,
and depressing this will generate another query to the database, which will
produce a chart in the right hand side of the application window showing the
30,60, and 90 day outstanding balance for this customer.

Pressing the MAIL button will bring up a pseudo mail window, allowing a message
to be entered into it.  Pressing the SEND button on this window will synthesise
sending an E-mail message.  In reality this could be enabled for any VIM mail
system.

After the chart is created, the image of the chart is automatically put into a
DDE link which can then be used by any other application (e.g.  Describe word
processor) which supports Paste/Link.



