              +-----------------------------------------+
              |             EasyLet Demo                |
              +-----------------------------------------+

This an example of how EasyLet code can be used to create a
letter and then merge it with specific information in a database.


1. Create a standard letter head, DENTAL.HDR


[.// letter head for JAWS, Inc.
        The reason to put the header in a separate file is to let all
        company letters to use the same header. In case of address or
        phone number change, all you need is to change one file.
.]

[.!linech("=").]
[.!lrjust("JAWS, Inc.","").]
[.!lrjust("1180 Spring Centre South Blvd", "").]
[.!lrjust("Suite 211", "Tel.    (407) 774-7734").]
[.!lrjust("Altamonte Springs, FL 32714", "Fax.    (407) 774-6750").]
[.!linech("=").][..][.lf1.]
[.exit.]


2. Create an address block that calls fields from your data
  base.    ADDR.BLK

[.?trim(field->firstname)+" "+field->lastname.][..]
[.?field->address.][..]
[.?citystzip(field->city,field->state,field->zip).][..]


3. Create the text of the letter and add the header and address
   blocks.

[.LM 5.][.RM 70.]
[.INCLUDE dental.hdr.][.lf2.]
[.JUSTR.]Account :[.?field->account.][..]
[.JUSTL.][.TDATE.][.LF.]
[.INCLUDE addr.blk.][.LF2.]
Dear [.?trim(field->firstname).]:[.lf1.]
We are writing to call your attention to a past-due bill you may
have ovelooked. Your account shows a balance due of
$[.?field->balan_due.] for dental work done on [.?field->date.].
[.lf.]
A self-addressed envelope is enclosed for your convenience. We
have been happy to serve you.[.lf2.]
[.text
Sincerely,

David P. Sanders, D.D.S.
.]
[.ff.]
[.exit.]

4. Create the task to do the merge and generate the
  letters.  BALANCE.TSK

[.LM 5.][.RM 70.]
[.!dbuse("datafile.dbf").] [.// use this database .]
[.DBSCAN field->balan_due > 0.][.// check for any record that has
                                    a balance due.
                               .]
[.process balance.let .]
[.ENDSCAN.]
[.!dbclose().]
[.EXIT.]


