
<<C3Batch Template>>

<General Information>
General Information

The "C3Batch" template generates a procedure which will loop
through a file and perform an operation on each record. This
template  is designed to allow changing or deleting a  group
of  records  with no hand coding.  However, there  are  many
embedded  source code points to give the programmer  maximum
flexibility.

<C3Batch Procedure Properties>
C3Batch Procedure Properties

<C3 Additional Functionality in Batches>
C3 Additional Functionality in Batches

The  major  additions  for batches in C3  templates  is  the
ability to batch process on tagged records, use an abort key
to exit the C3Batch, and the ability to optimize batches  on
tagged records.

CAUTION:  It  is a very good idea to make a backup  copy  of
your data files before running a batch Change or Delete  and
NEVER  test  these  procedures on live  data  without  first
making a backup.

<Formatter Support>
 Formatter Support

The  Screen Formatter contains a default screen design  con-
taining  two display fields, and Ok and Cancel buttons.  The
Pulldown  Menu Formatter and Report Formatter are  not  sup-
ported.

<C3Batch Processing, Break HotKey>
C3Batch PROCESSING, BREAK HOTKEY

Allow break hot key in C3Batch processing.

Another  little problem solver is the ability to  include  a
break hot key on C3Batch processing.  This gives the  opera-
tor  a clean 'out' if C3Batch processing was  started  inad-
vertently or the process is taking longer than he though.

The  inclusion of this is a simple check box in  the  proce-
dures property screen of the C3Batch template.  The checking
of  this box merely includes the code that will allow a  hot
key  to interrupt the C3Batch process.  You need to  include
the equate of the hot key which you are using.  And it is  a
good Idea to modify the screen to reflect the hot key.

Implementation:  Set up the keycode equate in  the  C3Equate
section  of the Source button on the  procedures  properties
screen.   In the  final product  during the  execution of a
C3Batch process the operate can terminate the C3Batch process
immediately with the press of a hot-key.

<Processing Tagged Records During C3Batch Operations>
Processing Tagged Records During C3Batch Operations

<Passing of Key Settings or Filters>
Passing of Key Settings or Filters

The  following file formats allows creating files  that  are
not  really files. These files are never opened and have  no
keys,  even  if you declare them. The entire record  can  be
accessed  using  the PRE:record field.  These  files  enable
passing  filters,  key ranges and or key  values  between  a
browse  and  either reports and or batches. Passing  can  be
disabled  in individual procedures by checking  the  Disable
Glb Filters check box on the C3Report or C3Batch template
properties  screen. If this box is not checked, any  time  a
global filter is in effect a C3Report or browse is called  a
screen  will  appear asking if the user wants to  print  the
full list or the limited list. Done completely in the  back-
ground for BUTTONFILTERS and BUTTONRANGES.

<GD-Filters   pre gdf: >
GD-Filters    pre gdf:

Enables passing of global filters. When declaring the key
in the GD-FILTER file that will relate to the data file(s)
the key(s) should have the same name as the file(s) it
relates to. You only need to change the name of the key in
the dictionary. It is also required that the browse where
the filters are set has the GD-FILTER file set up in the
procedure properties file schematic. Please note the
following structures assume all files 1 thru 3 are related
to GD-Filter.

      File1
      File2
      File3
      GD-Filter

This will have filters on files 1 & 2
      File Schematic
      File1
      GD-Filter *
      File2
        GD-Filter *  * note the GD-Filter must be the first
        File3          file related to the data file(s)
                         in the file schematic

This structure must appear in both the BROWSE and the BATCH
or REPORT that filters are to be passed between. Also note
the following preferences. When using a report that has both
tags and global filters active.  Tags will superceed global
filters for printing or not printing. Tags will not superceed
global key ranges or key equal, the tags will work within the
key limits.

<GD-KeyRange  pre gdr:  >
GD-KeyRange   pre gdr:

Enables the passing of key ranges. Declare  2  fields  for each
range. The low  value  must  be declared above the high value.
And the low value must relate to the field it relates to in the
file.

< GD-KeyEqual   pre gde: >
GD-KeyEqual pre gde:

Enables passing of key values. Tags are handled automatically.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

C3FilterAnd   Filter on multiple field in secondary browse
GLBPAS        Trigger prompt during global pass of filters
GLBTAG        Trigger prompt during global pass of tags
KeyEqual      View records based on several key fields
KeyRange      View records based on range of key values
RelFill       Set/Override a parent child related value


See Formula Class section for detailed explaination of each
formula class.

<<C3Browse Template>>

C3Browse Template is the flagship of the C3 Template system.
The first thing  you should know  is that this template is a
multi-use template as it can be used as a select,  validate,
or  browse.  This means that you can create one  browse  and
use it in may different ways.  The appropriate buttons  will
be disabled based on use.

The  C3Browse  is based on an enhanced browse  system  which
facilitates things like automatic lookups, multiple  browses
on a screen, tagging and flagging.

The  goal in C3 templates is that you should never  have  to
define  a lookup.  All you need to do is create a  relation-
ship  in the Dictionary between the two fields and the  tem-
plates take care of the rest.  The way the a field is deter-
mined  to be a lookup field is the presence of a  C3  Browse
procedure  in  the fields Procedure (When Selected  or  When
Completed) call area.

IMPORTANT CHANGE:  Even though the C3Browse type  procedures
have  not  changed in appearance, you can take the  tag  and
flag buttons off of the screen and use pull down menu  based
tagging  and flagging.  The C3 Browse type templates are  no
longer  dependent on these buttons to implement tagging  and
flagging.

<Browse Basics>
Browse Basics

The "Browse" template uses a "List box" to display a  scrol-
lable list of records.  The default Browse screen has "Add",
"Change"  and "Delete" push buttons which call  an  "Update"
procedure  to  allow  users to update a  data  file,  and  a
"Select" button to allow users to "Select" a record from the
list.   The  "Select"  button is dimmed  unless  the  Browse
procedure is called as a "lookup" from an entry field.

<    C3  Browse Description>
C3 Browse Description

The Browse features of C3 templates differ considerably from
those of basic Clarion templates.  A good example is the way
lookups are performed.

The  Browse screen has been modified immensely, it  includes
all of the buttons for tagging and flagging.  If you do  not
include  all of the code necessary for tagging and  flagging
you  will get error messages, UNLESS, you remove one  single
button.   That  is  the [Tag] button.  If  you  delete  this
button then it will compile just fine.  Later if you  decide
to  implement tagging, or have a phased implementation  plan
in  mind,  leave the rest of the buttons on the  screen  and
they will be disabled, thus later all you will need to do is
add the [Tag] button back.

The  goal in C3 templates is that you should never  have  to
define  a lookup.  All you need to do is create a  relation-
ship  in the Dictionary between the two fields and the  tem-
plates take care of the rest.  The way the a field is deter-
mined  to be a lookup field is the presence of a  C3  Browse
procedure  in  the fields Procedure (When Selected  or  When
Completed) call area.

<    C3 Specific Browse Functions>
Specific Browse Functions

These  Features  apply to all browses and  embedded  browses
under the C3 Template System.  This is due to the change  of
the browse 'engine' which clarion employs. C3 templates by
default warns the user that no records exist for a browse
screen and prompts the user as to the action he wishes to
take.  This is known as the browse warning screen.

The  Browse engine on C3 Templates allows the  developer  to
add  list  boxes  (embedded browses) to  any  screen.   This
allows for the creation of lists of lists, and it allows for
single screens to perform multiple inputting.

The  addition  of  line entry using  the  C3Form21  template
further  enhances the functionality of what appears  to  the
user as a single screen.

<    C3Browse Procedure Properties>
C3Browse Procedure Properties

<Range Limit Field >
Range Limit Field

Name a KEY field used to "limit" the records shown in the List
box.  The field must be a component of the Browse "Access Key".
Records are included in the Browse if they have a KEY value
which matches the value of this field.

<C3 Range Value Field:>
C3 Range Value Field:

The  major modification to the range value field is that  it
will  now  accept constants.  This saves a lot of  time  not
having to create a local variable and initializing it with a
value.

  Range Value Field :   If you name a field here, then
                       records are included in the Browse
                       if the "Range Limit" field contains
                       a value EQUAL to the "Range Value"
                       field.

<Record Filter>
Record Filter:

Enter  a valid Clarion language expression.  Record  filters
are  used to Browse a subset of the data file.  Each  record
from the data file will be evaluated against this expression
for inclusion in this list.

   GO TO TOPICS AND LOOK FOR THE SECTION ON BUTTON
   FILTERS AND BUTTONRANGES FOR MORE OPTIONS WITH
   C3 TEMPLATES ON LIMITING DISPLAY RECORDS.

<Locator Field>
Locator Field

A  Locator field is used to position the highlight bar to  a
particular  section  of  the data file.  Name  a  KEY  field
component  of  the Browse "Access Key".  The  Locator  field
should  be  placed on the Browse Screen as  an  Entry  field
AFTER  the  List box.  The closest match to  this  field  is
found after the user hits the TAB key.

*If  your Locator field is a Numeric field, you  should  add
the 'B'; to blank if zero, to the picture token.

<Incremental Locator >
Incremental Locator

Check  this box if you want the "Locator field" to be  acti-
vated  each time the user enters a keystroke.   The  Locator
remains active while the List box is selected. The "Locator"
field MUST be placed AFTER the List box in Field List.   Any
user  inputs are used to immediately seek the closest  match
in  the data file, and reposition the highlight bar  in  the
List box. If your Locator field is a Numeric field, you should
add the 'B'; to blank if zero, to the picture token.

<Update Procedure >
Update Procedure

Name  a  procedure  that is called when the  user  hits  the
"Add", "Change", or "Delete" push buttons.

<Enable Hot Records  >
Enable Hot Records

Check  this box if you want the Browse procedure  to  reread
the data file record every time the highlight bar is  moved.
Use  this option if you place data fields outside  the  List
box.   For example you could use this option if you want  to
display a MEMO field for the highlighted record.

You  can also use this option if you are using a  Hotkey  or
Push  button to call another procedure, that acts  upon  the
highlighted record. HotRecords  Must be enabled to use reverse
the  order function.

<Disable Memo Access >
Disable Memo Access

Check this box if the data file has a Memo field, and you are
not displaying the Memo on the Browse screen.  This improves
performance when scrolling the List box.

<C3  Disable Glb Hotkeys >
C3  Disable Glb Hotkeys

If  you do not wish the global hot keys you have defined  to
be available from this screen, just select this feature box.

<C3  Retain Tags on Exit >
C3  Retain Tags on Exit :

If  you want to retain the tags selected in  this  procedure
for another procedure then select this feature box.

<C3  Reverse Order       >
C3  Reverse Order

If you want to reverse the order of this list on a permanent
basis select this feature box, or, you might look at runtime
selection of this feature. Hot  Records  Must be enabled in
order to  use  the  reverse order function.

<    Browsing Fields from Related Files >
Browsing Fields from Felated Files

The  Browse procedure will "lookup" fields in a file on  the
"One"  side  of a Many:1 relationship from  the  file  being
viewed in the List box.

For  example, if you have two files, Customers  and  Orders.
The  relationship  from Customers to Orders is  1:Many,  one
Customer  may  have many Orders. If you create a  Browse  to
view the Orders file, you can place a field from the Custom-
er  file  in  the List box, and the  Browse  procedure  will
automatically do the "lookup" into the Customer file.

The  goal in C3 templates is that you should never  have  to
define  a lookup.  All you need to do is create a  relation-
ship  in the Dictionary between the two fields and the  tem-
plates take care of the rest.  The way the a field is deter-
mined  to be a lookup field is the presence of a  C3  Browse
procedure  in  the fields Procedure (When Selected  or  When
Completed) call area.

<Reducing Screens, Embedded Browses and Line Entry>
Reducing Screens, Embedded Browses and Line Entry

C3  templates has two features which cut down on the  number
of separate visual screens needed to implement the inputting
of  variables  into multiple files.  The first  was  covered
earlier  in the manual and that is the Embedded Browse  fea-
ture.  Line Entry is the second.

In  the Demo.APP we have a screen which allows 2 list to  be
associated  with a main list.  Not only can you get a  quick
view of what is available, through line entry you can  input
new data on the same screen.  Only the Phones list is imple-
mented with line entry, however, you could make all of  them
line entry if desired.

   Ŀ
    Ŀ  Ŀ        A solution might be
    Names         Type          to place 2 minor file
                          list in embedded
                  Ŀ        browses, and make
                  Phone         them line entry.
        
   

IMPLEMENTATION of Line Entry:

APPLICABLE TEMPLATE(S):  Primary - C3Form21
                         Associated - Browse type screens.

FILE(S):  Selection  of a single data  file  is  sufficient,
however,  the  line entry will also handle  lookups  through
related files as well.

FIELD(S): This feature is primarily designed for  situations
where there are a small amount of data needs to be displayed
and updated.

RELATIONSHIPS:   The file being updated must be  related  to
the  primary file, and if you have lookup fields there  must
be a relationship.

PROCEDURES PROPERTIES SCREEN:  Select the Line Entry Option.

SCREEN  MODIFICATIONS:   On the C3Form itself  you  need  to
perform the following:

1.  Reduce the size of the screen to the size of one line of
    the associated list box. This can be adjusted for custom-
    ization see instructions below.

2.  Place the fields in the identical spacing and layout  as
    the associated list box.

3.  Color as desired, coloration has a great deal to do with
    the user knowing when he is in the edit mode.

4.  Ensure that the float option is selected for the screen.
    HAND CODE POINTS: In the Source section of the  C3Form21
    template there are two variables. These variables are used
    adjust the position of the Line Entry Form in relation to
    the list box on the browse screen. See RESTRICTIONS section
    below. The row and column equates are listed below:

         L-e-AdjRows   equate(1)
         L-e-AdjCols   equate(1)

The  default  adjusts the position from  the  clarion  float
offset up one line and left 1 column.  Changing the value in
the equate adjust the form position as follows:

         Rows      + up      - down
         Cols      + left    - right

INSTRUCTIONS: The basic implementation is relatively simple,
implement  each  of  the elements in this  section  and  you
should get the desired results.

TIP:  In some color schemes it may be difficult to determine
if  you are in the browse mode or in the modify  mode  espe-
cially  on a monochrome monitor or paper white VGA  Monitor.
A simple way to let the user know is to use a special  char-
acter on the first and last column of your form, not between
fields.

    List Box                           Form
  Ŀ              Ŀ
   Commercial Auto                  ################# 
   Commercial Air                  
   Commercial Truck    When selected or in modify mode
   Private Air       < the record will be reversed text,
   #################   when arrows are present means
    modify mode.

You  will need to have a blank column on the first and  last
line of your browse to make it visually appealing.

RESTRICTIONS:  Avoid placing the last line of your browse on
the  bottom  3 lines of the screen.  Due to  clarions  float
offset  on  these rows the offset is changed  from  normally
below to normally above.  The offset is designed to keep the
called from displaying on top of the selected record in  the
browse  table.    This is fine except when you  want  it  to
display  on  top  of the record.  On the other  hand  it  is
customary to have some controls on the screen and more often
than  not they are placed at the bottom of the screen so  to
some  extent this is a moot point. This problem only  occurs
when  you are updating or deleting a record in the bottom  2
lines of the browse or any time you add a record.  Approach-
ing  the  right side of the screen within 2  columns  has  a
similar  result as well.  The difference is that  since  all
records will be in the same relative position the adjustment
made in the C3 equate will be a permanent fix.

You can place the browse on the 3rd line from the bottom  of
the  screen, the update action still displays on top of  the
records, however, the insert action will be on the 4th  line
from the bottom.

RESULTS:  The procedure will use Clarion's float  offset  to
locate  the form, along with the adjuster in the  C3  Equate
section  you can have a line edit browse which  appears  one
screen.

The  Insert action will use the bottom line of the list  box
as  an entry area.  Depending on the you adjustment  as  de-
scribed under hand code points, the change and delete should
occur super-imposed over the associated entry.

<    Default Push buttons Insert,Change,Delete,Select>
Update Procedure, Default Push Buttons

IMPORTANT CHANGE:  Even though the C3Browse type  procedures
have  not  changed in appearance, you can take the  tag  and
flag buttons off of the screen and use pull down menu  based
tagging  and flagging.  The C3 Browse type templates are  no
longer  dependent on these buttons to implement tagging  and
flagging.

<    Lookup and Browse all in One>
Lookup and Browse all in One

This  is not really an individual feature, so to speak,  but
rather  an  overall characteristic of the  C3Browse  screen.
The  C3Browse  template  can be created once  and  used  for
either  a  browse  or a select procedure.   Often  times  in
Clarion  3  programmers find themselves designing  the  same
identical screen as a lookup and a browse because the  basic
browse template does not facilitate dual function.

In this way the C3 Browse is an intelligent browse  function
determining  whether it is currently being used as a  browse
or  as  a select.  As such the appropriate  buttons  on  the
screen will be disabled/enabled as the usage indicates.

<    BROWSE OPTIMIZATION>
Optimization of Browse

If  you  have a related file that is used in  the  scrolling
portion  of a browse, lookup, or validate you must  add  the
following formula:

          Computed FieldĿ
              Field Name   :  (Not Used)           
              Formula Class:  LULIST               
              Description  :  FileName             
                                                   
              Formula      :  (Not Used)           
          

Only the file which contains the field that is to be  looked
up need be entered, the template adds all intermediate files
as required, up to three levels.

        Primary Browse File
        \-File-A
          \-File-B
            \-File-C   (contains field for list box)

Only File-C need be entered as a LULIST Formula Class on the
description line.

The  formula is only needed for the display area.  Other  C3
template  enhancements  automatically handle the  files  and
relations,  or it explains any additional  entries  required
under the specific enhancement section.

The  formula  was  enhanced for code  optimization.  In  the
standard  templates  all files related to the  primary  file
were being accessed on every cycle of the browse, whether or
not  functionally required. As a result code  generation  is
slightly  longer,  but  the benefits  during  execution  out
weighed the added time.

<         Totals,  Average,  Count,  Minimum  and   Maximum >
Totals,  Average,  Count,  Minimum  and   Maximum

Now available for browse templates.

   Computed FieldĿ
     Field Name   :  field to receive the total value  
     Formula Class:  TOTAL  optional(TOTAL-DS) *       
     Description  :                                    
        Formula      field or computation to total     
   

IMPORTANT:   Using  totals will cause  the  EMBEDDED  SOURCE
Filter  to  deactivate  the filter  totals,  therefore  only
filtering on the main scrolling list.  will place the appro-
priate calculation in the field as follows

FormulaClass-TAG  as above but for tagged records only

  Formula Class *   performs
  TOTAL             totals
  AVERAGE           average
  COUNT             quantity of records
  MINI              minimum value      <not available >
  MAXI              maximum value      <not available >

Hint:  In order to optimize the code, rather than  declaring
an  average  and a total or a count. Declare a total  and  a
count and use the values to calculate the average. Therefore
eliminating redundant computations.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

ButtonRange   View records based high & low value of key
ButtonEqual   View browse records based on value of key
ButtonFilter  On fly filter for browse
ButtonFilterN Equal a value , not equal a value or all
ButtonFilterV Exists, NotExists, All
C3FilterAnd   Filter on multiple field in secondary browse
C3NOxxx -     Disables Inskey,DelKey,ChgKey or Message
ColorRecord   Highlight browse records meeting criteria
Ebnn          Add list box on any type of screen
EBnnFilter    Allows filtering on an embedded browse
EbnnList      Computed/Conditional field in Embedded Browse
EbnnNoLimit   Reads records of an embedded browseat all times
EbnnRecur     handles recursive embedded browse
EBnnRelFill   Stuff value into key field on embedded browse
EBnnSecondary 
FileOpen      Opens a file not in procedure schematic
FilterOnly    Use on secondary file in a report filter only
GLBPAS        Trigger prompt during global pass of filters
GLBTAG        Trigger prompt during global pass of tags
KeyEqual      View records based on several key fields
KeyRange      View records based on range of key values
LIST              #
LULIST        Improves performance during lookups
LU-SET        Set values for fields prior to lookup
Many Keys     Multi-keys & locators on single browse
Many Keys     & Locators - Pulldown
QueueField    Allows you to add fields to primary Queue
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse
SpinnerScreen Add a Spinner to screen
Totaling      Aver,Count,Mini,Maxi,Tag


See Formula Class section for detailed explaination of each
formula class.

<    TOTAL (C3) - AVERAGE, COUNT, MINI, MAXI, ???-TAG>
TOTAL (C3) - AVERAGE, COUNT, MINI, MAXI, ???-TAG

You  simply need to place the field name or  computation  in
the  Formula area, and you have to have a field  to  receive
the total in the Field Name Area.

   Computed Field Ŀ
                                                      
    Field Name   :  field to receive the total value  
    Formula Class:  TOTAL  optional(TOTAL-DS) *       
    Description  :                                    
                                                      
       Formula      field or computation to total     
                                                      
  

IMPORTANT:   Using  totals will cause  the  EMBEDDED  SOURCE
Filter  to  deactivate  the filter  totals,  therefore  only
filtering on the main scrolling list.

FormulaClass-TAG  as above but for tagged records only

  Formula Class *   performs
  TOTAL             totals
  AVERAGE           average
  COUNT             quantity of records
  MINI              minimum value      <not available >
  MAXI              maximum value      <not available >

Hint:  In order to optimize the code, rather than  declaring
an  average  and a total or a count. Declare a total  and  a
count and use the values to calculate the average. Therefore
eliminating redundant computations.

<MORE AND NO MORE DATA INDICATORS>
MORE AND NO-MORE INDICATORS TO BROWSES

More Record Indicators/No More Record Indication:

The  basis for the more and no more indicators are  the  two
defaults  located in the Global section of the  application.
From  the main Applications Generator screen,  press  CTRL-O
then Alt-G.  Now press CTRL-U and you will be in the global
source  area.   Notice  the variables  below.

The  default   values  for the more  indicators  are  listed
below:

G-e-EBMoreInd     equate('  ')   message (ie: 'more') or
                                character (ie: ' ')
                                to display if more records
                                exist then can be displayed

G-e-EBMoreNot    equate('  ')   track character or blank to
                                display when no additional
                                records exist

You  can  put some window dressing on  your  application  by
adding  some more indicators, and you can customize them  to
your  liking.   A set of tools are included  just  for  this
purpose.  On each procedure declare the variables that  will
be  displayed on the screen. There can be up to 2 'more'  or
'no  more' fields per table, display variables must  be  de-
clared  locally, and each display variable must  begin  with
the first 8 characters as:

                 EBxx-ind

Place the display variables on the screen as to your liking.
They can be words or symbols, they are defined in the Global
C3 Equates Section.

Using Single Line Type Display

              Global Equates

      G-e-EBMoreInd      equate('more')
      G-e-EBMoreNot      equate('-')

As mention earlier you have to declare local variables  they
can  be  of different lengths however will normally  be  de-
clared as a string, note the following example:

Local Variables

    EB01-ind   string, length 4

This  will be placed on the screen as a display  only  field
where ever you desire.

        Embedded Table 01
        Ŀ   In this case with the
                            single line type you
                            could put the word
                            more and then a straight
           line, it would either
                              read more or nothing.

Using dual Arrow Type Display

Global  Equates,  go  to the C3 Equates  section  under  the
global area and modify to read as follows:

        G-e-EBMoreInd    equate(' ')
        G-e-EBMoreNot    equate('&')

Go  to the local data area and declare the following  varia-
bles,  (adjusting the two digits after the EB to  what  ever
you  call  your  Embedded Browse,) then Place  them  on  you
screen.

 EB02-indL    string    length  1    placed as a display only
                                     field on the screen
 EB02-indR    string    length  1    placed as a display only
                                     field on the screen

        Embedded Table 02
        Ŀ
                         
                         
        EB02-indL         EB02-indR
        

The templates presently support only one type of more  indi-
cators  for each application.  Obviously because  each  time
you change your Global variables you have changed it through
out your application.

<Color Records, Record Highligh>
Color Records, Record Highlight

At  various times you may want to call attention to  records
for specific reasons.  This could be done with some  audible
beep but then the user has to look for the record.  To  make
a long story short the Color Records allows for a quick  and
easy means of doing this.

In the initial release of the Templates if you did not  have
a  locator  on the screen this would not work,  but  now  it
does, even without the locator.

This feature is implemented by means of a formula class.

<User definable browses>
User definable browses

*********************** IMPORTANT ************************
This is not a fully completed feature use at your own risk
It seems to be working OK so far
If it breaks some thing you get to keep all the pieces
**********************************************************
Note:
1  the maximium displayable length is based on the original
   length used to establish the List Queue Width

2  Will not work with Arrayed Fields

3  Will work properly with child files but only handles
   Many:1 relations

To begin the program needs to know what fields are available
in what files.

This requires 2 steps.

Step 1

Copy the C3File & C3Field file declaration from the
C3D\C3FILES.DCT the files should have a relation as
follows

C3Field
    Forgien Key      cfd:K-cflSys-ID-Field
    Related File     C3File
    Primary Key      cfl:K-SysID
Link Fields
               KEY(cfd:K-cflSys-ID-Field)
               cfl:Sys-ID - cfd:cfl:Sys-ID
                (NO LINK) - cfd:FieldNumber
                    KEY(cfl:K-SysID)
               cfl:Sys-ID  cfd:cflSys-ID

These files will contain information about your Applications
Files and Fields. You must then run them CLA2DCT.EXE program
located in  your  C3D\ subdir. This  will  read  your
application.DCT ,create and fill the C3File & C3Fields files

To add variable browses to your app: (This is the easy part!)

1) Import the 2 Procedures located in C3D\C3NEW.APP (Names:
   C3FieldValue & C3SelectFields), make sure at least one of
   these has C3File and C3Field listed in its file schematic.

2) Add a button with the equate of ?Select-Fields to your
   browse.

3) Compile and run.

Provided you have created the C3File and C3Field files (by
running DCT2CLA)  everything should be set. When you press
the ?Select-Fields button the C3SelectField procedure will
be called  (note:  you may change this browse to meet your
color and layout specifics, even the functional code if you
so desire.   However,  please realize that this has taken
over 2 months to get working   correctly<g>) and you can
select the fields to display.

Things to look out for:

1) When using FIXED lines VB only supports the use of 2
   fixed lines. The first line will be the "Column Heading"
   from your dictionary and if a second exists, it will be
   a line of '-'. If you define more that 2 fixed lines,
   3 and greater will be blank.

2) Because of a bug in Clarion all fields will be their MAX
   size. i.e. a field defined as STRING(50) will take 50
   char. on the browse.

3) The  list size is  limited to the  original size of the
   fields placed in it.  i.e. if you  place Name(String(20))
   and City (String(20)) the max displayable characters (even
   if the user selects Name and address (string(50))) will be
   40 Characters. A Quick workaround for this,  declare the
   list with at least 1 fixed line and place a character in
   column 250 of one of the fixed lines.   This will allow
   the user to select up to 250 characters to display.

4) Function names C3SelectFields and C3FieldValue must always
   remain these names.

5) If you add C3File and C3Field to your dictionary, you must
   also add C3FieldValue to your APP.

6) The only files available for field selection are files that
   appear in the calling browse's file Schematic.

7) Yes, yes, we know, you have to be able to pass to reports.
   Currently in process.

<    Many Keyed & Locator>
Many Keyed & Locator

Multiple keys and locators on a single browse procedure
are now possible. Create a browse procedure using the
following example:

               Key 1             Key 2
               K-Prj-Ven-Date    K-Prj-Ven-Am
               +Project-ID       +Project-ID
               +Vendor-ID        +Vendor-ID
               +Date             +Amount

Key  1  will be used as the procedure's  primary  key  (when
using  many keys on a C3select type browse be sure the  pri-
mary  key  is the one that contains the field that  will  be
used  in the form). Place a button that will  actually  call
the various keys on the screen as follows. Place them  above
the  column  that  is being sorted this  also  provides  the
column heading, using an equate of:

                    Mk*KeyNameLessPrefix

Place the locator fields, if any. The buttons and the  loca-
tors must be below the list box in the screen fields listing
but can be placed anywhere on the screen.

* Field number of the key to be used as a locator when  this
key  is  selected.  Null (0) indicates locator for  the  key
keys can be with or without locators in the same procedure.

Note: Many Key features are limited to 12 per browse. The
first 2 letters must be mk.  Do not use prompts for many
locators.

Button Field PropertiesĿ
  Button Text  :  '&Date'                               
  Equate Label :  mk3K-Prj-Ven-Dt (uses Date as locator)
  Hot Key      :                                        
                                                        
  When Button is Pressed                                
  Procedure :                       Source              
                                                        
  When Button is Selected                               
  Procedure :                       Source              


Button Field Properties Ŀ
     Button Text  :  '&Account No'                      
     Equate Label :  mk0K-Prj-Ven-At     ( no locator ) 
     Hot Key      :                                     
                                                        
     When Button is Pressed                             
     Procedure :                       Source           
                                                        
     When Button is Selected                            
     Procedure :                       Source           


Button Field PropertiesĿ
  Button Text  :  'a&Mount'                             
  Equate Label :  mk3K-Prj-Ven-Am                       
                                (uses amount as locator)
                                                        
  Hot Key      :                                        
                                                        
  When Button is Pressed                                
  Procedure :                     Source                
                                                        
  When Button is Selected                               
  Procedure :                     Source                


There  are two equates in the global source file C3  Equates
that  hold the characters used on each side of  the  current
locator button.  Use these to suit your own style.  In order
to implement the many keyed browse just select the button of
the key you wish use.  The  global properties  screen allows
the use of a  hot  key that will move between the many keys
on each procedure  that contains them.

Note: Incremental locators will not function with many keyed
locators.  Many Key features are limited to 12 per browse.

<    BUTTON REVERSE/NORMAL BROWSE>
BUTTON REVERSE/NORMAL BROWSE

INSTRUCTIONS:  Create the reverse order button on the screen
and then place the same equate as in the screen below.

Button Field PropertiesĿ
 Button Text  :' re&Verse order '                 
 Equate Label :?Rev-Order                         
 Hot Key      :                                   
                                                  
  When Button is Pressed                          
    Procedure :                      Source...   
                                       
  When Button is Selected            Source...   
    Procedure :                        
                                                  
    Colors    Attributes     Ok     Cancel    
                


<    Passing of Key Settings or Filters>
Passing of Key Settings or Filters

The  following file formats allows creating files  that  are
not  really files. These files are never opened and have  no
keys,  even  if you declare them. The entire record  can  be
accessed  using  the PRE:record field.  These  files  enable
passing  filters,  key ranges and or key  values  between  a
browse  and  either reports and or batches. Passing  can  be
disabled  in individual procedures by checking  the  Disable
Glb Filters check box on the C3Report or C3Batch template
properties  screen. If this box is not checked, any  time  a
global filter is in effect a C3Report or browse is called  a
screen  will  appear asking if the user wants to  print  the
full list or the limited list. Done completely in the  back-
ground for BUTTONFILTERS and BUTTONRANGES.

 GD-Filters   pre gdf:   Enables passing of global filters.
 GD-KeyRange  pre gdr:   Enables the passing of key ranges.

Declare  2  fields  for each range. The low  value  must  be
declared above the high value. And the low value must relate
to the field it relates to in the file.  Tags are handled
automatically.

 GD-KeyEqual   pre gde:   Enables passing of key values.

<    Soundex Features, and DOS Wildcards in Locators>
Soundex Features and DOS Wildcards in Locators

This  feature not only looks for matching records, but  also
filters out those that do not match the soundex.

Many Programs over the years have allowed us to use  'sounds
like'  locators  and DOS wildcards to lookup data.  C3  Tem-
plates  has brought that functionality to Clarion.  This  is
another one of C3's Black Boxes, you enable the function  in
the Global Settings/Source/C3Equates area and it works.

G-e-AllowLike     equate(0)    DOS Wildcard Feature
G-e-AllowSound    equate(0)    Soundex Locators

By  default  when you start a new  application  the  soundex
function  is turned on.  To turn it off or on you need  only
to go to the C3 Equates area mentioned and do the following:

Turning off Soundex/Wildcard Features

G-e-AllowLike    equate(0)  !0 no 1 allow like in locator
G-e-AllowSound   equate(0)  !0 no 1 allow soundex in locator

Turning on Soundex/Wildcard Features

G-e-AllowLike    equate(1)  !0 no 1 allow like in locator
G-e-AllowSound   equate(1)  !0 no 1 allow soundex in locator

End User interface with Soundex/Wildcard Features:

If the features are enabled the '~' character is the  signal
to  the application to use the Soundex feature.  Here is  an
example of how it might be typed in:

         Locate: ~Jones

IMPORTANT  - Soundex/Wildcard locators actually  filter  the
file,  they  will only display records which match  the  de-
scription that is typed in.  This can serve as an  excellent
means to allow the end user to filter tables without  having
to create an additional screen or hand coding in the  origi-
nal screen.

The  Wildcard portion, if implemented, is activated  by  the
end user by the typing of the equal sign, '=', as the  first
character.

Wildcard Characters Accepted:  '*'  '?'

Usage:
         Locate: =*d

This would locate all strings ending with d in the file  and
filter out all other records.

<    Tagging>
Tagging

As  you  will  notice in default screen  there  are  certain
features  which are standard to the Clarion  browse  screen.
Following is a description of the additional keys.

   Tag -               Tags the record for processing.
   Untag All -         Untags All records.
   tag All -           Tags all records.
   Rev Tags -          Reverse all tags to untagged or vice
                       versa.
   @ -                 Variable display button.
   Flags -             Flag management for records.

All but the last two are fairly self explanatory,  following
is the explanations for these buttons.

Variable  Display Button - At run time this button is  first
filled in with Display Tagged, if this option is selected it
will  then change to Display Untagged, if these two  options
are done successively it will then change to Display All.

Flags - Calls a procedure which sets flags for records.  You
must add this procedure to your application and customize it
to  your  needs. The flagging process is probably  the  most
complex  feature that we have in our templates, as  such  we
have  dedicated  a lot of time in the text to  help  in  the
implementation.   Even  if  you  have  implemented  Flagging
before, take the time to read the Introduction to Flagging.

As you can see from the above there is a full compliment  of
tagging and flagging options. The C3Browse screen has a full
compliment of tagging and flagging options.

General  Implementation: Implementation of tagging  is  done
through  the  use  of a second file which is  used  for  the
actual  tagging.  In C3D templates this file must be  called
GD-Tag. Any file which begins with GD- is a global  variable
file  and  as  such no data files or  records  are  actually
formed  on the disk. The best way to create this file is  to
copy  it into your dictionary from the Demo.App. If  you  do
not  have this .DCT file accessible you may also  form  this
file  by  creating a file of this name  with  the  following
specifications and fields:

Filename: GD-Tag
Prefix: gdt

Field Name      Data Type           Other

Tag-R            string 1            initial value 'X'
Tag-L            string 1            initial value 'X'

Where 'X' is the value you wish to use for the tag symbol on
your screen.

-LinkField          Same as Data Field  Name Attribute

Where the -LinkField is the field which will connect the tag
file to the data file.

The  -LinkField would normally be a field that is a  primary
key with only component in the data file you wish to tag.

The  best  way to understand the -LinkField is  to  take  an
example.   Suppose  you had a data file named  'invoice'  of
invoices  where  each invoice had a unique 10  digit  'long'
invoice number. The invoice number had a one element key  of
InvNumKey using this long 10 field.

This  would  be  the perfect key and field to  use  for  the
-LinkField. In the GD-Tag file you would declare the follow-
ing field:

         Field Name          -LONG
         Data Type           long
         Display Picture     irrelevant
         Name Attribute      '-LONG'

For  general implementation of the tagging options you  must
create  a  link between the data file and the  GD-Tag  file,
this  is done with the relationship field in  invoice  file.
You  need  only create a one way relationship  as  described
earlier  in the text.  This is done by going into  the  file
declarations  of  all files that will be using tags  and  or
flags and set up a Many-to-1 relation between the key  field
and  the GD-Tag file field that is going to hold the  record
ID.

Select the files in the procedure properties window you  are
implementing  tagging on, you must select the Data-File  and
the  GD-Tag in the files area.  In the screen area you  must
put  your data fields and as well at least one of the  ?-Tag
fields.

RESTRICTIONS:   You are limited to 65000 tags, if you  can't
tag enough records to implement a procedure with this  maybe
you  need to be tagging the records you don't need to  proc-
ess.   Keep the data types in the GD-Tag file to a  minimum,
as  this is a memory intensive operations. If only one  data
type  is  declared  you will receive  the  best  performance
possible.  If strings are used in any primary keys they  can
also be used for numeric type keys but the performance  will
suffer  due  to  data conversion and make  sure  the  string
length  is  capable  of holding all of the  digits  of  your
largest numeric.

SCREEN MODIFICATIONS:  Delete the Tag Button if you are  not
implementing  tagging at this time.  This will  disable  the
rest of the buttons and if you decide to implement later you
will only have to add the tag button.

<    Implementing Simple Tagging>
IMPLEMENTING SIMPLE TAGGING

IMPORTANT CHANGE:  Even though the C3Browse type  procedures
have  not  changed in appearance, you can take the  tag  and
flag buttons off of the screen and use pull down menu  based
tagging  and flagging.  The C3 Browse type templates are  no
longer  dependent on these buttons to implement tagging  and
flagging.

FILE(S):   Select  primary and lookup data files.   Add  the
following files as demonstrated in the demo application that
comes with the C3 templates.

GD-Tag
Tag-Items
Tag-Header
Data-File (Your data file of any name)

FIELD(S):  -LinkField

RELATIONSHIP:   You  will need to  create  relationships  as
follows between the files.

                GD-Tag          Data-File
                None                     ->GD-Tag

Multiple  files can have the the ->GD-Tag  relationship  at-
tached to them.

PROCEDURES PROPERTIES SCREEN:  Enable Hot fields

SCREEN  MODIFICATIONS:    Add fields to the  list  box.   In
addition  you will need to add the tag field from the  files
added.   Be  sure to remove the Flag button if you  are  not
implementing  it.   If  you are then  please  reference  the
section Implementing Flag and Tag.

HAND CODE POINTS:  None

INSTRUCTIONS:  The easiest way to create the necessary files
for  this procedure is to copy them from  the  demonstration
application.  After you have copied the files make  sure  to
modify  them to reflect the proper tag field and  tag  field
relationship.

<    Tagging and Flagging from PULLDOWN MENUS>
PULLDOWN TAGGING AND FLAGGING

IMPORTANT CHANGE:  Even though the C3Browse type  procedures
have  not  changed in appearance, you can take the  tag  and
flag buttons off of the screen and use pull down menu  based
tagging  and flagging.  The C3 Browse type templates are  no
longer  dependent on these buttons to implement tagging  and
flagging.

Implementation:   Implementing  pulldown  type  tagging  and
flagging merely requires that you create a pulldown menu for
the  Browse  type procedure.  On this pulldown you must  use
the  same eqautes as was originally assigned to the  default
buttons on the screen for each particlualr function.

The equate for the Tag button is ?Tag, thus in the  Pulldown
for Tag & Flag you could have a selection for Tag Record, in
the menu option properties screen you would put ?Tag in  for
the equate, what ever you want for a title, but here is  the
tricky  part.  If you do not specify a procedure  or  source
then  you will get a compiler error.  There is no  procedure
called  to accomplish this so what you need to do is  select
source   button  and go into the source   editor.    Put   a
single comment indicator '!' and save your source.  This  is
enough  to  keep from getting the compiler  error  and  your
tagging now works from the pulldown menu and you can get rid
of that hoard of buttons.

One more note, you cannot have a rotating display button  in
the  menu, thus you cannot use 3 menu seletions to   achieve
the  same effect of the rotating button.  We hope to  imple-
ment  this soo, but for now, just the tagging  and  flagging
can  be moved.


                         [ Tag & Flag ]

                             Tag               
                             Tag All           
                             UnTag All         
                             Reverse Tag       
                             Flag              
                           

Note: The features which are not avaialable at a given  time
will be disabled just like the buttons.

<    Introduction to C3 Flagging>
INTRODUCTION  TO C3 FLAGGING

This section is  designed  to provide  you  with the theory
and information  necessary  to design you data files for the
implementation of flagging.

First  of  all the difference between a tag and  a  flag  is
merely  that a flag is stored in a file for recurring  batch
jobs,  semi-permanent grouping of records or for  the  quick
retrieval  of  certain sets of information  which  otherwise
have no common denominator which could be solved by a key or
other  indexing function.  Flags also provide an on the  fly
solution  for the user.  Often times the  implementation  of
flagging can keep from having to create extra  Keys/Indexes,
screens and reports.

The  attraction  of C3 flagging is that you do not  have  to
create a separate set of flagging files or declare  addition
al  fields in your files for X number of users etc  ...  for
each  implementation of flagging. A single set  of  flagging
files can be used for numerous procedures. Additionally  the
number  of  sets of flags is only limited by the  number  of
records the chosen file driver is capable of handling.

As  described earlier, remember that the GD-Tag file is  not
actually a file, as far as that goes no file you begin  with
GD- is a file.  These are actually just variables the GD-Tag
is  a  memory Queue.  The basic function of flagging  is  to
save  the  tags in the memory queue to a file, and  then  to
restore  it  when needed.  The flagging system  goes  beyond
this to include other flagging capabilities.

Merging  Flag Sets - Not only can you save and restore  flag
sets  you can merge two flag sets.  Lets say that  you  have
written a procedure which automatically tags records as  you
type  them  in.   At the end of a session  all  of  the  new
records are tagged.  Suppose then you created a new flag set
for  that batch of records and did the same for 5 days in  a
row.  At  the end of the 5 days you could merge all  of  the
flag sets and then save them as the weekly summary for batch
processing.  You could then save this flag set as well.

WARNING:You must make sure when you are declaring fields  to
store  flags  for  different files that  the  field  in  the
Tag-Items  file is as long as the longest value it  will  be
expected to save.  If clarion happens to compile the  appli-
cation  where  the value is shorter, then  some  unfortunate
results  could occur, without any indication that  erroneous
information is being processed.

Merge - This button leaves intact all of the flags currently
set on the source procedure, and adds all of the flags which
are contained in the Flag Set that is currently highlighted.

Insert - This button adds the name, date etc. of the new Tag
Set.  But bear in mind  that this also executes the  C3Batch
procedure which creates and records the current Flag Set.

Change  - Is only used to update the name, etc. of the  Flag
set not the data contained in the flag set.

There  are two procedures which you will need to  copy  from
the demo application into the application you wish to imple-
ment  flagging  on. Those are the flag browse and  the  flag
form.

Procedure Flags Listing Ŀ
Description              Last Use Created By        P    
                         mm/dd/yy                        
                         mm/dd/yy                        
                         mm/dd/yy                        
                         mm/dd/yy                        
                                                         
Insert  Change Delete  Update  Recall | Merge  eXit
      ٳ


The flag browse above is used to display Flag sets, and take
the necessary actions to recall, save, delete etc... them as
well.

               Flag Form Ŀ
                                                     
              Desc:                                  
                           [x] Private               
                    Ok                 Cancel      
                                        
              

The  flag  form  is equally as simple as it  allows  you  to
create new flag sets giving them descriptions or making them
private.

This is a fairly self explanatory form, it merely allows you
to  give  the flag set a description, and set or  reset  the
Private feature.

Implementing Tagging and Flagging

Suggestion:  Implement  tagging  and insure  it  is  working
before you begin to implement flagging.

File  Requirements:  Select primary and lookup  data  files.
Add the following files as demonstrated in the demo applica-
tion that comes with the C3 templates.

        GD-Tag
        Tag-Items         required only for flagging
        Tag-Header        required only for flagging
        Data-File (Your data file of any name)

Relationships:

You will need to create relationships as follows between the
files.

         Tag-Items  *        Tag-Header   *
           ->GD-Tag            ->Data-File
                               ->>Tag-Items

         GD-Tag              Data-File
          None                 ->GD-Tag

*  Already exists if tagging has been implemented. Multiple
files can have the the ->GD-Tag relationship attached to them.

Field Requirements:
                   -LinkField

Screen Modifications: Add fields to the list box.

Instructions:

The  easiest  way  to create the necessary  files  for  this
procedure  is to copy them from the  demonstration  applica-
tion.   After you have copied the files make sure to  modify
them to reflect the proper tag field and tag field relation-
ship. The same goes for the Tag-Header, and Tag-Items files.

Step  1  - Assuming that you have already created  the  file
that  you wish to implement flagging on, and it might  be  a
good idea to make sure that your tagging is working properly
before you begin this procedure. Copy  the Tag-Header and
Tag-Items files from the demo  dictionary into your target
dictionary.

Step  2 - Modify the Tag-Header and Tag-Items files as  fol-
lows: Modify the emp-Sys-ID field or create a new field.

Step  3 - Copy the Flag-Table and Flag-Form to the target
application. No modification is necessary.

<Line Entry Functions>
C3 Line Entry Functions

Line Entry on Browse List Box:

Here is one of the 'Black Boxes' of the C3 templates.  Often
times there is some small file with only two or three varia-
bles  in  it. Most often Browse and a Form  are  created  to
handle  this minor file. This is not much work, and  from  a
Development point of view is no problem.  However if we have
5  of these files we have 5 menu options or buttons and  the
user is jumping around from screen to screen just to type in
5 or 6 words.

C3Batch  processes can be used to reduce the user having  to
access as many screens however, normally then you must still
bring  up  the browse screens associated with  the  data  to
insure it was input properly.

C3  templates has two features which cut down on the  number
of separate visual screens needed to implement the inputting
of  variables  into multiple files.  The first  was  covered
earlier  in the manual and that is the Embedded Browse  fea-
ture.  Line Entry is the second.

In  the Demo.APP we have a screen which allows 2 list to  be
associated  with a main list.  No only can you get  a  quick
view of what is available, through line entry you can  input
new  data  on the same screen.  Only the  Category  list  is
implemented with line entry, however, you could make all  of
them line entry if desired.

   Ŀ
    Ŀ  Ŀ   A solution might be
    Names         Type     to place 2 minor file
                     list in embedded
                  Ŀ   browses, and make
                  Phone    them line entry.
        
   

IMPLEMENTATION of Line Entry:
APPLICABLE TEMPLATE(S):  Primary - C3Form21
               Associated - Browse type screens.
FILE(S): Any
FIELD(S): Any
VARIABLE(S): None
KEY REQUIREMENTS: None
RELATIONSHIPS: None
PROCEDURES PROPERTIES SCREEN:  Select the Line Entry Option.

SCREEN  MODIFICATIONS:  On the Form itself you need to  per-
form the following:

    1.  Reduce the size of the screen to the size of
    one line of the associated list box. This can
    be adjusted for customization see instructions
    below.

    2.  Place the fields in the identical spacing and
    layout as the associated list box.

    3.  Color as desired, coloration has a great deal
    to do with the user knowing when he is in the
    edit mode.

    4.  Ensure that the float option is selected for the
    screen.

HAND  CODE  POINTS: In the Source section  of  the  C3Form21
template there are two variables.  These variables are  used
adjust  the position of the Line Entry Form in  relation  to
the list box on the browse screen.  See RESTRICTIONS section
below.  The row and column equates are listed below:

         L-e-AdjRows   equate(1)
         L-e-AdjCols   equate(1)

The  default  adjusts the position from  the  clarion  float
offset up one line and left 1 column.  Changing the value in
the equate adjust the form position as follows:

         Rows      + up      - down
         Cols      + left    - right

INSTRUCTIONS: The basic implementation is relatively simple,
implement  each  of  the elements in this  section  and  you
should  get the desired results.

TIP:  In some color schemes it may be difficult to determine
if  you are in the browse mode or in the modify  mode  espe-
cially  on a monochrome monitor or paper white VGA  Monitor.
A simple way to let the user know is to use a special  char-
acter on the first and last column of your form, not between
fields.

     List Box                           Form
  Ŀ              Ŀ
   Commercial Auto                 #################  
   Commercial Air                  
   Commercial Truck    When selected or in modify mode
   Private Air       < the record will be reversed text,
   #################   when arrows are present means
    modify mode.

You  will need to have a blank column on the first and  last
line of your browse to make it visually appealing.

RESTRICTIONS:   Only those of an embedded browse if you  are
using this on an Embedded Browse.

RESULTS:  The procedure will use Clarion's float  offset  to
locate  the form, along with the adjuster in the  C3  Equate
section  you can have a line edit browse which  appears  one
screen.

The  Insert action will use the bottom line of the list  box
as  an entry area.  Depending on the you adjustment  as  de-
scribed under hand code points, the change and delete should
occur super-imposed over the associated entry.

RELATED TOPICS:  Embedded Browse

<<C3ButRedirect Template>>

The Button Redirect template is the same as the C3Redirect
procedure except you can delete any of the buttons you do
not need.

See the C3 Redirect Template help for more information.

<<C3Child Template>>

The  "C3Child"  template  creates a procedure  which  has  a
screen  with  features from both the Browse  and  Form  tem-
plates. This template screen has both a scrolling area and a
record update area.

This  template is designed to process a batch of  child  re-
cords as a single transaction. This batch of records must be
in  a file which is the child file in a  parent-child  rela-
tionship (the many side of a one-to-many relationship). When
a  C3Child Procedure is called, all of the related  children
records for the valid parent record in memory will be loaded
into  a memory QUEUE (the parent record must reside on  disk
as well as in memory).  The QUEUE may be modified by adding,
changing,  or deleting records.  Upon completion of  the  OK
button,  the  QUEUE records are written back to  disk  as  a
single  transaction.  Changes to the QUEUE are discarded  if
the Exit button is selected.

In  order to maintain the highest level of  data  integrity,
the update of the child file is framed within a  Transaction
process.  (See  the essay on Transaction Processing  in  the
Programmer's Guide for details.)

The  Btrieve  and Clarion file drivers  support  Transaction
Processing.  So,  the Child file must utilize one  of  these
file  drivers in order to work properly.  For drivers  which
do  not support transaction processing, a  Browse-Form  tem-
plate combination may be used.

The correct File Schematic is essential to the proper opera-
tion  of  a C3Child template procedure.   By  selecting  the
Files... button from the Procedure Properties screen you may
view  the  existing  file schematic, or create  a  new  file
schematic if one has not already been defined.

The child file must be the first (primary) file in the  File
Schematic.  The parent file must be listed below  the  child
file,  and must have a relationship defined with  the  child
file as in the example below:

     This File Schematic is supported:
     
         Primary (Child file)

<FORMULA CLASSES >
FORMULA CLASSES

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<<C3File Template>>

The  C3File template produces a procedure which  will  allow
the  user to Pick a DOS filename from a listing of files  on
the currently logged disk.

The user may use the keyboard or the mouse to change  direc-
tories or select the file.  Since the file mask is an  Entry
field, the file mask may be changed by the user.

A mouse double-click on button 1 (The left button on a right
handed  mouse) will change directory if the  directory  list
box  is selected, or will select the highlighted file if  in
the files list box.

******************** IMPORTANT *****************************
You will need to DELETE and ADD back any procedures you have
using the C3File Template
************************************************************
We have greatly enhanced the C3File Template. It now displays
the size date and time of each file. Simple tagging that is
independanet of the normal tagging which has only Tag/Untag
thruough  the use  of the  space bar, tagall and untag all.
The tagging is implimented by the use of the check box on the
procedure properties screen. The button equates for TagAll is
TagAll and for UnTag All is UnTagAll.

The Queue structure is listed in the Data section section
of the C3File Template and can be moved to the Global Data
area of your application if required. Do not delete any fields
from this Queue as it will cause compile errors.

The buttons used for displaying order can be removed at the
developers option which include.

Name     Extn     Size    Date    Reverse
(These are also the button equates required if you remove
 any and later want to restore them. The actual display
 on the button can be anything you like.)

<Formatter Support>
Formatter Support

The  "C3File" procedure in CLARION.APP is pre-loaded with  a
screen  layout  containing 2 list boxes, 1 file  mask  entry
field,  1 directory name display field, and 2  push  buttons
named "OK" and "Cancel".

The files list box shows filenames in the selected directory
which match the file mask. The directories list box displays
any sub-directories in the current directory and the  parent
directory  denoted  by '..' when available.  The  file  mask
entry field is large enough to contain a simple file mask of
'*.???' and will cause the files list box to be rebuilt when
changed.  The directory display field will display the  cur-
rent directory up to 35 characters. The OK push-button  will
write the selected filename to the specified Filename Varia-
ble and Cancel push-button will return to the calling proce-
dure  leaving the Filename Variable with its  original  con-
tents.

<Formula Classes >
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<Relational Key Priming>
Relational Key Priming

A C3Form will automatically prime the related key fields  of
a  file  that is related to with the other file  being  main
relation.  In the  related file  that will be  primed by the
primary  file declare any key  fields that  are to be primed
with an initial value of REL-UP. In  the C3Form that will add
the record add a formula  class of REL-UP .

Computed FieldĿ
                                                          
    Field Name   :  (Not Used) any variable               
                                                          
    Formula Class:  REL-UP                                
    Description  :  FileName                              
                                                          
    Formula      :  (Not Used) any thing                  
                                                          


The  reason  for this formula is that a single file  may  be
related  to  several other files and this  will  secure  the
values passed for priming.

<Page Up, Page Down Form>
Page Up, Page Down Form

This procedure is really a combination of features, and more
of  a trick or tip than anything else, here's how to do  it.
First of all create a C3Browse screen and select all of  the
Procedures Property screen items as normal.  Select a single
component unique key for the file key.  Make sure you Select
the Hot Records feature.

1.  Screen Modifications - First of all reduce the size  of
    the primary browse list box to one line by the number of
    characters that you need for the primary key field. Let's
    use an invoice for the example.

    INVOICE.DAT
    Invoice-No @n10     AutoNumber, Unique Key
    Customer-No @n10    AutoNumber, Unique Key
    Date      @d1
    Note      @s40
    Terms     @s20

    Key - InvNoKey

2.  Now we want to be able to page up and page down  between
    our invoices. Make the List Box 1 row by 10 Columns, place
    the Invoice number in the list box.

3.  Place the rest of the fields on the screen   as  display
    only fields.

4.  Create a form that looks just like the C3Browse   except
    make the Invoice-No Display only and paint the rest of the
    screen transparent.

5.  Compile your app.

Results:   When you enter the Browse for the first time  you
will be asked to add a record, once you return to the Browse
screen  your miniature list box works just like  any  other,
press  insert and add some more records.Once you have a  few
records,  while your cursor is in the list box  (Invoice-No)
field  press  page up and down.  It should take you  down  1
record  at a time because the next page of your list box  is
exactly  1  record.  Press enter at any record to  edit,  or
delete  at any record to delete.  You can enhance this  more
by  doing embedded browses and other features.  See  the  C3
Invoice.app  on  CSERVE  for the rest of the  ways  you  can
implement the page up page down Invoice.

<<C3Form Template>>

The C3Form template is modified from the original Clarion
Template.  If you are upgrading an existing application
please see the C3 Manual Pg 2-2.

The  "C3Form" template generates a procedure that will  ADD,
CHANGE or DELETE a record from the procedure's Primary  file
(as defined in the File Schematic).

If the Global Application prompt, "Enable Shared Files: " is
checked ON, the code is generated with complete Record level
locking for a multi-user application.

Referential  Integrity constraints, as defined in  the  Data
Dictionary,  are enforced during any update to  the  Primary
file, for ALL 1:MANY relationships to the Primary file.

The  template allows for multiple auto-increment key  fields
and concurrency checks of multiple memo fields.

<Data Dictionary Validity Checks>
Data Dictionary Validity Checks

"Initial  values"  defined in the Data Dictionary  are  pre-
loaded during an ADD.

"Range checks" are generated from the Data Dictionary  defi-
nitions and are enforced during an ADD or CHANGE. If an  out
of  range condition exists, the user is notified (using  the
ShowWarning procedure) of the valid range for the field, and
the cursor is placed on that field for editing.

<Displaying fields from Related Files>
Displaying fields from Related Files

The  template  automatically  generates  GET  statements  to
access  any secondary files where the relationship from  the
procedures  Primary file is defined as MANY:1.  Fields  from
the  "1"  side of the relationship should be placed  on  the
Screen  as "display-only".  No code is generated  to  update
files on the "1" side of the relationship.

EXAMPLE: In the Data Dictionary you have defined CUSTOMERS and
INVOICES as a 1:MANY relationship; "1" customer may have MANY
invoices. That means the INVOICES file is related MANY:1  to
the CUSTOMERS file.

On the C3Form used to update the INVOICES file you can place
the CUSTOMERS name and address fields on the Screen, and the
correct  CUSTOMERS record will be retrieved from  the  file.
But  even if you allowed changes to the CUSTOMERS  name  and
address  fields,  there would not be any code  generated  to
update the CUSTOMERS record.

Data Dictionary Validity, Automatic field validation

The  "Must  be in File" validity check defined in  the  Data
Dictionary  is  enforced when the field is  "completed",  or
when the user presses the "OK" button.

Lookups

Enter  the name of a BROWSE procedure in the "When Field  is
Selected Procedure:" entry, if you want a Browse "lookup" to
appear as soon as the field is selected by the user.

Use the "When Field is Completed Procedure:"  if you want to
"validate" an entry after the user completes the field.

The  goal in C3 templates is that you should never  have  to
define  a lookup.  All you need to do is create a  relation-
ship  in the Dictionary between the two fields and the  tem-
plates take care of the rest.  The way the a field is deter-
mined  to be a lookup field is the presence of a  C3  Browse
procedure  in  the fields Procedure (When Selected  or  When
Completed) call area.

<Formatter Support>
Formatter Support

The  default  screen contained in CLARION.APP  has  a  local
variable  named LOC:Message placed at the top of  the  entry
screen.  This  variable is used to inform the  user  of  the
current action: Add, Change, or Delete of the record on  the
screen.   The message displayed is stored in CLARION.APP  in
the  global variables as GLO:InsertMsg,  GLO:ChangeMsg,  and
GLO:DeleteMsg.

You can enter your own messages on the Procedure  Properties
window. If any Prompt for a message is filled in, it will be
used instead of the global values stored in the default .APP
file.

The default screen has two buttons: Ok and Cancel.  Both  of
these fields are required by the template.

If  a  Pulldown structure has been created by  the  Pulldown
Menu Formatter, it is generated after the screen  structure.
The  Pulldown is OPENed after the screen structure,  and  is
closed upon exit from the procedure.

The Report Formatter is not supported.

<Formulas Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

C3Lookup      Auto Lookup from form
C3NOxxx -     Disables Inskey,DelKey,ChgKey or Message
FileOpen      Opens a file not in procedure schematic
FilterOnly    Use on secondary file in a report filter only
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

           See Formulas Classes section for complete details

<Page Up, Page Down Form>
Page Up, Page Down Form

This procedure is really a combination of features, and more
of  a trick or tip than anything else, here's how to do  it.
First of all create a C3Browse screen and select all of  the
Procedures Property screen items as normal.  Select a single
component unique key for the file key.  Make sure you Select
the Hot Records feature.

1.   Screen Modifications - First of all reduce the size  of
     the primary browse list box to one line by the number of
     characters that you need for the primary key field. Let's
     use an invoice for the example.

     INVOICE.DAT
     Invoice-No @n10     AutoNumber, Unique Key
     Customer-No @n10    AutoNumber, Unique Key
     Date      @d1
     Note      @s40
     Terms     @s20

     Key - InvNoKey

2.  Now we want to be able to page up and page down  between
    our invoices. Make the List Box 1 row by 10 Columns, place
    the Invoice number in the list box.

3.  Place the rest of the fields on the screen   as  display
    only fields.

4.  Create a form that looks just like the C3Browse   except
    make the Invoice-No Display only and paint the rest of the
    screen transparent.

5.  Compile your app.

Results:   When you enter the Browse for the first time  you
will be asked to add a record, once you return to the Browse
screen  your miniature list box works just like  any  other,
press  insert and add some more records.Once you have a  few
records,  while your cursor is in the list box  (Invoice-No)
field  press  page up and down.  It should take you  down  1
record  at a time because the next page of your list box  is
exactly  1  record.  Press enter at any record to  edit,  or
delete  at any record to delete.  You can enhance this  more
by  doing embedded browses and other features.  See  the  C3
Invoice.app  on  CSERVE  for the rest of the  ways  you  can
implement the page up page down Invoice.

<<C3Form21 Template>>

C3Form21 template is modified from the  Clarion Template.
One  of  the  major enhancements from C3  templates  to  the
C3Form21  template  is  it's use as a line  entry  form  for
browses.

The "C3Form21" template generates a procedure that will ADD,
CHANGE or DELETE a record from the procedure's Primary  file
(as defined in the File Schematic). This form works similar-
ly  to the (non-CUA) version 2.1 form (the  same  keystrokes
are available to navigate and complete the form, as well as
version 3.0 button support).  Keystrokes supported:

  CtrlEsc - Cancel
  CtrlEnter - Done
  Enter  Field complete or Done (on last field)
  Esc    Field  return or  Cancel  (on  first field)

The  template allows for multiple auto-increment key  fields
and concurrency checks of multiple memo fields.  Referential
integrity constraints are enforced for any 1:MANY  relation-
ships to the Primary file.

Initial field values from the Data Dictionary are pre-loaded
during  an ADD.  Range checking is generated from  the  Data
Dictionary definitions and is enforced during ADD or CHANGE.
If an out of range condition exists, the user is notified of
the  valid range for the field, and the cursor is placed  on
that field for editing.

The  template generates GET statements to  access  secondary
files  where  the relationship is defined  as  MANY:1.   The
"Must be in File" automatic field entry validation from  the
Data  Dictionary  is enforced when the user presses  the  OK
button. If the value entered in the field does not exist  in
the specified file, the user is notified and is placed  back
on  the field.  Use the "When Field is Completed"  Procedure
line if you wish to call a Validate procedure.

If  the  application is set to SHARE  files,  the  procedure
enforces  multi-user  concurrency  checking  at  the  record
level.   If a conflict arises from two or more  workstations
attempting  to update the same record, the user's Screen  is
refreshed  with the record as changed by the other  worksta-
tion, the user is notified of the change, and placed back in
edit mode.

<Formatter Support>
Formatter Support

The  default  screen contained in CLARION.APP  has  a  local
variable  named LOC:Message placed at the top of  the  entry
screen.  This  variable is used to inform the  user  of  the
current action: Add, Change, or Delete of the record on  the
screen.   The message displayed is stored in CLARION.APP  in
the  global variables as GLO:InsertMsg,  GLO:ChangeMsg,  and
GLO:DeleteMsg.

You can enter your own messages on the Procedure  Properties
window. If any Prompt for a message is filled in, it will be
used instead of the global values stored in the default .APP
file. The default screen has two buttons: Ok and Cancel.

If  a  Pulldown structure has been created by  the  Pulldown
Menu Formatter, it is generated after the screen  structure.
The  Pulldown is OPENed after the screen structure,  and  is
closed upon exit from the procedure.

The Report Formatter is not supported.

<C3Form21 (C3 Enhanced)>
C3Form21 (C3 Enhanced)

Line Entry on Browse List Box:

Here is one of the 'Black Boxes' of the C3 templates.  Often
times there is some small file with only two or three varia-
bles  in  it. Most often Browse and a Form  are  created  to
handle  this minor file. This is not much work, and  from  a
development point of view is no problem. However if we  have
5  of these files we have 5 menu options or buttons and  the
user is jumping around from screen to screen just to type in
5 or 6 words.

C3Batch  processes can be used to reduce the user having  to
access as many screens however, normally then you must still
bring  up  the browse screens associated with  the  data  to
insure it was input properly.

<Formulas Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
EbnnNoLimit   Reads records of an embedded browseat all times
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

    See Formula Class section for complete explaination

<<C3-G-Hotkeys Template>>

The G-HotKeys Template is used in conjunction with features
found in the global properties area.  You need to define the
name  of  this procedure in the Global Properties  area  for
this feature to function.

In the Global Properties area fill-in the field below:

GLOBAL HOT KEYS

Purpose:   To allow the developer to create Hot  Key  proce-
dures that can be called anywhere in the application and  at
any time.

<Requirements>
Requirements

You must name the procedure on the Global Settings screen.

You must create a procedure using the C3-G-HotKeys template.
Simply  use  the  Insert key from the  procedures  tree  and
create the procedure of the same name you used in the Global
Settings area.

You  must  move  this procedure into  the  main  application
module (i.e., AppName.CLA-Main Program Source Module).  From
the procedures property screen simply use the down arrow  to
the  right of the default.CLA file which has  been  assigned
and change it to the main program source module.

Implementation

There are two ways to declare global Hot Key procedures.

<Global Hotkeys Procedures Form>
Global Hotkeys Procedures Form

The  first  way is to use the template's  automatic  feature
which is similar to the procedures button on the  procedures
properties  screen,  however, it is located  in  the  screen
area.

1. Open the procedure's [SCREEN].

2. Press Esc to open the template screen pulldown menu.

3. Select HotKey Procedures.

4. Insert   Hot Keys and the labels of the  procedures  they
   call in the fields provided.

Here is what the HotKey Procedures Screens look like:

       otkey ProceduresĿ   The background
                                           screen is the basic
         ShftF5 - C3B-Phones          ^    List of HotKey
         ShftF6 - C3B-ItemCode            Procedures.
                                       
 Insert Procedure CallĿ
                                              
  Hot Key  :CtrlR                             
                                              
  Procedure:R-QuickForm           Source...  
                                   
            Ok             Cancel           
                              

                
                     Exit                 The foreground
                                   screen is the form
          used to define the
                                             HotKey Procedures.

Notice  that you can use the source button in lieu of  using
the  procedure type of call.  The end results in the  proce-
dure tree view is as follows:

    GHK-Proc(C3-G-HotKeys)     Notice that this is the two
    |-C3B-ItemCode(C3ToDo)       HotKey Procedures that were
    \-C3B-Phones(C3ToDo)         on the main list above.

Define the C3ToDos to perform any standard template or custom
code calls.

Please note that the screen for this procedure will never be
opened, thus you need not modify it in any way.

<Global Hotkey Custom Coding>
Global Hotkey Custom Coding

If  you have a custom code procedure which you wish to  call
you could copy it into the Global Procedures Embedded Source
Area.  This could also be used to write short procedures  of
a C3Batch nature.  This method utilizes the source button on
the procedures properties screen.

         From the Procedure Properties screen, select
         [SOURCE].

         Select the Global Procedures Embedded Source Area.

         Type your code:

                   Of Key
                             Valid Clarion Code

Select Global Alerts Embedded Source area and alert
the Hot Key:

         Alert(Key)
         Alert(1stKey,nth Key)

<<C3GUIFirstProc Template >>

The First/GUIFirstProc templates, both the Standard and  GUI
provide the programmer with increased flexibility. Addition-
al  features  include, additional  code  points,  background
screen,  path  for file names, and in the case  of  the  GUI
first procedure automatic inclusion of the GUI calls.

<Formatter Support>
Formatter Support

In  the  Source  section you  have  all  formatter  support.
However  the  main support is provided  by  Clarions  normal
screen  support  in the screen button. This can be  used  to
construct a Background screen for your application.

<First Procedures, GUIFirstProc, C3First-Proc>
C3 GUI First Procedure (GUIFirstProc) Template
C3 First Procedure (C3First-Proc) Template

Declared  as the first procedure,  C3FirstProc  GUIFirstProc
can  be  used as backdrop for the program.  C3FirstProc  can
also  be used to set filenames to a particular path  on  the
fly.  Files  can be added here if not  referenced  in  other
generated procedures. Finally, C3FirstProc opens and  closes
each  file for error checking. GUIFirtProc is the same  fea-
tures  as C3FirstProc, but automatically includes  Clarion's
GUI.  Load GUI Embed allows developer to control whether  or
not  GUI is loaded based on developer's  criteria.  Clarions
GUI kit is an add on product from Clarion.

Global Properties String Len File Name:  The number  entered
at this prompt designates the length of a string to be  used
in a file's Name attribute. The string will be declared just
above the file structure. If the filename begins with a "F-"
the path variable will be appended to the front on the  file
label.

File Extension:  This allows you to choose something besides
the default for your data file extensions.

Declared  as the first procedure,  C3FirstProc  GUIFirstProc
can  be  used as backdrop for the program.  C3FirstProc  can
also  be used to set filenames to a particular path  on  the
fly.  Files  can be added here if not  referenced  in  other
generated procedures. Finally, C3FirstProc opens and  closes
each  file for error checking. GUIFirtProc is the same  fea-
tures  as C3FirstProc, but automatically includes  Clarion's
GUI.  Load GUI Embed allows developer to control whether  or
not  GUI is loaded based on developer's criteria.   Clarions
GUI kit is an add on product from Clarion.

Global Properties String Len File Name:  The number  entered
at this prompt designates the length of a string to be  used
in a file's Name attribute. The string will be declared just
above the file structure. If the filename begins with a "F-"
the path variable will be appended to the front on the  file
label.

<<C3Invoice Template>>

The C3Invoice Template displays a parent record (Header) and
its associated child records on the screen at the same time.
Programmers may create a variety of screens with it, the most
common  is the invoice, but this is by no means the  limita-
tion  of  the C3 Header/Footer template set.  At  this  time
many of the C3 features are not yet available on the  header
and  detail  templates.  See the template help  on  each  of
these for further details.

C3 templates implementation of the header/detail concept  is
made easier by allowing for an optional accountable  number-
ing  system.   By using the Inv Num Aft Commit  option,  and
properly  setting  up your screen, mainly by  disabling  the
delete  action,  you can prevent header numbers  from  being
skipped,  with some limitations, ie. power failures,  resets
in the middle of update etc.

If  Inv  Num  Aft Commit is selected  numbering  control  is
accomplished  as follows:

The  way that we accomplish this is to hold all  information
on the header/detail in memory until the action is committed
and then and only then assigning the next number in the auto
number  sequence.  Committing or accepting  the  information
assigns  the  number upon completion of the Ok  button.   As
such the header and detail are treated like a single entity.

You  are allowed up to 32000 detail records per header,  but
keep  in  mind that there are 4 memory queues  used  in  the
detail  structure so you will most likely run out of  memory
when  approaching this limit.  We hope this  doesn't  impose
too many limitations on the programmer.

The  implementation of this feature is some  what  different
than any other C3 feature, and it requires that you create 3
different files.  Actually only two of the files are  unique
the  third is a copy of the detail file and it is using  one
of our other features, the memory queue file (MQ).  See this
in more detail in the help and manual.

There  are  a series of relationships which  must  exist  in
order for the templates to work properly.  We tried to  keep
this  as  simple as possible, however, the  reason  so  many
people  wanted  the  invoice template is  because  the  hand
coding  of  one is even more complicated.  After  the  first
implementation  we  feel you will find  it  rather  straight
forward.

The  template is designed to provide maximum flexibility  to
the programmer, we could have made more features  automatic,
however  they would have also been there whether you  wanted
them  or not.  This template set will have more features  in
the near future, as always we will maintain maximum backward
compatibility.

 Invoice template now allows a formula class of detl or
 detl-ds that will be calculated for each record in the detail
 list box (we had use detl instead of detail as detail tells
 it what related files should be looked up)

C3 Features which are not currently available on the  header
(invoice) or detail templates.

Filters
Embedded Browses
Tagging
Color Records
Button Filters, Ranges or Equal
Multi Page
Locators On the Detail List Box
Unique or auto number keys in the item detail file.

Implementation:

1. File Creation - Data Dictionary Requirements

First create the invoice header file and the invoice  detail
file.  The only real requirement is that you must create the
header  file with a unique auto number field to contain  the
header  number.  In the detail file ensure that you  have  a
field  which will hold the header id field.

See our discussion on Sys-ID style programming in the  help,
or  in  the manual if you need further  assistance  in  this
area.

While still in the dictionary, after creating the item  file
copy  it to a new file which has the MQ prefix, for  example
if  you call the detail file the "DETAIL" file then copy  it
to a file with the name "MQDETAIL" (which is really a memory
queue).  Remember when copying a file the relationships  are
not  carried forward with them, which brings us to the  next
point.

The MQ file must have the same relationships of the original
DETAIL  file.  This includes child to parent and  parent  to
child.

The detail file and MQdetail file should have a single  part
key that will relate it back to the header file as a child.

The three required files COULD be name the following:

HEADER
DETAIL
MQDETAIL (actually a memory queue)

I  will use these names later in the text instead of  trying
to describe them over and over again.

2. Application Generator Requirements

As  in  most procedures, the first step is to create  a  new
procedure using the C3Invoice Template.  This is a form type
procedure  and can be called from a browse or can be  called
directly from a menu option, which we will describe later in
this section.

This  procedure will be the main invoice form, as  such  the
following is required in the file tree structure:

a.  Use the main HEADER file as the primary file in the file
structure.

b.  Place the DETAIL and MQDETAIL file as a directly related
file off of the HEADER file.

c.  Place the

          HEADER
            |- DETAIL
            |- MQDETIAL

Procedures Property Screen

Fill in the prompts as described in the template help as per
each field prompt description entry.

Already created for you is a list box which will contain the
fields  of your invoice items.  This list box has the  label
of  DETAIL,  thus you should avoid using  DETAIL  for  other
labels  where  they may conflict with this.

WARNING: DO NOT use the fields from the Item Data File  (The
Detail  File) for the display screen in the List  Box.   The
fields  you  must have on in the list box are those  of  the
memory queue.  This is done by selecting fields from the  MQ
file you created as described earlier in this section.

Lookup data fields from related files are placed in the list
box as normal.  Thus if you are looking up the item descrip-
tion  from the inventory file, the inventory file,  descrip-
tion  field will be placed on the screen  as  normal.

NOTE:   Any related lookup fields in the list box must  also
be  declared  in a formula with a formula class  of  DETAIL.
See the section on Formula Classes for details on setting up
this formula class.

If  you wish to use the invoice directly from a menu bar  or
button, you can call it with a selection having the  ?Insert
equate.  This will make the Invoice come up adding a record,
thus you have a direct add Invoice form.

Buttons

Insert    Adds a record to the detail file.
Change    Modify a record in the detail file.
Delete    Deletes a record in the detail file.

Ok        Saves the entire Header and Detail File to disk.
          If the Inv Num Aft Commit is enabled it will also
          assign the invoice number at this time.

Cancel    Exits the procedure and returns all header and
          detail records to their original values before
          any modifications.

<Accessing the Mq-(item) file before disk write>
Accessing the Mq-(item) file before disk write

You can now access the Mq-(item) file before the detail items
are written to disk.
The embedded source points are :
          'Before Queue to File Assignment'
          'Before Detail File I/O'
This will allow you to perfrom operations on the Mq-(Item) or
the Item data file.

As the queue is read the variable Status indicates the current
items condition

1 = record added      2 = record changed   3 = record deleted

<Formula Classes>
Formula Classes

All totaling type formula classes can be used except mini  &
maxi, for lookup fields in the DETAIL list box you must  use
the DETAIL formula class.

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
C3NOxxx -     Disables Inskey,DelKey,ChgKey or Message
EbnnNoLimit   Reads records of an embedded browseat all times
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<<C3Inv-Item Template>>

Detail Form for Invoices

The actual detail items must be update using the  C3Inv-Item
Template.  The function of this template is much the same as
an  normal C3Form with most of the differences being in  the
functionality,  rather than the appearance or the  way  that
you  set it up or put fields on the screen.  See the  C3Form
section of help for any details you may need in filling  out
the prompts and fields other than what is listed below

Implementation:

One unique part of the implementation is that you do not put
any  true  files in the file tree  schematic.   The  primary
requirement  is  that you put the MQ file in the  file  tree
schematic.   See  the  C3Invoice section of  help  for  more
details  on creating the MQ file, as well as other  require-
ments for setting up an Invoice procedure.

Any other related files, such as inventory list, should also
be placed in the file schematic.

If  your are implementing any sort of inventory  adjustments
you will have to hand code them yourself.

Any  filling of variables in the detail record must be  done
while  you are still in the invoice detail form.   The  only
actions  automatically  accomplished by accepting  the  main
invoice form are as follows:

1.  Before   writing  the header file to disk, all  data  is
copied from the memory queue file to the detail file.   Thus
all data needed in the detail file must be contained in  the
memory queue file before accepting the main invoice form.

2.  All data from the related fields in the  invoice  header
file are carried over to the invoice detail file.

<Auto number>
Auto number

Auto number is now supported in the Invoice Item (detail)
File. The actual autonumbering only occurs when the records
are written to disk.

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

       See Formula Class Section for detail description

<<C3List Template>>

The  "C3List"  template generates a procedure  that  scrolls
data  files  on the screen like a spreadsheet.   Unlike  the
Browse,  Lookup, or Validate templates the  C3List  template
loads every selected record from the file into memory before
displaying the list box.

The Queue for the list box must keep track of key values and
pointer  fields as well as the information displayed in  the
list  box. Therefore, Using the C3List template for  a  very
large file would fill virtual memory and overflow onto disk.
In  effect the file is being copied before it is  displayed.
For this reason, the C3List template should only be used  to
display relatively small files or relatively small  sections
of large files.

Selected fields from the data file are displayed as  columns
in a list box.  Columns that do not fit in the list box are
displayed  using a mouse with the horizontal scroll  bar  or
the left and right arrow keys.

A selector bar is always positioned over a single row.   The
up  and down arrow keys move the selector bar.   Moving  the
selector  bar up off the top row or down off the bottom  row
scrolls  a new record into the list box.  The PGUP and  PGDN
keys  scroll  the prior and next pages of records  into  the
list box.  CTRL-PGUP displays the first page of records  and
CTRL-PGDN  displays the last page of records.  Pressing  the
right  mouse button in the top half of the list box  scrolls
up and in the bottom half scrolls down.  The list box  field
must  be  the first field in the screen structure  when  not
using a record filter or record selector.

Fields  may be placed before or after the list box field  in
the Field List.  Selecting the LIST field from a prior field
displays the first page of records.  The "Insert", "Change",
and "Delete" push buttons, or any other field that processes
the  record under the selector bar must be placed after  the
LIST field in the Field List.

A  check  box is available to view a file in  Record  order.
This  is  primarily useful in viewing  ASCII  files.   Since
ASCII,  BASIC, and DOS files have certain  limitations,  you
should know the file system's capabilities before attempting
to  use the C3List template with an Update  Procedure.  (The
C3View template may be used to just View an ASCII file.)  If
the Check box is checked on, any reference to a primary  key
is ignored by this procedure.

Also,  a  check  box is available to display  the  queue  in
reverse  order.  When  the Record Order  check  box  is  not
checked,  the Reverse Order check box will display the  file
in  reverse key order. If Both the Record Order  check  box,
and the Reverse Order check box are on then the file will be
displayed in reverse record order.

A  set  of  display-only fields can be  designated  as  "hot
fields"  on  screen.   Hot fields display  values  from  the
record currently highlighted by the selector bar and  change
whenever  the  selector bar moves.  This allows  display  of
more  information from the highlighted record than just  the
one  line  in  the List box. These hot  fields  MUST  appear
consecutively  in the Field List but may be placed  anywhere
on screen.

Hot  Records  Must be enabled in order to  use  the  reverse
order function.

<Formatter Support>
Formatter Support

The  "C3List" procedure in CLARION.APP is pre-loaded with  a
screen  layout containing a list box and push buttons  named
"Insert", "Change", "Delete", and "Exit".  The field  equate
label of the list box must be "?List".

The horizontal scroll bar can be turned off if the  required
information  fits in the list box.  The vertical scroll  bar
is also optional.  All other properties of the list box  can
be changed.

Fields from related files may be scrolled in the list box as
"lookups"  will be done automatically from the Primary  file
in the file schematic to Secondary files with a "Many to 1"
relationship.

The  "Insert", "Change", and "Delete" push buttons  call  an
update  procedure  to  process the  selected  record.   (The
update  procedure  is  now normally created  with  a  "Form"
template.) The name of the procedure must be entered as  the
"Update Procedure".  If there is no update procedure,  these
push  buttons can be deleted. If all three push buttons  are
deleted,  yet an update procedure exists, the Insert,  Enter
and  Delete  keys will Insert, Change and Delete  while  the
list  box is selected. However, If only one or two of  these
buttons  have  been  removed the  function  of  that  button
(Insert,  Change, or Delete) will be removed from  the  list
box  as  well and no update procedure will be  called.   The
"Exit" push button should not be deleted.

Local  data is generated before the screen structure.  If  a
pulldown  structure  has been created by the  Pulldown  Menu
Formatter, it is generated after the screen structure.   The
template  makes no provision for opening or closing a  pull-
down  menu.   Such statements must be  entered  as  embedded
source. The Report Formatter is not supported.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class for complete explaination of each formula.

<<C3List-Bit Template>>

The List-Bit Template provides a way to manage true/false
variables. If you have a lot of variables which hold true/
false values, you have a perfect candidate for Bit Mapped
Switches.

The List-Bit is just about what it sounds like, it is a List
type  template that by default stores one entry for each  of
the bits in the related bit field.  As an example, your task
might be to design a form that will be easy to use for a car
detailing  company.  They have a fixed number of tasks  they
perform  and  thus it will be a good choice for  a  List-Bit
Template.

The list bit template allows the use of keyrange so you  can
use  a single constant file to hold many different  descrip-
tion lists.  This makes it even more attractive.  One of the
key  fields on the List-Bit template  procedures  properties
screen is the range value field.  It is based on this  field
that  the  list of constants which apply to the  bit  mapped
switch  field  in your data file.  This is one of  the  main
reference  points for the template that allows the  template
to  relate the proper constants to the proper data file  and
field.

NOTE:  The simplest implementation would be to use one  file
for one list.  This would not require range field or value.

     Let's say that you have 10 true false fields.
     So you decide to use Bit Mapped Switches but lets
     display our field vertically.

        Bit Mapped Field         Constant File
        Data File
                            Ŀ
                            Tag Value             Code 
                                                       
       Bit Position 00       {  Wash               WS  
                    01       {  Wax                WX  
                    02          Clean Carpet       CC  
                    03       {  Clean Upolstry     CU  
                    04       {  Clean Engine       CE  
                    05          Detail Engine      DE  
                    06       {  Detail Tires       DT  
                             etc...                    
                            

Another key note is that the bits of the bit mapped switches
are  referred  to with subscripts for the field  of  01,  02
etc..  and as such the first item on the list correlates  to
the first switch and so on.

I  am just going to refer to the two files as  the  constant
file and the data file.

The  idea is that you would not even display the bit  mapped
switch  field  with a lot of cryptic codes next to  it,  but
rather  if you need to see the plain English explanation  to
what  items are selected, you simply bring up  the  List-Bit
procedure you have created.  This procedure would be used as
both a selector, viewer and the translator for reports.

One  of the main advantages of this type of system  is  that
the main file has only one field for all of that data.  This
can improve performance over having twenty or thirty  fields
to save the same data in.

In order to implement this you will have to specify the file
you  have defined to hold your constants in  the  procedures
properties  screen, along with you data file which  contains
the Long you are using for a Bit Mapped Switch field.

The  variable in the orders file needs to be a LONG.   Other
than that there is not much to setting up for the template.

Place your file and field names in the Bit Map area  provid-
ed.

A final note is that you must set the List-Bit procedure  is
already  set  up  for a tagging type of  operation,  do  not
attemplt to use any of the normal C3 Tagging files or fields
on a List-Bit Template.

Defining the Constant File for List-Bit Procedures

There are only two fields required for the constant file  in
the  List-Bit Template.  The first is the  identifier  field
which  is  used  in the Range Limit and Value  area  on  the
procedure properties screens.  Let's call this the Jobs file
for our car detailing program.

The following is recommended:

     SwitchID       @n6       Primary Key
     BitDescript    @s25

You  may  use  some other variable type  for  the  SwitchID,
however,  a  numeric  as the SwitchID will  lead  to  better
programming in general.  Strings take longer to process  and
require more overhead.

If the file will be changed by the user it should not  allow
the insertion of records and should have a single key on the
SwitchID.   Unfortunately at this time this will  not  allow
for  alphabetizing your list.  If the list is  constant  and
will not change then you can add a second key on the  BitDe-
scription thus allowing the list to be alphabetized.

Now  we  need to coin a phrase "Filtered Key  Order".   This
means that what ever order the records display on the screen
will  determine  which bit they will associate with  at  run
time.  Thus the definition of each bit is determined by  the
filtered keyed order of the records.

Naming  Convention, the SwitchID could be name by  the  file
prefix and the first three letters of the of the field name.
This  means  that if our car detailing program  had  a  file
which  was  called order and in the Order file, we  had  the
Detail-Task (our bit switch) we could make the SwitchID  for
this bit switch OrdDet.  Only a suggestion, not required.

CAUTION:   The  List-Bit procedure saves the  file  to  disk
whether it has been changed or not.

<Procedures Proerties Screen>
Procedures Properties Screen

Procedure PropertiesĿ
                                                        
 Procedure Name    : C3List-Bit                         
    Template       : C3List-Bit                         
    Description    : Use bit map variable wi[ Files...] 
    Prototype      :                                    
 Module Name       : DEFAULT               /[ Screen..] 
 Range Limit Field :[                    ]              
 Range Value Field :[                    ]  [ Report..] 
 Record Filter     :                                    
                     []  Enable Hot Records [ PullDown] 
 Bit Map Field File:                                    
 Bit Map Field     :                        [ Formulas] 
                                           /[ Data... ] 
                                            [ Procedur] 
                                            [ Source..] 
    [ Ok ]   [ Cancel]   [ Template Help... ]           
                                                        


<Range Limit Field>
Range Limit Field:

IMPORTANT  this field is required if you are using a  single
constant file to store the definitions of more than one  bit
mapped  switched  fields.   This field becomes  not  only  a
filter  but an integral part of the association process.  In
this case it would be our Job:SwitchID field.

<Range Value Field>
Range  Value Field:

Once  again this is required if you are using  the  constant
file  to store the definitions of more than one  bit  mapped
switch fields.  For our example it would then be the  OrdDet
value which is what we type in the Jobs file.

<Bit Map Field File>
Bit Map Field File:

This portion is used to specify the file that the bit mapped
switch field (LONG) is located.  In this case Orders.

<Bit  Map Field:>
Bit  Map  Field:

Now we get to the field name of the bit mapped switch field.
In this case Detail-Task.

<Files>
Files:

Here  we need to specify the Jobs file with the primary  key
on the SwitchID.  Now go  in and put the Description on the
List-Box in the screen area and your done.

The  List-Bit  Template will "Stuff" the  Detail-Task  field
with the proper values depending on whether you set the  tag
on or off on the list box on the screen.  Thus also when  it
is  called  up for a particular record it will  "fetch"  the
settings for display.

If  you have a lot of variables which hold either a true  or
false setting, what you may want to do is use the Bit Mapped
Switches  feature of C3 Templates.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class for a complete explaination of each formula.

<<C3ManyUpdate>>

The ManyUpdate Template allows you to relate files as many to
many using  an intermediate file,  the  demo application and
dictionary the file that is used for this is the CRmnn file.
This file contains a key (unique) value(s) out of each of the
other files for the necessary relationships.  In the demo
application if you look at the procedure defined on this temp-
late you will see the CRmnn file is placed between the other
two files and really is only used to establish relationships.

An example of this template is shown in the demo app using the
following:

Parent            Child           GrandChild      relation
Company           Many to Many    Defaults        use
CRcnm             CRmnn           CRdft           files
CNM-brw-Name      Cnm-Dft-MM      DFT-Brw         procedures

Template Purpose:  Embedded browses display a list of values
which relate to the primary browse.  This template has two
primary functions, first to display a list of all possible
values which could be containted in the embedded browse, and
secondly provide a means to select which items to display in
the embedded browse.

Template Function:  The functionality in this templates comes
from tagging.  Tagging must be implemented on the browse that
is called through the C3ManyUpdate Template, and there must be
a select button on the browse as well.

The template can be used in three different modes as follows:

When the called browse is in the display tagged mode you may
untag items to remove the option from being displayed in the
embedded browse.  When in the display all mode you may toggle
selections between tagged and untagged to decide if the value
will be displayed or not displayed.  While in the display un-
tagged records you may tag records to add those items to the
embedded browse.

Implementation:

No direct relationship will be used between the two primary
files, there must be a 'relator' file which acts as an inter-
mediary between the two primary files.  The two primary files
would be the file in the primary list box on a browse and the
file used in the embedded browse.

This intermediary file need only be used in the relationship
in the C3Browse screen where the Embedded Browse is located
where you are implemented, and the C3ManyUpdate Procedure,
this relatioship is not used on the procedure which is called
by the C3ManyUpdate Template.

Create a procedure using the C3ManyUpdate template that will
be called from a embedded browse or a button from the parent
file procedure (if the parent file procedure is a browse be
sure hot records is turned on) as when screen field is com-
pleted.

In the C3ManyUpdate Procedure create your file schematic on
the procedure properties screen. This file schematic can only
contian 3 files and they must be in the correct order as
follows:
              Parent                 Companys
              Child                  Many to Many
               GrandChild             Defaults

The formula classes of RelFill and Lu-Set may be used in the
C3ManyUpdate template to establish any relations needed as
they are used in all other templates.

              Procedure Properties Screen Prompts

Child Lookup Proc   This is the browse that will show all
                    possable values from the GrandChild
                    (Default) File
                    
Child Browse DefaultThe 2 options let you choose if the
 Options            Child Lookup will open with all records
   Tagged Only      the shown or just the records that are
   Show All         Tagged (current Many to Many)
                    are displayed
                    
Confirm Deletes     This will issue a warning screen records
                    are  to be deleted to confirm that you
                    want the record deleted.
                    
Count Field         If you have a field that you want the
                    place the actual numbers of the records
                    in place it here it will use the record
                    count after all updating is completed
                    
Show Spinner        This will turn the spinner screen on and
                    of as records are processed


To use the procedure go to your main browse and select the
button or embedded browse (if an embedded browse go to update
record using change.)

All existing records will be tagged simply tag or untag to
choose the records appropriate records.  The save the exist-
ing list hit the select button to abandon the existing list
hit exit or the escape key.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class for complete explaination of each formula.

<<C3MemForm21 Template>>

The "C3MemForm21" template generates a procedure that process-
es  a screen created with the Screen Formatter.   The
"C3MemForm21" template is similar to a version 2.1 "Form
procedure using  the MEMORY file".   Therefore, it does not
automatically write any record to disk.   It  supports the
(non-CUA) version 2.1 keystrokes:

  CtrlEsc - Cancel
  CtrlEnter - Done
  Enter  Field complete or Done (on last field)
  Esc  Field return or Cancel (on first field)

<Formatter Support>
Formatter Support

The "C3MemForm21" procedure in CLARION.APP is pre-loaded  with
an empty screen layout.  Local data is generated before  the
screen structure.  If a pulldown structure has been  created
by  the Pulldown Menu Formatter, it is generated  after  the
screen  structure.   The  template makes  no  provision  for
opening  or  closing a pulldown menu, or  any  files.   Such
statements  must be entered as embedded source.   Statements
from the Formula Formatter  are generated at the top of  the
keyboard  loop before the field setup routines.  The  Report
Formatter is not supported.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
EbnnNoLimit   Reads records of an embedded browseat all times
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

See Formula Class for complete explaination of each formula.

<<C3Menu Template>>

The "C3Menu" template generates a procedure that displays  a
pop-up menu used to execute other procedures.  C3Menu  items
are placed on screen as BUTTON in the Screen Formatter.  The
procedure  associated  with  each button must  be  its  When
Button  is  Pressed Procedure.  At least  one  button  field
should  have a "RETURN" procedure call to exit the  "C3Menu"
procedure.

Other  fields  can be placed on the screen.   However,  this
template  makes no provision for accessing or updating  data
files.

<Formatter Support>
Formatter Support

The  "C3Menu" procedure in CLARION.APP is pre-loaded with  a
screen  layout containing a push-button named  "Exit".   The
"Exit" push-button calls the "RETURN" procedure.  The "Exit"
push-button can be renamed, but if it is deleted, some other
provision must be made to return from the procedure.

Local  data is generated before the screen structure.  If  a
pulldown  menu  has been created by the Pulldown  Menu  For-
matter, it is generated after the screen structure.   Howev-
er, the "C3Menu" template makes no provision for opening  or
closing a pulldown menu.  Such statements must be entered as
embedded source.

The Report Formatter is not supported.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for a complete explaination of each
formula.

<<C3Menu21 Template>>

The "C3Menu21" template generates a procedure that  displays
a  pop-up  menu used to execute other procedures.   This  is
provided for conversion of version 2.1 Menu Procedures.  The
difference  between  the "C3Menu" and  "C3Menu21"  procedure
Templates are their handling of the Esc and CtrlEsc keys.

C3Menu  items are placed on screen as BUTTON fields  in  the
Screen Formatter.  The procedure associated with each button
must be its When Button is Pressed Procedure.

Other  fields  can be placed on the screen.   However,  this
template  makes no provision for accessing or updating  data
files.

<Formatter Support>
Formatter Support

The "C3Menu21" procedure in CLARION.APP is pre-loaded with a
screen  layout containing a push-button named  "Exit".   The
"Exit" push-button calls the "RETURN" procedure.  The "Exit"
push-button can be renamed.

Local  data is generated before the screen structure.  If  a
pulldown  menu  has been created by the Pulldown  Menu  For-
matter, it is generated after the screen structure.   Howev-
er, the "C3Menu" template makes no provision for opening  or
closing a pulldown menu.  Such statements must be entered as
embedded source.

The Report Formatter is not supported.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for a complete explaination of
each formula.

<<C3MultiPage Template>>

The "C3MultiPage" template is designed to work in  conjunction
with  the  "C3PageOf"  procedure template.  The "C3MultiPage"
template  generates  a procedure that will  ADD,  CHANGE  or
DELETE a record from the procedures Primary data file.   The
template allows for multiple auto-increment key fields and
concurrency  checks  of multiple  memo  fields.

Relational   integrity  constraints are  enforced  from  the
Primary file down its relational tree, for all 1:MANY  rela-
tionships.   The C3MultiPage and the  C3PageOf templates are
designed  to  work together.  All file I/O is  done  by  the
C3MultiPage procedure.  Access to the C3PageOf procedures is
handled thru C3MultiPage.

The  C3PageOf  procedures are expected  to use the  same  data
file  as  the  MultiPage procedure.  C3MultiPage  passes  each
C3PageOf  procedure the (4) following parameters: the  current
Action (Add / Change / Delete / Check-Required), the current
Page  number,  the total number of Pages,  and  the  Message
describing the current update.

Ŀ
  C3MultiPage | ( First page of a multi-page data entry
               Form)
      Any 'C3PageOf' can be accessed directly from
      C3MultiPage by pressing the Alt key and the
      corresponding page number. Pressing the
      PageDown key from any page access the next
      available page. Pressing PageDown on the Last
      Page wraps around to the main (MultiPage) page.
   
   C3PageOf  (the page 2 procedure)
   C3PageOf  (the page 3 procedure)
   C3PageOf  (the page 4 procedure)
   C3PageOf  (the page 5 procedure)
   C3PageOf  (the page 6 procedure)
   C3PageOf  (the page 7 procedure)
   C3PageOf  (the page 8 procedure)
   C3PageOf  (the page 9 procedure)

The  template supports up to eight (8) additional pages.  he
C3PageOf  procedure  calls are all entered on the C3MultiPage
template's Procedure Properties window. Procedures named  in
he Page prompts must use the "C3PageOf" procedure template.

At  runtime the generated procedure tracks which  "C3PageOf"
procedures have been called. When the user presses 'Ok'  any
"C3PageOf"  procedure which has not yet been accessed by  he
user,  will  be  called in order  to  check  for  'Required'
fields.  The  C3PageOf procedure is called  and  immediately
laced  in  nonstop edit mode. If a required field  has  been
left blank, the user is notified and placed in edit mode.

Initial field values from the data dictionary are pre-loaded
during  an  ADD.  Range checking is generated from  he  data
dictionary definitions and is enforced during ADD r  CHANGE.
If an out of range condition exists the user is notified  of
the  valid range for the field, and the cursor is  laced  on
that field for editing.

The template generates lookups for accessing secondary files
here the relationship is defined as MANY:1.

The "Must be in File" automatic field validation is enforced
when  the  user selects OK.  If the value entered  does  not
exist  in  the specified file the user is  notified  and  is
placed back on the field.

If  the  application is set to SHARE  files,  the  procedure
enforces  multi-user  concurrency  checking  at  the  record
level.   If a conflict arises from two or more  workstations
attempting  to update the same record, the user's Screen  is
refreshed  with the record as changed by the other  worksta-
tion, the user is notified of the change, and placed back in
edit mode.

<Formatter Support>
Formatter Support

The  default  screen contained in CLARION.APP  has  a  local
variable  named LOC:Message placed at the top of  the  entry
screen.  This  variable is used to inform the  user  of  the
current action: Add, Change, or Delete of the record on  the
screen.   The message displayed is stored in CLARION.APP  in
the  global  variables  GLO:InsertMsg,  GLO:ChangeMsg,   and
GLO:DeleteMsg respectively.

The  programmer can enter his own messages on the  Procedure
Properties window. If any Prompt for a message is filled in,
it  will be used instead of the global values stored in  the
default .APP file.

The  default  screen also has two local variables  for  page
number display; LOC:Page and LOC:Pages. These variables  are
used  to display the current page (LOC:Page), and the  total
number of pages (LOC:Pages).

The template places an ALERT attribute for the Alt-# key for
each procedure named in the Page prompts.  Each page  proce-
dure cam be called by pressing Alt and the "Page's Procedure
number"  key. For example, Alt2 calls the  Page2  procedure,
Alt3 the Page3 procedure, and so on.

The  default  screen  has  three  buttons;  Ok,  Cancel  and
Next-Page. All three fields are required by the template.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
C3NOxxx -     Disables Inskey,DelKey,ChgKey or Message
EbnnNoLimit   Reads records of an embedded browseat all times
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

See Formula Class section for a complete explaination of each
formula.

<<C3PageOf Template>>

The "C3PageOf" procedure template is designed to work together
with the C3MultiPage template. C3PageOf is subordinate to Mul-
tiPage.   The C3PageOf procedure has no facility to  update  a
record on disk.  All file updates are handled by the
C3MultiPage template procedure.

A C3PageOf procedure's prototype in the MAP looks like:

ProcName(BYTE,*BYTE,BYTE,STRING)

The parameters passed from the C3MultiPage procedure are:

<Action,Page,Pages,Message>
Action,Page,Pages,Message

The C3PageOf procedures are expected to use the same data
file as the C3MultiPage procedure. C3MultiPage passes each
C3PageOf procedure the (4) following parameters: the current
Action (Add /Change /Delete / Check-Required), the current
Page number, the total number of Pages, and the Message
describing the current update.

At  runtime the C3MultiPage procedure tracks which "C3PageOf"
procedures have been called. When the user presses 'Ok'  any
"C3PageOf" procedure which has not yet been accessed  by the
user will be called in order to check for 'Required' fields.
The C3PageOf procedure is called and immediately placed   in
nonstop edit mode. If a required field has been left  blank,
the user is notified and placed in edit mode.

Initial field values from the data dictionary are pre-loaded
during  an ADD.  Range checking is generated from  the  data
dictionary definitions and is enforced during ADD or CHANGE.
If an out of range condition exists the user is notified  of
the  valid range for the field, and the cursor is placed  on
that field for editing.

The  template will generate lookups for accessing  secondary
files  where  the relationship is defined  as  MANY:1.   The
"Must  be  in File" automatic field validation  is  enforced
when  the user selects 'OK'.  If the value entered does  not
exist  in  the specified file the user is  notified  and  is
placed back on the field.

If  the  application  is set to SHARE files the C3MultiPage
procedure  enforces multi-user concurrency checking at  the
record level.

If  Relational  Constraints have been defined  in  the  Data
Dictionary, the code generated from the C3MultiPage template
enforces those constraints.

<Formatter Support>
Formatter Support

The  default  screen contained in CLARION.APP  has  a  local
variable  named LOC:Message placed at the top of  the  entry
screen.  This  variable is used to inform the  user  of  the
current action: Add, Change, or Delete of the record on  the
screen.   The message displayed is stored in CLARION.APP  in
the  global  variables  GLO:InsertMsg,  GLO:ChangeMsg,   and
GLO:DeleteMsg respectively.

The  programmer can enter his own messages on the  Procedure
Properties window. If any Prompt for a message is filled in,
it  will be used instead of the global values stored in  the
default .APP file.

The  default  screen also has two local variables  for  page
number display; LOC:Page and LOC:Pages. These variables  are
used  to display the current page (LOC:Page), and the  total
number of pages (LOC:Pages).

The  PageUp and PageDown keys will access the next or  prior
page  procedures.  The CtrlPgUp and CtrlPgDn keys will  call
the first or last page procedures respectively.

The   default   screen   has   four   buttons;    Base-Page,
Previous-Page, Next-Page, and Last-Page.  The Next-Page  and
Previous-Page  button fields are required by  the  template,
Base-Page   and  Last-Page  are  optional.    Pressing   the
Base-Page  button  will  return the user to  the  main  page
(C3MultiPage  template).  The Previous and Next Page buttons
call  the next or previous page procedures.   The  Last-Page
button calls the last page procedure defined on the
C3MultiPage procedure property screen.

If  a  Pulldown structure has been created by  the  Pulldown
Menu Formatter, it is generated after the screen  structure.
The  Pulldown is OPENed after the screen structure,  and  is
closed upon exit from the procedure.

The Report Formatter is not supported.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
C3NOxxx -     Disables Inskey,DelKey,ChgKey or Message
EbnnNoLimit   Reads records of an embedded browseat all times
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
PrimeKey      Stuff value into a key node
RelFill       Set/Override a parent child related value
Rel-UP        Auto prime related file key fields for update
SavePosition  Restores record pointer on return to browse

See Formula Class section for a complete explaination of each
formula.

<<C3Print Template>>

The "C3Print" template generates a procedure that prints the
report  created  with the Report Formatter.   This  template
makes no provision for accessing data files.  Fields printed
on the report reflect their value in memory at the time  the
procedure is executed. The "C3Print" template is intended for
printing messages or status reports.

<Formatter Support>
Formatter Support

The  "C3Print" procedure in CLARION.APP is pre-loaded with an
empty  report  layout.  Local data is generated  before  the
report   structure.   Formulas  are  generated  before   the
OPEN(Report)  statement.  The Screen and Pulldown Menu  For-
matters are not supported.

<Formula Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
SavePosition  Restores record pointer on return to browse

See Formula Class Section for a complete explaination of each
formula.

<<C3Pulldown Template>>

The "C3Pulldown" template generates a procedure that displays
a  pulldown menu used to execute other  procedures.   C3Menu
items are placed in the menu with the Pulldown Menu  Format-
ter.

Once  in  the Pulldown Menu Formatter, the  menu  selections
which  execute procedures must have the "Execute  procedure"
radio  button  selected and the procedure to  call  must  be
entered. Optionally, source code may be entered instead of a
procedure name by deleting any procedure name and  selecting
the  "Source"  push-button.  At least one menu  item  should
have  an edit procedure of "RETURN" to exit the "C3Pulldown"
procedure.

The  code  generated by the  "C3Pulldown" procedure template
operates  like  code generated from the  "C3Menu"  procedure
template. Therefore, the template disables all the fields in
any screen that is active and closes the pulldown menu while
its selected procedures are executing.

A pulldown menu that is designed to work with a screen  must
be  created by the Pulldown Menu Formatter in the  procedure
that contains the screen.
<Many Keys on a pulldown>
Many Keys on a pulldown

Declare the pulldown field using the same naming convention
as you would for a button implentation using buttons the
EQUATE LABEL and TOGGLE FIELD on the pulldown must be the
same that would be used on the button
MKx
   keyname without prefix
   position of locator filed in key structure (0 if none)

<Formatter Support>
Formatter Support

The "C3Pulldown" procedure in CLARION.APP is pre-loaded with
an empty pulldown menu.  Local data is generated before the
pulldown  menu structure.  At least one menu item must  con-
tain  a  menu  procedure of "RETURN" to  exit  the  pulldown
procedure. Formulas are generated at the top of the keyboard
loop  before  the menu item edit routines.  The  Screen  and
Report Formatters are not supported.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<<C3Redirect Template>>

The C3Redirect Template is a modified version of Clarion's.
C3  Templates enhance the C3Redirect features immensely this
includes  intelligent redirection with printer checking  and
BIOS calls.

The C3Redirect template creates a procedure which allows the
user  to  choose  a report's destination  at  runtime.   The
Template code itself is very basic -- all the  functionality
is provided in the default procedure in CLARION.APP.

There  are two local variables declared which are placed  on
the default screen design.  One selects the destination  and
the other names the disk file if FILE is the selected desti-
nation.  The  functionality of the procedure  is  completely
contained in the embedded source code windows for these  two
fields and the Ok and Cancel buttons.

Once  the  destination  is selected, it  is  placed  in  the
GLO:FileSpec global variable (as expected by the Report  and
View Templates).

<Formatter Support>
Formatter Support

The C3Redirect procedure in CLARION.APP is pre-loaded with a
default  screen design which allows the user to  select  any
LPT  or  COM  port, the SCREEN, or to name a  disk  file  to
receive report output.

The  Report and Pulldown Menu Formatters are not  supported.
Formulas are also not supported.

<Formula Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for a complete explaination of each
formula.

<Intelligent Redirection of Printing>
Intelligent Redirection of Printing

The redirection template now has a radio button that selects
what  level (if any) the redirect procedure  checks  printer
ports.

No  Checking  - The redirect procedure does  not  check  the
status  of the printer ports.  Normal radio buttons  are  in
effect.

Printer  Status  -  The redirect procedure  will  query  the
printer(s) to see if they are on line or not.

WARNING  - The Clarion Function Status() is used  for  this.
This function appears to have a problem with LPT3 as well as
all COM ports.

<BIOS Addresses in Redirection of Printing>
BIOS Addresses in Redirection of Printing

The  redirect  procedure  will query  BIOS  addresses  40:00
through  40:0E  to see if a port exists.  This  option  ONLY
CHECKS  FOR THE EXISTENCE OF A PORT, not whether or not  the
printer  is on line.  WARNING - Novell(tm) networks  "trick"
the BIOS into thinking there are 3 parallel ports available.
What  this means, is that LPT1 through LPT3  are  available,
regardless  of  the  current capture  command.  This  method
properly handles COM ports (all existing ports are listed as
available).

Developer Notes:

You may disable Screen and / or File by inserting:
DimRadio( ?Destination, 9 ) - For Screen.
DimRadio( ?Destination, 10 ) - For File.

<<C3Report Template>>

The "C3Report" template prints reports from one or  multiple
related  data  files.  File relationships, both  1:MANY  and
MANY:1,  are automatically handled with  some  restrictions.
The files used for the report are defined in the File  Sche-
matic  built in the File Schematic Definition  window.   The
first  file in the File Schematic is the Primary  file,  all
others are Secondary files.  A Secondary Child file  (double
right  arrow)  has a 1:MANY relationship with  the  file  to
which  it  is attached in the File Schematic.   A  Secondary
Lookup  file (single right arrow) has a MANY:1  relationship
with the file to which it is attached in the File Schematic.

The  template  recurses  through as many  levels  of  1:MANY
relationships as are defined in the File Schematic, starting
with  the  Primary file, going down the chain  of  Secondary
files  beginning with the first Child file of  the  Primary.
This  generates a set of nested LOOP structures  which  read
all related records from each file in turn.  The Body detail
band  is printed every time a record from the  lowest  level
Child file is read. A second Child file of the Primary  file
would  begin a second 1:MANY file chain -- this is not  sup-
ported by this template.

The Secondary Lookup (MANY:1) relationship is supported  for
multiple levels below the file (Primary or Secondary  Child)
to  which it is related -- a lookup will generate  a  second
lookup from it.

<File Schematic>
File Schematic

This File Schematic is directly supported:

   Primary
    \-D> Secondary (Lookup from Primary)
    |  \-D> Secondary (Lookup from Lookup)
    \-D> Secondary (Lookup from Primary)
    \->> Secondary (Child of Primary)
  \-D> Secondary (Lookup from Secondary Child)
  |  \-D> Secondary (Lookup from Lookup)
  \-D> Secondary (Lookup from Secondary Child)
  \->>Secondary (Child of Secondary Child)
\-D> Secondary (Lookup from Secondary Child)

This File Schematic is NOT directly supported:

   Primary
    \-D> Secondary (Lookup from Primary)
    |   \->>Secondary  (Child of Lookup) --
    |          NO Children of Lookups
    \->>Secondary (Child of Primary)
    |  \-D> Secondary (Lookup from Secondary Child)
    \->>Secondary (Child of Primary) -- NO 2nd Child chains

This template supports multiple Group Breaks per Primary  or
Secondary Child file.  The code to print the group break  is
generated  as a ROUTINE called from within the  nested  LOOP
structure after a record is read from the file for which the
group break is defined.

Record  filters are supported on the Primary and every  Sec-
ondary  Child  file  (see the Formula  Class  topic  below).
Multi-Up labels are supported -- they must be defined in the
Body Detail band.

<Formatter Support>
Formatter Support

The  "C3Report" procedure in CLARION.APP is pre-loaded  with
an  empty  report layout.  Line counter, Page  counter,  and
Report  Device variables are defined in local data, and  the
Report  Properties  window uses these local  variables  (the
line counter is required by the template).  'GENERIC  PRINT-
ER'  is  the default printer selected from  the  PRINTER.CTL
file.

If you place anything in the Title Page band and intend that
it  should print without first printing the Page Header  (or
Footer),  you  must check the ALONE attribute in  the  Title
Page's Band Properties window.

The  Screen  Formatter contains a default  screen  which  is
included  in  the  generated source code only  if  the  Show
Report  Progress box is checked.  The screen  contains  dis-
play-only fields for the Line Counter and Page Counter.  The
values  in these two fields are displayed after  each  PRINT
statement in the Report.

The Pulldown Menu Formatter is not supported by the C3Report
Template.

<Passing of Key Settings or Filters>
Passing of Key Settings or Filters

The  following file formats allows creating files  that  are
not  really files. These files are never opened and have  no
keys,  even  if you declare them. The entire record  can  be
accessed  using  the PRE:record field.  These  files  enable
passing  filters,  key ranges and or key  values  between  a
browse  and  either reports and or batches. Passing  can  be
disabled  in individual procedures by checking  the  Disable
Glb Filters check box on the C3Report or C3Batch template
properties  screen. If this box is not checked, any  time  a
global filter is in effect a C3Report or browse is called  a
screen  will  appear asking if the user wants to  print  the
full list or the limited list. Done completely in the  back-
ground for BUTTONFILTERS and BUTTONRANGES.

 GD-Filters   pre gdf:   Enables passing of global filters.

 GD-KeyRange  pre gdr:   Enables the passing of key ranges.

Declare  2  fields  for each range. The low  value  must  be
declared above the high value. And the low value must relate
to the field it relates to in the file.

 GD-KeyEqual   pre gde:   Enables passing of key values.

Tags are handled automatically.

<Formulas Classes>
Formulas Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3FilterAnd   Filter on multiple field in secondary browse
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
FilterOnly    Use on secondary file in a report filter only
GLBPAS        Trigger prompt during global pass of filters
GLBTAG        Trigger prompt during global pass of tags
KeyEqual      View records based on several key fields
KeyRange      View records based on range of key values
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class Section for a complete explaination of each
formula.

<<C3-SaveProc Template>>

The SaveProc template allows you to suspend an incomplete
procedure which is not compilable to compile the remainder of
the application.

Change the procedure template to C3-SaveProc.

From the Procedures Tree Move the select bar to the trouble-
some procedure.
Select  Edit in the Pulldown Menu.
Select  Change  Template.
Choose the C3-SaveProc.

<Suspending Troublesome Procedures>
C3-SaveProc Template
Suspending Troublesome Procedures

Overview:  The basic purpose of this procedure is to  enable
the programmer to set aside a procedure that is not finished
while continuing to work on other areas of the  application.
Often times programmers are working on enhancements to their
application  and  a customer trouble report comes  that  re-
quires  going  elsewhere in the application,  modifying  and
compiling.   Normally you must remove the procedure that  is
incomplete or go to another copy of the application to  work
on the trouble.  With the C3Save-Proc this is not necessary.
You simply make the incomplete procedure a Save-Proc and the
application will compile and run so long as that is the only
procedure  with  errors.  If not simply convert all  of  the
erroneous procedures to Save-Proc procedures.

Setting aside the procedure is the best functional  descrip-
tion  of  this feature because later you  can  convert  this
procedure back to it's original type and continue your work.

WARNING - TIP:  The warning is when you get ready to convert
the template back to it's original form, make sure that  you
convert it back to the same type that it originally was.  If
you  don't you can lose a lot of your work.  It is always  a
good  idea  to back up your application before  you  do  any
changing of templates.  Lastly if you use a standard  naming
convention  such as C3B-CustList where the C3B represents  a
C3Browse  table, it will be easy to determine what  type  of
procedure it originally was.

Using the C3-SaveProc

Instructions:  This  is one of the  simplest  procedures  to
implement,  it is one of the 'black boxes' of the C3D  envi-
ronment.   When you are in the procedures work sheet,  high-
light  the erroneous procedure and then go to the Edit  menu
then  select  Change  Template.  Change the  template  to  a
C3Save-Proc  and your done.  Providing this is the only  you
have converted all of the erroneous procedures to  Save-Proc
procedures  you will be able to make and run  your  applica-
tion.

<Formulas Classes>
Formulas Classes

No formula classes available for this template

<C3-SaveProc WARNING!>
C3-SaveProc WARNING!

WARNING:  Make sure that you get the correct procedures.  If
you  accidentally choose the wrong procedure and  convert  a
Browse to the C3Select or some other procedure you could
loose  a  lot of work.  Vice-Versa when you  are  converting
back  from  the C3-SaveProc if you do not choose  the  exact
same  type it was before the change you can loose a  lot  of
work.   Make  frequent backups of you .app  files  to  avoid
problems.

When  you compile, the procedure will be saved, but no  code
will be generated. Later, when you are ready, you can change
the template back and correct it.

Suggestions

When  converting applications from 2.1 to 3.0, you are  par-
ticularly likely to run into errors that prevent compilation
(3.0 checks syntax much more carefully than 2.1, as a native
code .OBJ compiler, it must). C3-SaveProc will allow you  to
"rem" out entire procedures and "fix" them one at a time.

<<C3Screen Template>>

The "C3Screen" template generates a procedure that processes
a  screen created with the Screen Formatter.   The  template
generates  code  for Range checks and enforces 'Must  be  in
File' from the dictionary.  The "C3Screen" template is intend-
ed  for displaying status windows or updating memory  varia-
bles.

<Formatter Support>
Formatter Support

The "C3Screen" procedure in CLARION.APP is pre-loaded with  an
empty  screen  layout.  Local data is generated  before  the
screen structure.  If a pulldown structure has been  created
by  the Pulldown Menu Formatter, it is generated  after  the
screen  structure.   The  template makes  no  provision  for
opening or closing a pulldown menu.  Such statements must be
entered  as  embedded source.  Statements from  the  Formula
Formatter  are  generated at the top of  the  keyboard  loop
before  the field setup routines.  The Report  Formatter  is
not supported.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

AutoMouse     Perform field lookup on mouse click
C3Lookup      Auto Lookup from form
FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<<C3Source Template>>

The "C3Source" template generates a procedure comprised   only
of embedded source code.  All executable statements in the
procedure,  must  be entered at the  embedded  source  point
labeled  "All  Executable Source Code". The  source  entered
must  contain  (at least) a RETURN statement.  The  "C3Source"
template is intended for procedures that cannot be generated
by any other template.

<Formatters Supported>
Formatters Supported

The  "C3Source"  template  does not  support the Application
Generator's  Screen, Report, Pulldown Menu, or Formula  for-
matters.   However,  the Text Editor's Screen,  Report,  and
Pulldown  Menu  Formatters  can be  invoked  while  entering
embedded source in the Data Section.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<Source Template - Function or Procedure>
Source Template - Function or Procedure

The SOURCE template can be either a procedure or a function.

<<C3Table21 Template>>

The  "C3Table21" template generates a procedure that scrolls
data  files  on the screen like a spreadsheet.   Unlike  the
List or Browse templates, the Table uses a REPEAT  structure
instead  of  a  list box.  Table is similar  to  the  Browse
template,  but allows you the flexibility of coloring  indi-
vidual  screen fields and displaying  multi-line  individual
records.

The C3Table21 Template is provided for compatibility with the
Clarion  Professional  Developer  version  2.1-style   TABLE
procedures.   When  you  import a  TABLE  procedure  from  a
2.1  .APP file, this template is used but the BUTTON  fields
in the default screen design are not generated  (maintaining
2.1  compatibility).  Keystrokes  for  insert,  change,  and
delete  will be retained. BUTTON fields are  supported,  but
are not created in the conversion process.

A  C3Table21  procedure receives an omittable BYTE parameter
that  defines  the procedure's use  at  runtime:   "Standard
mode" or "Select mode."

"Standard mode" means no parameter was passed. Therefore, the
procedure acts the same as all other Browse-type procedures:
when the user presses Enter on a highlighted record, the Update
Procedure is called; the Delete and Insert buttons are active;
and, if a Select button exists, it is dimmed.  This duplicates
the action of a version 2.1 TABLE that is not called as a
"lookup."

"Select  mode" means a value of four (SelectRecord = 4)  was
passed  as the parameter and allows the Select button to  be
active.   When an item is selected, its record is read  from
disk  into the record buffer and the C3Table21  procedure  re-
turns to the calling procedure.  This duplicates the  action
of a version 2.1 "lookup" TABLE.  The hot key for the Change
and Select buttons should be EnterKey.

<Formatter Support>
Formatter Support

The C3Table21 procedure in CLARION.APP is pre-loaded with a
screen  layout  with a REPEAT structure containing  a  POINT
field  and push buttons named "Insert," "Change,"  "Delete,"
and  "Exit." These buttons are not created when importing  a
2.1 TABLE from a 2.1 .APP file.

If  a  pulldown structure has been created in  the  Pulldown
Menu Formatter, it is generated after the screen  structure.
The  template  makes no provision for opening or  closing  a
pulldown menu.  Such statements must be entered as  embedded
source.

The Report Formatter is not supported.

<Formula Classes>
Formula Classes

C3 provides a variety of formula classes and buttons
for this template. They are:

Feature       Description

FileOpen      Opens a file not in procedure schematic
LU-SET        Set values for fields prior to lookup
RelFill       Set/Override a parent child related value
SavePosition  Restores record pointer on return to browse

See Formula Class section for detailed explaination of each
formula class.

<<C3View Template>>

The  C3View  Template  displays any ASCII  text  file  in  a
scrolling list box. It is normally used to display a  report
to  the  screen that was previously written  to  disk.   The
C3View  template may be used to create a procedure which  is
the Next Procedure of a File template.  This will allow  the
user  to  select  a file to view from a  list  of  available
files.

The text will scroll up or down using the up and down  arrow
keys  or the vertical scroll bar. Pressing the  right  mouse
button in the top half of the list box scrolls up and in the
bottom  half scrolls down. Left and right scrolling is  sup-
ported  with  END, HOME, the horizontal scroll bar,  or  the
left and right arrow keys.

The  DOS  File definition is defined in the  template.   The
record (one line of the report) is defined with a length  of
255.

If "Progress Indicator" is checked on then a message will be
displayed to the user while reading the file from disk. This
is recommended for larger reports to let the user know  that
the  program  is still active while reading  the  file  from
disk.

While reading the file from disk, the scrolling keys may  be
used (PgUp, PgDn, Up, Dn, etc...) to scroll the queue.   The
mouse  cursor will not be active until the entire  file  has
been read.

No changes are required in the Screen Formatter or the  Data
Section.  To use the template, just indicate the name of the
DOS file to display.

<Formatter Support>
Formatter Support

The  Screen Formatter is available for this template and  is
pre-loaded  with  a default SCREEN.  The LIST box  and  Exit
button  are required.  The LIST box may be resized or  posi-
tioned.

The SCREEN has three push buttons: "Exit," "Print" and "25/50
Mode." The Exit button is required and maynot be removed. The
field equate label must be ?Exit.

The  Print  button prints the file being  viewed.   A  print
device  field is activated to allow the user to  select  the
output device.  If the Print button is deleted, the PrintDe-
vice field must also be deleted.

The  25/50 Mode button attempts to toggle the  current  text
mode  between 25 and 50 line mode.  The SCREEN will  be  re-
opened  in the new mode and the list box will  be  expanded,
since  the screen structure in the default application  file
has an EXPAND attribute with row 10 identified as the row to
duplicate.  Since the SETTEXT command is used, the mode will
be changed to the closest match.  For EGA systems the  clos-
est match to 50 line mode will be 43 line mode.  This button
may  be removed from the SCREEN structure to  disable  video
mode switching.

The Report Formatter is not available.

<Formula Classes   None>
Formula Classes    None

<<TPC3Fax Template>>

C3  Fax  is  one of the applications which  uses  the  other
products file.  If your not familiar with the other products
file please see the section on other products file for  more
information.

Requirements:

You need to have a legal copy of C3 Fax  from C3 Developement
Inc.

Implementation:

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party Product support under general help.

1.   To   use  C3fax your applications,  copy   the   other-
     products file from the C3FILES.DCT in the c3d subdir and
     change the field name from C3fax to C3faxON.

2.   Create  a  procedure of any name and  use  the  TPC3Fax
     Template to create the procedure. From there follow the
     instructions which comes with C3 fax for quick and easy
     faxing.

3.   Call this procedure where ever you need the fax support
     as if manually implemented.

<<TPFaxTools Template>>

Fax  Tools is one of the applications which uses  the  other
products file.  If your not familiar with the other products
file please see the section on other products file for  more
information.

Requirements:

You need to have a legal copy of Fax Tools from Keystone
Computer Resources.

Implementation:

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party  Product  support under general help and  the  product
documentation.

1.   To  use FaxTools your applications, copy   the   other-
     products file from the C3FILES.DCT in the c3d subdir and
     change the field name from FaxTools to FaxToolsON.

2.   Create a procedure of any name and use  the  TPFaxTools
     Template as the basis for the new procedure.

3.   Call  the  procedure in the  manner  described  in  the
     documentation that comes with the product.

<<TPLaserTools Template>>

Requirments:  You need to have a legal copy of LaserTools by
Database Technologies.

C3  Templates currently support versions 2.3 and  later  for
earlier  versions  use the methods described  in  the  Laser
Tools Manual.

Implementation:

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party Product support under general help and the  documenta-
tion that comes with the product.

To  use Laser Tools From Clarion in your applications

1.  Create a procedure of any name and use the  TPLaserTools
    Template as the basis for your new procedure.

2.  Call   the  procedure in the  manner  described  in  the
    documentation that comes with the product.

<<TPMemoEdit Template>>

BobCat's Memo Edit Support

The  implementation  of this feature is a  little  different
that  most of the others for several reasons.  First off  it
requires  that certian files exists, not for just some  fea-
tures,  but for the template itself to function.  Note  that
you need to download the MED300.ZIP file from CSERVE or some
other  source in order for this template to work.   However,
don't  spend too much time reading the instructions  because
implementing  this  feature is extemely easy  from  C3  Tem-
plates.

Restriction: The Memo Field must be on a C3 Form Type proce-
dure such as a C3Form, C3MultiPage, C3PageOf or C3Form21.

Before you even start trying to implement this feature  make
sure  you have done the following:

1.  Make sure you have a copy of BobCat's MED300.ZIP file.

2.  Copy all of BobCat's .DLL files to the \Clarion3\ subdi-
    rectory or where ever you have your copy of Clarion 3.

    NOTE: These .DLLs and .LIBs do not exist in the original
    package from BobCat, you simply have to compile the Memo
    Edit Demo to create these for the memory model  you  are
    using.

3.  Copy   all of BobCat's .LIB files to  the  \Clarion3\LIB
    sudirectory.

4.  Copy into application subdirectory from BobCat's  origi-
    nal files:

     memoedit.equ
     memoedit.dec
     memoedit.mod

The keys for running the Memo Edit are very similar to those
for  the Clarion Editor.  See the BobCat DOC file  for  more
information  on  using the field once implemented.   If  you
need  further Word Processing type support in your  applcia-
tion  see  this DOC file for more  information  on  BobCat's
Super Memo Edit.

The next thing you need to do is Import the C3 OtherProducts
file  from the C3FILES.DCT into the Data Dictionary for  the
application you wish to implement BobCat's Memo Edit.   This
file is located in the C3D subdirectory under your  Clarion3
subdirectory where ever that may be located on your  system.
You will notice that a couple other useful files are located
in this Data Dictionary as well.

                   Dictionary Editor
                     OtherProducts
Ŀ
Files:         Fields:                  Keys:          
Ĵ
Flag-Header    MemoEdit(STRING 1)       None         
Flag-Items                                           
GD-Tag                                               
OtherProducts                                        
                                     ĳ
                                      Relations:     
                                      None           
             Ĵ                
              Memos:                                 
               None              |               |   
                                                     

F1 for Help                   C:\CLARION3\C3D\C3FILES.DCT

While  you  are  in the data dictionary  access  the  Other-
Products  File  and seclect the MemoEdit field,  access  the
field  properties  screen  and change the  field  name  form
MemoEdit to MemoEditOn.

Exit and Save your dictionary and return to the  application
where  your are implementing the memo edit.  At  this  point
you need to create a new module.  Go to the Modules View and
press insert, give the module a name, something like  MemEdt
sounds  good.  This module will only contain  the  procedure
you  are about to put in it.  Now return to  the  Procedures
view.

Now press Insert to add a new procedure, give it the name of
MemoEdit,  choose the TPMemoEdit type of template, save  the
procedure and you are basicly done with the preliminary part
of getting the Memo Edit running.

The  only thing left to do is go to the C3 Type Form  proce-
dure  which  contains  the memo field you wish  to  use  and
perform the following:

Bring  up  the field properties screen on the form  for  the
memo  field  and in the prodedure call area "When  field  Is
Completed" type in MemoEdit.  On the very next line for  the
return  procedure  you need to specify the  row  and  column
value as follows:

When Field is Completed: MemoEdit

Rrrrrcc   Where rrrr is the scroll rows.
          Where cc is the number of display columns.

RETURN: R005065

This  would  provide 50 rows which could be scrolled  at  65
columns wide.  This does not have to be the same  parameters
as  the definition in the Data Dictionary.  Comile  and  run
should work now.

<<TPNetTools Template>>

To  use Net Tools your applications

Requirments:   You  need to have a legal copy of  Net  Tools
from Keystone Computer Resources.

Implementation:

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party Product support under general help.

1.   Create a procedure of any name and use  the  TPNetTools
     Template for the basis for the new procedure.

2.   Call  the procedure as if you had created it  with  the
     instructions in the documentation that comes with Net
     Tools.

<<TPSBTools Template>>

C3  Fax  is  one of the applications which  uses  the  other
products file.  If your not familiar with the other products
file please see the section on other products file for  more
information.

Requirments:  You need to have a legal copy of Sound Blaster
Tools from Keystone Compuater Resources.

Implementation:

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party Product support under general help.

1.  To  use Sound Blaster Tools your applications, copy  the
    otherproducts file from the C3FILES.DCT in the c3d subdir
    and change the field name from SBTools to SBToolsON.

2.  Create   a procedure of any name and use  the  TPSBTools
    Template as the basis for the new procedure.

3.  Call   the  procedure in the  manner  described  in  the
    docu-mentation that comes with the product.

<<TPWpTools Template>>

Word Perfect Tools is one of the applications which uses the
other  products file.  If your not familiar with  the  other
products file please see the section on other products  file
for more information.

Requirments:  You need to have a legal copy of Word  Perfect
Tools from Keystone Computer Resources.

Implementation

Ensure  that  your have installed the product  so  that  the
Clarion compiler can find the product.  See section on Third
Party  Product  support under general help and  the  product
documentation.

1.   To   use WPTools your applications, copy   the   other-
     products file from the C3FILES.DCT in the c3d subdir and
     change the field name from WPTools to WPToolsON.

2.   Create  a procedure of any name and use  the  TPWPTools
     Template as the basis for the new procedure.

3.   Call  the  procedure in the  manner  described  in  the
     documentation that comes with the product.

<<Procedure Properties>>

Detailed  description  of Prompts - For More  help  on  each
template  select  the [SECTIONS] button below.  To  find  a
particular prompt Quickly, select the [TOPIC] button below.
<Action after ADD>
Action after ADD

The template supports multiple adds without leaving the FORM
screen.  There are four possible actions after an ADD:

'Return to caller ' generates code to return to the  calling
procedure after the record is added.

'Retain  Record  ' generates code to allow  continuous  ADDs
without  clearing the record buffer or the screen. When  the
user  selects the 'Ok' button the record  buffer's  contents
are  ADDed  to the file and the user is placed back  on  the
first entry field on the screen. If there are Auto-increment
keys  defined  for the file, the record is saved,  the  next
Auto-number is retrieved, then the record is restored.

'Clear Record ' generates code to allow continuous ADDs  but
clears the record buffer and screen between each ADD.   When
the user selects the Ok button the screen and record  buffer
are  cleared and the user is placed back on the first  entry
field  on the screen. If there are Auto-increment  keys  de-
fined  for the file, the next Auto-number is  retrieved  and
the screen updated.

<Action for Batch>
Action for Batch

The batch process may either change or delete records.

'Change' will PUT each selected record.
'Delete' will DELETE each selected record.
'No Action' will not PUT or DELETE the records.

<Allow Break Hot Key>
Allow Break Hot Key

This allows for the assignment of a hot key which will break
the  user out of an errantly run batch procedure or  may  be
implemented in the future on other C3 Procedures.

<Allow Drive Searches>
Allow Drive Searches

If  checked, the list of directories will also  contain  all
the  current  DOS drive letters.  This allows  the  user  to
search for the file on any valid drive.

<Beginning file mask>
Beginning file mask

A  beginning  file mask may also be entered to use  for  the
opening file list. The files will be sorted within the mask.
If no match for the file mask is found, the text 'NO  MATCH'
will appear in the file list box.  If no Beginning File Mask
is entered the default file mask '*.*' will be used.

<BIOS Addresses C3>
BIOS Addresses

This  is  a second method of checking for  a  printer  port,
except this is checking at the BIOS address level.  This  is
capable of detecting network redirection of printing provid-
ing  the network or network printer software which is  being
used redirects printer ports in the standard manner.   Check
this  box  if  you want BIOS level port  detection  in  your
application.  Once again this will provide disabling of  non
existent printer ports.

<Bit  Map Field File>
Bit  Map Field File

This  entry  area is used to specify the file that  the  bit
mapped  switch  field  (LONG) is located.   This  tells  the
procedure when it updates the Switches, which file  contains
the field to be updated.

<Bit Map Field>
Bit Map Field

Now we get to the field name of the bit mapped switch field.
This  Entry  area  is used to specify  the  field  that  the
List-Bit procedure is to update in the file which is  speci-
fied in the Bit Map Field File area.

<Blank Name On Cancel>
Blank Name On Cancel

If checked, the variable you named as the Filename  Variable
(above)  will  be blanked when the user selects  the  Cancel
button.   When no Filename Variable is specified,  GLO:File-
Spec (the default filename variable) is blanked.

This option is useful when using a C3File template without a
Next  Procedure.  In this case, it is possible to detect  if
the  user  has  not selected a file by  checking  the  value
contained in the Filename Variable (or GLO:FileSpec).

<Check Files C3>
C3 Check Files

Check  this box if you want Clarion to check your  files  at
the  beginning of operation. You would then place the  files
to  be checked in the files area of the template. The  check
merely  checks for the existence of the files and  validates
them.  The validation process consists of opening and  clos-
ing  the  files, this will add to  the  application  startup
time.

<Check Printer Status>
Check Printer Status

This feature is designed to customize the intelligent  redi-
rection  of printing built into C3 Templates.  If  you  have
special  features  to  take into account,  such  as  network
printing, these features come in handy.  See the section  on
printer redirection for more details.

No  Checking - This is useful on some non standard  printers
which you are having difficulty talking to.

Printer  Status - This resembles standard  clarion  function
thus checks the status of the printer before printing.

BIOS Address - This feature is designed more towards network
printing where you are not checking a local printer port.

<CLEAR Record First >
CLEAR Record First

Check  this box to issue a CLEAR statement for  the  Primary
file  before  the SET statement which  initiates  sequential
processing.  This allows you to choose between  initializing
key  fields  in  the  C3Report  procedure,  or  calling  the
C3Report  from  another procedure which allows the  user  to
select or input the correct key field starting values.

<Copy field hotkey>
Copy field hotkey

This  prompt is dependent on the 'Retain-Record' button.  If
'Retain  Record'  is selected, AND the 'Copy  field  hotkey'
contains  a  hotkey value, the template generates  code  for
repeated  ADDs that allows the user to duplicate  individual
fields  from  the  prior  record only  when  the  hotkey  is
pressed.

When  the user presses the Ok button, the screen fields  are
erased and the cursor is placed back on the first field.  If
the  user  presses the defined hotkey the  contents  of  the
currently highlighted field are copied from the last  record
the user added.

<Default Access Mode>
Default Access Mode

This  specifies that files will be accessed in  the  default
access  mode.   The default accessmode is specified  in  the
Global Properties Area under the source are on C3 Templates.

When  Shared  files  are specified, all data  files  in  the
application are OPENed in shared access mode 42h (Read/Write
Deny None) instead of exclusive access mode 22h  (Read/Write
Deny Write).

This  feature allows you to be more specific with  reference
to  allowing  specific  read/write  privileges.

<Description>
Description

Same as standard Clarion, Enter a description of this proce-
dure,  this will be included in the .CLA files to help  pro-
duce self documenting code.
<Disable Glb Filters>
Disable Glb Filters

C3 Templates has the ability to set up global filters,  this
might  come  in handy for a security system where  you  only
wanted  certain people to access certain data.  However,  if
you  designed a procedure where you wanted everyone to  have
access to it the easiest way would be to disable the  global
filters for this procedure.

<Disable Glb Hotkeys C3>
C3 Disable Glb Hotkeys

This allows for the disabling of the global hot key function
for this procedure only.  If you do not define a global  hot
key you need to change this.

<Disable Kyb Macros>
Disable Kyb Macros

This  allows for the diabling of any keyboard  macros  which
may  be  defined  for this procedure only.  If  you  do  not
define  keyboard macros you will not need this feature  what
so ever.

<Disable Memo Access>
Disable Memo Access

Disable  Memo Access If the file being "Browsed" has a  Memo
field  you can improve the performance of the Browse  proce-
dure by turning off the reading of memo fields.

<Disable RI Logout>
Disable RI Logout

(Not Available on C3 Templates)

If  multiple  CONSTRAINED relations exist  between  any  two
files processed by the Referential Integrity code, when this
code  is  processed your program will experience  a  Clarion
Run-Time  halt, Cannot Logout Files.  Check the  Disable  RI
Logout Check-Box to stop the RI code from generating.  NOTE:
ANY RI TRANSACTIONS will not be recoverable if an error
occurs.

<Disable Tags>
Disable Tags

Tags can be passed from one browse to another browse,  batch
or report.  If you do not want existing tag sets to effect a
procedure, then simply turn on this switch.

<Display Key>
Display Key

If using one key for entry field validation and another  key
as the display key, enter the name of the display key  here.
Otherwise, leave this field blank.

<Enable ESC Key Abort>
Enable ESC Key Abort

Check  this box to include code to allow the user  to  abort
the C3Report at runtime by pressing the ESC key.

<Enable Hot Records>
 Enable Hot Records

Fields  from the file being scrolled can be  placed  outside
the  List  box.   The fields will display  values  from  the
record that is highlighted in the List box, and are  updated
whenever  the highlight bar is moved. Hot fields  should  be
set as "Display only" when placed on the screen.

If  "Enable Hot Records" is checked, every movement  of  the
highlight  bar reads the record from the Primary  file  into
memory.   Next,  lookups  to the "ONE" side  of  any  Many:1
relations  are performed. Any FORMULAs which do not  have  a
formula  class set to (FILTER,AVG,SUM or CNT) are then  exe-
cuted.  Finally, any embedded source code which was  entered
in the 'Process Selected Record' code window is executed.

<Enable Total Embeds>
Enable Total Embeds

 (Not available on C3 Templates)

See C3 Templates total features for this function.

<Enviro Path Vari C3>
C3 Enviro Path Vari

If  you want to make your application use a DOS  environment
variable  for  a path you can use this field to set  up  the
environment variable name.  Don't Forget that you will  have
to  specify the path in the Autoexec.bat file.   (Manual  pg
3-44.)  ie.  C:\MYAPP

<Exit on Null Parent>
Exit on Null Parent

Since  the parent record information is critical to  finding
the correct children for a parent, you may select to  RETURN
from  the  child procedure when no parent  record  has  been
selected.  You  may enter embedded source code to  select  a
parent record and leave this check box blank.

<File Access Mode>
File Access Mode

When  Shared  files  are specified, all data  files  in  the
application are OPENed in shared access mode 42h (Read/Write
Deny None) instead of exclusive access mode 22h  (Read/Write
Deny Write).

This  feature allows you to be more specific with  reference
to  allowing  specific  read/write  privileges.   See  User:
Read/Write, and Other: Deny None for more information.

<File Extension>
File Extension

This allows you to change the default file extension on your
data  files, perhaps you need to because of  conflicts  with
other data files, or you just don't like the default  exten-
sions.

<File to View>
File to View

This  is the ASCII file to be displayed in the list box.  It
may be a string constant or a variable. If it is a  constant
it should be enclosed in 'quotes'. If it is a variable,  the
variable  should be declared in the Global Data  Section  of
the program.

When left blank, a variable from the default application  is
used  (GLO:Filespec  in CLARION.APP).  This is the  same  de
fault variable used in the File template.

<Filename Variable>
Filename Variable

The  filename  may be saved in any string variable.  (It  is
suggested  to use STRING(64) since the path will  be  added.
DOS  allows  a 64 character filename.)  However,  a  default
variable  has been added to the global data of  the  Default
Application  file (GLO:Filespec in CLARION.APP) and it  will
hold the filename if the Filename Variable is blank.

<First Update Field>
First Update Field

The C3Child template has 2 separate modes of operation.  The
template selectively disables fields which are not appropri-
ate to the current mode.

Scrolling  Area - Only scrolling area field  are  available.
Field Entry Area - Only entry specific fields are available.

You  MUST enter the First Update Field here. This should  be
the first entry field for the Child file. This is  necessary
to  properly  ENABLE()  the range of fields  in  the  screen
structure  from this field to the Exit push-button.  If  the
fields  are  not consecutive in the Field List,  the  proper
fields  may not be ENABLEd or DISABLEd.  The easiest way  to
insure  consecutive  entry fields is to  Auto  Re-order  the
screen fields just prior to saving the screen.

<Incremental Locator>
Incremental Locator

Check  this box to indicate that the Locator Field will  act
function  as  an "Incremental Locator". You MUST  place  the
"Locator"  field AFTER the List box in the Field  List,  for
the incremental search to work correctly.

This  template option allows one-half second delay  for  the
user  to type a new letter into the locator field.  At  each
pause longer than one-half second, the Locator contents  are
used to locate the closest match (the Tab key does not  need
to  be  pressed). The backspace key is  active  during  this
process, and reverses the search.

*If  your Locator field is a Numeric field, you  should  add
the 'B'; to blank if zero, to the picture token.

An "Incremental Locator" doesn't wait for the TAB or a mouse
click  to  start the search for a matching  record,  instead
every half-second a search is made for the closest match  to
the contents of the Locator field. So if the user types  "S"
the first record with "S" is displayed on the first line  of
the  List box.  If the user then types "M" a search is  made
for  "SM"  and  the List box is  scrolled  to  that  record.
Typing a "Y" starts a search for "SMY", and so on.

Pressing the backspace key will reposition the highlight bar
in reverse order.   For numeric data types, it is recommend-
ed  to  use a string picture type  (for  display  purposes).
Date fields are not recommended for incremental locators.

<Initial Directory>
Initial Directory

Optionally,  an initial directory may be specified  for  the
opening  directory listing (like REPORTS).  The C3File  tem-
plate  will  call SETPATH() just prior to filling  the  list
box.  Another  SETPATH() will return to  the  original  path
before returning from this procedure.

<Input Field Picture>
Input Field Picture

Some  fields do not appear on screen in the same  format  as
the data exists in the file (and in the key).  These  fields
must  have an Input Field Picture to DEFORMAT the  data  for
validation  and  to FORMAT the selected data  for  on-screen
display.

Enter  the display picture to DEFORMAT the data for  valida-
tion.  This picture is also used to FORMAT the data to PRESS
it into the keyboard buffer and fill the entry field when  a
record is selected from this procedure's list.

Examples of fields which require an Input Field Picture:

Any  STRING,  CSTRING, or PSTRING with  an  implied  decimal
storage picture (for example, @N6v2).

Any  numeric  data field (LONG, DATE, USHORT, etc.)  with  a
date  (@D1,  @D2,  etc.) or time (@T1,  @T2,  etc.)  display
picture.

Any  numeric data field (REAL, BFLOAT, etc.) with a  display
picture  which  includes  a decimal  portion  (for  example,
@N6.2).

<Item Detail File>
Item  Detail File

This  field  hos the filename of the file  which  holds  the
items for the invocice.

<Item Detail Queue>
Item  Detail  Queue

this   is   the   name  of  the   MQ   File   (queue)   that
you created in the dictionary

<Item Detail Form>
Item Detail Form

The  procedure  name of the procedure that will  update  the
items, this will be an C3Inv-Item type procedure, using  the
C3Inv-Item template.

<Item Display Key>
Item Display Key

Place  the  key for the key order you want  to  display  the
items  in.  In other words this is only the display key  and
does not need to be the field which the primary relation  is
derived from.

<Inv Num Aft Commit>
Inv Num Aft Commit

Selecting  this  enables greater control over  your  invoice
numbers.   When entering a new invoice this will  not  write
anything  to disk or do any auto incrementing until  the  OK
button is pressed.

<Keep Pulldown Active>
Keep Pulldown Active

Check this box to keep the Pulldown structure active  during
the execution of a Pulldown option.

<Line Entry C3>
Line Entry

This checkbox allows you to use a form for a line entry on a
browse.  This means if it is NOT an Embedded Browse the form
will appear on the active line of the browse for update.  It
follows  the  active record so to speak.  If it  is  for  an
imbedded  browse update it will appear on the last  line  of
the browse thus you do not have to do any special  position-
ing.  See the section on Line Entry for further  implementa-
tion instructions.

<Load Clarion GUI>
Load Clarion GUI

This  checkbox tells the compiler whether to include on  not
include the necessary code to implement the GUI Kit.  If you
are  working  on  an application, it could  save  some  time
during  compiles and testing to turn this switch  off,  then
when you are done, simply turn it back on for full implemen-
tation of the GUI Kit.

<Locator Field>
Locator Field

You can place an optional "Locator" field on the Screen that
lets users find a specific record in the file.  If the  user
types  any letter while scrolling the LIST box control  goes
to  the Locator field.  The Locator field is completed  with
either  the  TAB key or a mouse CLICK  outside  the  Locator
field.  Once the "Locator" is completed the BROWSE procedure
displays the closest matching record at the first row of the
List box.

A  locator  field  is a screen entry field  that  updates  a
component  of  the primary file access key. When  a  locator
field  is entered, the closest matching record is  displayed
in the list box.  The Locator field is usually placed  after
the  List  box in the Field order list, you can  check  this
using  Ctrl-F in the Screen formatter.  Placing the  Locator
after the List box allows the List box to be filled as  soon
as the Browse is called, if the Locator is placed before the
List box the List will not be filled until the user TABS
off the List box.

For example, scrolling a vendor file in vendor name sequence
uses  a  key  that  contains the  vendor  name  field  (e.g.
VND:Name).   To create a vendor name locator field, place  a
VND:Name entry field on the screen before or after the  list
box, and enter VND:Name for the Locator Field on the  Browse
Property Screen.

At runtime, when the user is scrolling the List box,  typing
any character on the keyboard selects the locator field, and
allows  entry for the match. Pressing the Tab key  positions
the highlight bar to the closest match.

*If  your Locator field is a Numeric field, you  should  add
the 'B'; to blank if zero, to the picture token.

<Lookup Field>
Lookup Field

Enter  the name of the field to be used to validate  against
your entry field.  This field should be the only field in  a
single-component unique key.

<Lookup Hot Key>
Lookup Hot Key

When  the C3Validate procedure is being called by a  hot  key,
enter  the hot key here.  When a hot key is entered and  the
hot  key is detected upon entry of the  C3Validate  procedure,
the screen will be opened.  No validation check will be done
prior to the open of the screen.

<Maximum Line Length>
Maximum Line Length

Most reports will not be wider than 80 or 132 columns.  This
allows an opportunity to check for files which do not  typi-
cally have a carriage return / line feed combination in  the
first  X number of characters.  (like .EXE and  .COM  files)
The number entered here will be used to check the number  of
bytes  in each ASCII file record as it is read.  If  a  line
read has more than the number of characters which are speci-
fied  as  the maximum, an error window will appear  and  the
view will be aborted.  Typically for an .EXE file this  will
occur  in  the first record read and no  'garbage'  will  be
displayed  in  the list box.  If no Maximum Line  Length  is
entered, the default of 200 is used.

<Next Procedure>
Next Procedure

Enter the Procedure to call when this procedure is  finished
with  it's  processing. AFTER the file check  has  completed
without  any errors the Next Procedure call is generated  to
continue into the application.

<No Checking C3>
C3 No Checking

By  default the printer is checked by C3 templates first  to
see if the port exists and secondly C3 templates checks  for
some sort of printer response for the port.  You can disable
the  checking of ports by Selecting this option. If you  are
using  a  network this may cause problems.  However  keeping
this  selected will prevent the user from trying ports  that
do not exist and getting errors.

<Module Name>
Module Name

The  module  name  is  assigned  by  Clarion  upon   initial
creation,  however, if you need to group certain  procedures
into a module to declare module variables you can change the
name of the module.

The  initial module the procedure is assigned to  is  deter-
mined  by the number of procedures per module you  have  set
underneath your projects area.

<Optimize Tags>
Optimize Tags

This  switch allows for Tag Optimization where Batch  proce-
dures  will  process a batch of tagged records  much  faster
than without Optimize Tags.

<Other: Deny None>
Other: Deny None

When  Shared  files  are specified, all data  files  in  the
application are OPENed in shared access mode 42h (Read/Write
Deny None) instead of exclusive access mode 22h  (Read/Write
Deny Write).

This  feature allows you to be more specific with  reference
to  allowing  specific  read/write  privledges.

<# Page Procedure>
# Page Procedure

There  are eight (8) Prompts for additional pages. They  are
called in their numerical order, for instance the '2nd  Page
Procedure'  is  called  when the  user  presses  either  the
Next-Page  button, the Page Down key, or the Alt2 key.  Name
your  additional  Page  procedure calls  in  these  prompts.
These must be filled in consecutively -- you must not  leave
any "holes" in the list of "C3PageOf" procedure calls.

<Parameter List>
Parameter List

Enter the complete parameter list (including parentheses) to
be  placed  on the procedure's PROCEDURE or  FUNCTION  state
ment. This labels the passed parameters for reference within
the procedure.  For the above example, you could enter:

    (Fred,Joe)

The generated source code for the procedure would look like:

    MyProcFUNCTION(Fred,Joe)

In  your  executable code, you would  reference  the  STRING
parameter as "Fred" and the BYTE as "Joe."

<Parent File>
Parent File

The  Parent File MUST be supplied to identify  which  Parent
file  to use for the relationship.  The C3Child template  is
designed  to handle the relationship between 1 Parent and  1
Child file.

In order to insure that only 1 user in a multi-user environ-
ment  may modify a batch of child records at a time, a  HOLD
is  placed on the parent record. This will signal  to  other
C3Child  procedures  that the children for this  parent  are
currently being modified.

Other procedures will be able to read the parent record, but
will  not be able to modify it. Therefore, it  is  important
that  when  using a C3Child template procedure to  modify  a
file's records, that there are no other procedures which may
modify these child records. (Example: There must not be  any
Form  template  procedures which may modify a  child  file's
record while it is being updated via a Child template.)

<Path for file names C3>
C3 Path for file names

This feature works in conjunction with the Global properties
area where you select the length of the string to be  speci-
fied  here.  This allows you to store data files  away  from
you main code sub directory. Remember that the files must be
defined with a leading F- (Manual Pg 3-42.) in you  diction-
ary for this to function.  This facility can also be used to
specify  a path at run time.  You can have a  setup  program
run  prior  to initial program execution to  establish  data
paths etc...

    ie.  C:\DATA

<Picture for Line No.>
Picture for Line No.

<Primary File Access >
Primary File Access

Select the radio button which defines the type of access you
want  to the Primary file.  If you select Keyed  Order,  the
Primary file's Access Key set on the Field Selection  window
is  used to access the file and a Range Limit Field  may  be
specified.  If you select Record Order, the Primary file  is
accessed  in  physical, record-number, order and  any  Range
Limit Field is ignored.

<Printer Status C3>
Printer Status

This  is the second phase of printer checking and it  checks
the  status of the printer.  Check this box if you want  the
status of the printer checked before a report is sent.

<Procedure Name>
Procedure Name

You  can change the name of your procedure if  needed,  more
often  than  not the primary reason for  changing  names  is
mistyping the procedure name being created, thus it needs to
be changed so as to match the procedure name you are calling
elsewhere in the program.

<Progress Character>
Progress Character

You  may enter the ASCII character to be used as the  'bar.'
Easy  entry  of high order ascii characters may be  made  by
using  the  ASCII value found in the ASCII  chart  from  the
Tools  menu.  The ASCII value should be surrounded by  angle
brackets within single quotes.  The Default Application file
is pre-loaded with a shaded bar character '<176>'.

<Progress Indicator>
Progress Indicator

Checking  the  Progress Indicator Check box will  display  a
moving bar across the screen as records are loaded into  the
QUEUE.   The  bar is displayed in the  Local  Data  variable
named StatusLine which has been pre-loaded into the  Default
Application  file.   This line has also been placed  on  the
default  screen for the C3List template and must be  in  the
screen list after the list box.

<Prototype>
Prototype

Enter the procedure's prototype (all except the  procedure's
name)  to  be placed in the program's  MAP  structure.   For
example,  if your procedure is a FUNCTION called MyProc  and
it will receive two parameters -- a STRING and a BYTE passed
by address -- and return a STRING, you would enter :

    (STRING,*BYTE),STRING

See FUNCTION and PROCEDURE Prototypes in the Language Refer-
ence for a discussion of valid prototypes.

<Queue Rebuild>
Queue Rebuild

This  check  box causes the QUEUE to be rebuilt  after  each
call to the update procedure.  This is suggested when  using
shared  files,  or  when calling a form  with  multiple  add
capability.

<Range Limit Field >
Range Limit Field

The  "Range  Limit"  field  allows  a  subset  of  the  data
file   to  displayed  in  the  List  box.   The  subset   of
records  is  based  on the value  contained  in  the  "Range
Limit"  field.   The  "Range Limit"  field  is  a  component
of the "Access Key".

If  you  place  the "Range Limit" field  on  the  screen  as
an  entry  field,  it  allows the user  to  assign  the  KEY
field  a  value  and  "limit"  the  records  displayed.   If
you  don't  place  the "Range Limit"  field  on  the  screen
you  will  have  to provide a value for  the  "Range  Limit"
in an Embedded Source point such as "Setup Screen".
You  can  also  use both "Range  Limit"  and  "Range  Value"
fields.   The value in the "Range Value" field  is       as-
signed  to the "Range Limit" field when the  Browse       is
started.

<Example using a Range Limit as an Entry field:>
Example using a Range Limit as an Entry field:

If  you  have  two files; INVOICE and ITEMS,  and  you  want
to  Browse  all  ITEMS  for  a  selected  INVOICE,  you  can
"limit"  the  records  shown  in the  Browse  of  the  ITEMS
file.

If  the  Browse  "Access  Key"  for  the  ITEMS  file  looks
like this:

              ITM:InvoiceKey        !Key for ITEMS file
                 |- ITM:InvoiceNo   !Invoice Number
                 \- ITM:Line        !Line number on Invoice

To   "Browse"  the  ITEMS  for  a  single  Invoice,   select
ITM:InvoiceNo  as  the  "Range  Limit"  field.   Now   place
ITM:InvoiceNo  as  an  Entry  field  on  the  Browse  screen
before  the  List  box.  When the  Browse  is  executed  the
user can enter an Invoice number, and after hitting the  TAB
key, the List box will be filled with ITEMS for the  Invoice
number the user entered.

If the Browse "Access Key" is a multi-component KEY, and you
want  to use the entire KEY to limit the Browse, select  the
last component of the KEY as the "Range Limit" field.

If  you  place  all the KEY fields on the  screen  as  entry
fields,  the  Browse  can  be  "limited"  by  the  user   at
runtime.    Alternatively,   you  can   use   the   embedded
source  code  window  "Setup  Screen",  to  prime  the   KEY
components.

<Range Value Field C3>
Range Value Field:

The  major modification to the range value field is that  it
will  now  accept constants.  This saves a lot of  time  not
having to create a local variable and initializing it with a
value.

The  "Range  Value" field is used in  conjunction  with  the
"Range  Limit" field.   When a Browse is started, the  value
in the "Range Value" field is assigned to the "Range  Limit"
field. This "limits" the Browse without having to place  the
"Range Limit" field on the Browse screen.

The "Range Value" field is typically assigned a value by the
procedure which calls the Browse.

The  "Range  Value" field cannot be the same  field  as  the
"Range Limit" field.

Example of Range Limit using Embedded Source:
Example of Range Limit using Embedded Source:

     The INVOICE file has the following KEY:

              INV:InvoiceKey        !Key for INVOICES file
                 |- INV:InvoiceNo   !Invoice Number
                 \- INV:Date        !Date of Invoice

You  can  use the Embedded Source window "Setup Screen",  to
assign a value to the "Range Limit" field.

Given the above KEY for the INVOICE file, you can Browse the
INVOICE  file, and display only the INVOICES that  were  en-
tered for a specific date.

To  view  all invoices for "today" in  the  embedded  source
window "Setup Screen", you would enter:

     INV:Date = TODAY()

<Example of a Range Value Field>
Example of a Range Value Field

You want to let the user Browse the INVOICE file, select  an
Invoice, and then Browse the ITEMS for the selected Invoice.

The Browse "Access Key" for the ITEMS file looks like this:

              ITM:InvoiceKey        !Key for ITEMS file
                 |- ITM:InvoiceNo   !Invoice Number
                 \- ITM:Line        !Line number on Invoice

The INVOICE file has the following KEY:

              INV:InvoiceKey        !Key for INVOICES file
                 |- INV:InvoiceNo   !Invoice Number
                 \- INV:Date        !Date of Invoice

Enter  the "Range Limit" field as ITM:InvoiceNo,  and  enter
the "Range Value" field as INV:InvoiceNo.  The Browse of the
ITEMS file is "limited" to the value of ITM:InvoiceNo, which
receives  its  value from the "Range Value"  field;  INV:In-
voiceNo.

The Browse of the INVOICE file is executed as a "lookup"  by
entering the following code in the "Setup Procedure"  Embed-
ded Source point:

SETKEYCODE(ShftEnter)     ! call the Browse with the
                          ! "Select" button active

The Browse of the INVOICE file allows the user to  highlight
an  Invoice  record,  then hit  the  "Select"  button.   The
"Select"  button  is used to call the Browse  of  the  ITEMS
file.

When  the  Browse for ITEMS is  executed,  INV:InvoiceNo  is
assigned  to  ITM:InvoiceNo.  The List box  is  filled  with
ITEMS for the INVOICE the user selected.

<Record Filter>
Record Filter

   GO TO TOPICS AND LOOK FOR THE SECTION ON BUTTON
   FILTERS AND BUTTONRANGES FOR MORE OPTIONS WITH
   C3 TEMPLATES ON LIMITING DISPLAY RECORDS.

You  can  display a subset of a data file using  either  the
"Range  Limit" field, or a Record Filter.  If the subset  of
the  file is based on a field value which is a component  of
the  "Access  Key" for the Browse, then  the  "Range  Limit"
field will provide the fastest performance. If the subset of
the file is based on a field which is not a component of the
"Access Key" then you will need to use a record filter.

You  can  use BOTH a "Record Filter:" and  a  "Range  Limit"
field.   This  will  give you the performance  of  a  "Range
Limited" Browse, but allow you to display a subset of  those
records.

There are 2 methods you can use to enter a record filter:

Method #1.

You  can use the Formula Generator to create a formula,  and
enter a Formula Class of 'FILTER'.  The code generated  will

"FILTER' the file based on your formula.

Method #2.

The  "Record  Filter:" entry field on the  Browse  Procedure
Properties  dialogue allows free-form entering of  a  record
filter  expression. The code entered here will not be  vali-
dated  before  a compile. Those who are not  fully  familiar
with  the Clarion Language should use the Formula  Generator
instead of this entry field.

<Filter embedded source point>
Filter embedded source point

Using the Filter embedded source point on a browse now allows
you to also control the record selection for Totals etc......

When using the Filter embed on the browse portion use the
following code structure to perform the filter action on the
List box and on the totaling.

IF NOT(FilterCondtion)
   IF ~Lby-InLoop
      GET(PrimaryFile,0)
   END
   CYCLE
END

The variable Lby-InLoop is set to 1 when you are in the total-
ing and formula loop. It is set to 0 when you are in the
primary browse loop.

<Record Order >
Record Order

Checking this box causes the template to ignore any key file
access information.  The following must be considered:

- The Access Key in the File Schematic will be ignored.
- Range Limits will not be used.

This option was created to allow the view of ASCII, DOS, and
BASIC files.

<Record Order Access>
Record Order Access

Checking this box causes the template to ignore any key file
access information.  The following must be considered:

- The Access Key in the File Schematic will be ignored.
- Range Limits will not be used.

This option was created to allow the view of ASCII, DOS, and
BASIC files.

<Redirect Procedure C3 >
C3Redirect Procedure

Enter  the  name of a procedure which is called  before  the
report is generated to allow the user to define the report's
destination  at runtime.  The C3Print Template assumes  that
the report's destination is in GLO:FileSpec (a global varia-
ble  defined in CLARION.APP) after the C3Redirect  Procedure
is  called.  Normally, the C3Redirect Procedure  is  created
from  the C3Redirect Template.

<Retain Tags on Exit>
Retain Tags on Exit

This checkbox tells the compiler whether to include the code
needed  to  hold the tag set in memory for  use  by  another
procedure.  If you enable this feture it will use some extra
memory.   See  the section on passing tags in the  help  for
more information on implementing this feature.

<Reselect Upon Return:>
Reselect Upon Return

If  a  Next Procedure is defined, an option is  provided  to
have one of the following occur:

1)  Return to the calling procedure after a return from  the
    update procedure. (the default)

2)  Allow  the  user to reselect another  filename  after  a
    return from the update procedure. (When the check box is
    checked.)

<Retain Tags on Exit C3>
C3 Retain Tags on Exit

If  you  wish to pass the tags set in this procedure  on  to
another procedure via the global tags function, select  this
box.

<Return String Len>
Return String Len

If you declare a return type of string on a source  template
using as a function you must enter the length of the  string
in  this promp.  This feature will return a string  of  this
length  to  the procedure which this  procedure  was  called
from.

<Return Variable>
Return Variable

Source  procedures under C3 templates can be either a  Func-
tion or a Procedure.  If you are using the source  procedure
for  a function you can put the return variable,  from  this
procedure, in this entry area.

<Reverse Order C3>
C3 Reverse Order

If  you  wish to use a strict reverse order  then  set  this
option.  You may wish to set this feature up as a hot button
at  run  time,  if so see the  demo  for  an  implementation
example.

Hot  Records  Must be enabled in order to  use  the  reverse
order function.

<Show Record Counter>
Show Record Counter

Check  this box to display a record counter as  the  records
have  been  successfully changed or deleted.   Displaying  a
variable on screen within the main process LOOP can slow the
batch process slightly.  Therefore, you may leave this check
box blank and have no screen updates within the LOOP.

<Show Report Progress>
Show Report Progress

Check  this box to display the screen defined in the  Screen
Formatter as the report is being generated.  This allows the
user  to  clearly  see that the report  is  being  generated
(especially if it is directed to a disk file).

<Sticky Menu>
Sticky Menu

Check  this  box to generate code that re-selects  the  last
menu  item  the user selected upon return  from  the  called
procedure.

<Sticky Pulldown>
Sticky Pulldown

Check  this  box to generate code that re-selects  the  last
menu  item  the user selected upon return  from  the  called
procedure.

<Template>
Template

This   indicates  the template that was used  to  create  the
procedure,  and also determines which code will be  included
at complile time, automatically, by Clarion.

<Update Call In Embed>
Update Call In Embed

This  allows  for further customization of  Embedded  proce-
dures.

<Update Parent on OK>
Update Parent on OK

With  this check box enabled, the parent record is PUT  back
to  its file upon completion of the OK button.  This  allows
updating  of  any  parent information which  may  have  been
changed while in the Child procedure.

<Update Procedure>
Update Procedure

Enter the name of the update procedure to be used to insert,
change,  or delete records.  If no update procedure  is  en-
tered,  the  "Insert", "Change", and  "Delete"  push-buttons
should be removed from the screen layout.

<Use Other Ok/Cancel C3>
C3 Use Other Ok/Cancel

You may now select the "Use Other Ok/Cancel" prompt when you
want  the  form to use the click on any OK or  CANCEL  shown
wheter on the active screen or not to complete or abort  the
forms current action.  This is handy when you have  embedded
browses  on a form and limited space. It will allow the  you
to use the main forms OK and SELECT button for the  embedded
browse update form.

<User: Read/Write>
User: Read/Write

When  Shared  files  are specified, all data  files  in  the
application are OPENed in shared access mode 42h (Read/Write
Deny None) instead of exclusive access mode 22h  (Read/Write
Deny Write).

This  feature allows you to be more specific with  reference
to  allowing  specific  read/write  privledges.

<View Procedure>
View Procedure

Enter  the  name of a procedure which is  called  after  the
report  is generated to allow the user to view the  report's
output  (if  the user selected the SCREEN or a FILE  as  the
report's  destination).   Normally, the  View  Procedure  is
created  from the View Template.  The View Template  assumes
that  the  report's output filename is  in  GLO:FileSpec  (a
global  variable defined in CLARION.APP).  If the  user  se-
lected  a printer port, the C3Print Template clears  GLO:File-
Spec, which disables the View Procedure.

<Warning Size (in K)>
Warning Size (in K)

The  C3View template will read the entire file into a  Queue
for runtime performance.  However, If you have a file larger
than  the assigned virtual memory block (Queue elements  are
saved in virtual by default unless virtual memory support is
turned off) the Queue may be written to disk.  This may
substantially  slow  the scrolling of the file.   A  warning
screen may be displayed when a selected file is larger  than
a specified size.  This size will be multiplied by 1024  and
compared against the actual file size.

<<Embedded Source>>

<After ADD on Retain or ClearRecord>
After ADD on Retain or ClearRecord

After  a record has been added and just before going  on  to
add another record in "recursive add mode."

<After Browse Action>
After Browse Action

This  point is directly after the browse action function  is
called.   The  variable Lby-Action can be used to  test  the
return value after the browse action.

<After File Naming>
After File Naming

Available  in C3FirstProc adn GUIFirstProc to be  used  when
you wish to manually control the name of a file.

<After File Open>
After File Open

This  is immediately after the files are opened, this  might
be a point to manually open a file or to test to see if  the
files are open properly etc...

<After Filter and Range Check>
After Filter and Range Check

After any record filter or Range limits are evaluated.

<After Final Page Before Close>
After Final Page Before Close

After  the Final Page has printed, but before the Report  is
closed.

<After Formulas Before Title Page>
After Formulas Before Title Page

After  the formulas are calculated, and before  anything  is
printed.

<After Formula Fields>
After Formula Fields

This  is  immediately  after any formula  fields  have  been
calculated,  this might be a good point to check the  values
of  these formulas, or a place to add other  formulas  which
are based on the results of the  formula fields.

<After Grand Totals Before Final Page>
After Grand Totals Before Final Page

After  the  Title  Page and Body Detail  have  printed,  but
before the Final Page.

<After NEXT in RptFile Loop>
After NEXT in RptFile Loop

In the loop that read the DOS file from disk, after the NEXT
statement.

<After Next Procedure>
After Next Procedure

You could have used the next procedure for a login procedure
and  checked  the  pass code.  Now you can  call  your  main
program, or write other code.

<After Open Files>
After Open Files

This  is immediately after the files are opened, this  might
be a point to manually open a file or to test to see if  the
files are open properly etc...

<After Primary LOOP before Grand Totals and Final Page>
After Primary LOOP before Grand Totals and Final Page

Code  placed in this window executes after all records  from
all  files have been processed, but before the Grand  Totals
and Final Page bands are printed.

<After Report OPEN before Formulas>
After Report OPEN before Formulas

After the report has been opened, and before any the Formula
fields are calculated and before anything is printed.

<After Report OPEN before Title Page>
After Report OPEN before Title Page

After  all files in the report are opened and the report  is
opened, but before anything is printed.

<After Total Field Loop>
After Total Field Loop

NOT  AVAILABLE IN C3 TEMPLATES - After all totals have  been
calculated.

<After Update Procedure>
After Update Procedure

Immediately after return from the Update Procedure.

<All Executable Source Code>
All Executable Source Code

All executable statements in the procedure must go in here.

<Base-Page Button Press>
Base-Page Button Press

Code  is  inserted  to execute as soon as  the  "Base  Page"
button  is  pressed,  before going into  non-stop  mode  and
returning to the main (MultiPage) procedure.

<Before Browse Action>
Before Browse Action

This point is before the browse begins if you need to set
paramaters before a browse action you could set them here>>>

<Before Clearing Tags>
Before Clearing Tags

When  leaving a procedure this is used before the  tags  are
cleared.  This is a good point to offer the user the  oppor-
tunity  to save the tag set as a flag set before  they  exit
and lose their tags.

<Before Closing Files>
Before Closing Files

Any special code you may desire can be included to be accom-
plished just before closing the files.  This embed is called
as a part of the procedures return routine which means  that
all of the processing has already been accomplished and  the
screen has been closed.

<Before Closing Screen>
Before Closing Screen

Any special code you may desire can be included to be accom-
plished  just  before  closing the screen.   This  embed  is
called  as  a part of the procedures  return  routine  which
means  that  all of the processing has already  been  accom-
plished.

<Before File I/O>
Before File I/O

Immediately before the record is written to disk (ADD, PUT,
or DELETE).

<Before File Open>
Before File Open

This is an extra point to hook in code, after the  procedure
has  checked global filters, tags, and local data.   If  you
wanted  to  give the user an option to change  his  mind  on
tagging,  or  filters, this might be a good time to  call  a
procedure like that.

<Before File SET() >
Before File SET()

Before  the  SET which will determine  the  file  processing
order.  This embedded source is the ideal place to fill  key
values for a multiple component key SET.

<Before Formula Fields>
Before Formula Fields

This Embed point is especially useful for making some adjust-
ment to a result just before the Formulas are calculated,
perhaps some checking to see if values are in range or such.

<Before Initial Set()>
Before Initial Set()

<Before LOOP >
Before LOOP

After  the  SET command but before the main  LOOP.  At  this
location  you may override the SET statement, or  enter  any
LOOP setup code.

<Before Next Procedure>
Before Next Procedure

What ever actions you may have during first procedure,  such
as  logins, you can conditionally make certain  decision  to
alter your program flow.

<Before Path Setting>
Before Path Setting

This  might  be  a good place to tie in  the  initial  setup
routine,  where  your  program setup files  are  empty,  run
setup.

<Before Primary LOOP after SET>
Before Primary LOOP after SET

After the SET statement which sets up the order and starting
point  on the Primary file, but before the LOOP which  proc-
esses the Primary file records.

<Before Return>
Before Return



<Before Validate Lookup>
Before Validate Lookup

After opening the primary file, you may enter source code in
this window to pre-fill any fields which will be used by the
lookup other than the Lookup Field.

<Beginning of Accept Loop>
Beginning of Accept Loop

This is just as the Accept loop starts.

<Build Dynamic Index>
Build Dynamic Index

This is before the Dynamic Index

<C3 Equates>
C3 Equates

This is where you can modify C3 equates at.  Each place this
appears  there are different equates avaialable for  adjust-
ments.  See the Global Settings section of help for most  of
the equate definitions.  Also they are located in the Appen-
dix section under C3Equates.

<Call to LoadGUI>
Call to LoadGUI

Her  is where you can manually type in the call to run  GUI,
you may want to put a video checking routine before  loading
GUI, you could do it here.

<Case of No Records Found>
Case of No Records Found

When no records are found to display.

<Computed Fields>
Computed Fields

Immediately after the any Formulas are calculated.

<Custom Routines>
Custom Routines

This  point is added to the end of the module after the  end
of procedure and is used to write your own routines. You can
then  call  these routines from within the module  and  that
includes other procedures which are within the module.

<Data Section>
Data Section

In  the data section of the procedure after local data,  the
screen and pulldown structures.  This may be used to declare
any  data  which you may want to use only in  your  embedded
source code.

<Detail Post-Print Code for: Detail>
Detail Post-Print Code for: Detail

This  is  an implicit embedded source code window  which  is
executed immediately after the Body detail band is  printed.
There is only one implicit Detail Post-Print embedded source
code window in the report.

<Detail Pre-Print Code for: Detail>
Detail Pre-Print Code for: Detail

This  is  an implicit embedded source code window  which  is
executed immediately before the Body detail band is printed.
There is only one implicit Detail Pre-Print embedded  source
code window in the report.

<Directly After Code>
Directly After Code

<End of General Formulas>
End of General Formulas

When  processing a screen field, the formulas which  do  not
have a class of 'FILTER' or 'LIST' will be generated.   This
embedded source window allows the entry of computations  for
screen display fields without the use of the Formula Format-
ter.

<End of Procedure>
End of Procedure

Code placed in this window executes after all other code  in
the  procedure has executed.  At this point, the  Report  is
closed.   This code begins in column one, therefore you  may
use this window to write any ROUTINES which are called  from
any other embedded source code window.

<Enter Scroll Mode Routine>
Enter Scroll Mode Routine

After the DISABLE and ENABLE of the fields to switch to  the
scrolling  area from the entry field area.  This is  a  good
place  to override the automatic enabling and  disabling  of
fields.

<Enter Update Mode Routine>
Enter Update Mode Routine

Also  a  good place to override the automatic  enabling  and
disabling of fields, but when going to update mode.

<Entire Screen Structure>
Entire Screen Structure


<Fill Queue Replacement>
Fill Queue Replacement

Allows  the programmer to replace the fill Queue Section  of
code with his own.

<Filter>
Filter

Here you can type in additional Filter statements.

<Filter Fill Queue Routine>
Filter Fill Queue Routine

You can put a filter into the fill queue routine here.

<Global Alerts>
Global Alerts

The  general  text above describes how to use  this  are  to
alert the keys to be used with the hotkey procedures.

<Global Procedures>
Global Procedures

The general text above describes how to use this are to  key
in procedures to be used on hot keys.

<Group Footer Pre-Print Code for>
Group Footer Pre-Print Code for

This  is  an implicit embedded source code window  which  is
executed  immediately before the footer for the group  break
referenced  is printed.  There is one implicit Group  Footer
Pre-Print  embedded source code window for each group  break
defined in the Report Formatter.

<Group Footer Post-Print Code for>
Group Footer Post-Print Code for

This  is  an implicit embedded source code window  which  is
executed  immediately after the footer for the  group  break
referenced  is printed.  There is one implicit Group  Footer
Post-Print embedded source code window for each group  break
defined in the Report Formatter.

<Group Header Pre-Print Code for>
Group Header Pre-Print Code for

This  is  an implicit embedded source code window  which  is
executed  immediately before the header for the group  break
referenced  is printed.  There is one implicit Group  Header
Pre-Print  embedded source code window for each group  break
defined in the Report Formatter.

<Group Header Post-Print Code for>
Group Header Post-Print Code for

This  is  an implicit embedded source code window  which  is
executed  immediately after the header for the  group  break
referenced  is printed.  There is one implicit Group  Header
Post-Print embedded source code window for each group  break
defined in the Report Formatter.

<If Break Key>
If Break Key

Here is where the break key has just been checked prior  to,
you could write a conditional break statement here as  well,
not using the break key.  You can also put other  statements
you want executed on break.  Like mentioned before,  perhaps
an opportunity to continue.

<Immediately After Accept>
Immediately After Accept

<Immediately After LOOP, before FREE(Queue)>
"Immediately After LOOP, before FREE(Queue)"

After the screen processing loop is complete, indicating the
user is finished viewing the text.  The queue still contains
the text at this point.

<Immediately Before Accept>
Immediately Before Accept

This  allows  you to make certian last  minute  adjustments,
just before the accept routine.

<Immediately Before RETURN for non-ASCII file error>
Immediately Before RETURN for non-ASCII file error

When  the procedure detects that a line is longer  than  the
maximum  specified  by the Warning Size it  returns  to  the
caller with an error message.

<Immediately Before SET(key,key)>
Immediately Before SET(key,key)

Immediately after the Range Value field has been assigned to
the  Range  Limit field and before the SET  statement  which
establishes  the  report's starting position  in  the  file.
This allows you to correctly initialize any other fields  in
the  Primary File Access Key before the SET  statement.   If
Range  Limit  and Range Value fields are not  specified,  no
source code is generated from this Embedded Source window.

<In Primary LOOP after Lookups>
In Primary LOOP after Lookups

Code placed in this window executes after any Record Filter,
Lookups,  or Formulas from the Primary file, but before  any
related Child records are accessed.

<In Primary LOOP after NEXT before Lookups>
In Primary LOOP after NEXT before Lookups

Code placed in this window executes after each Primary  file
record  is  read and any group break code is  executed,  but
before any Record Filter, Lookups, or Formulas.

<In primary LOOP after Record Filter Before Lookups>
In primary LOOP after Record Filter Before Lookups

The title pretty much says it all.

<In Primary LOOP immediately after NEXT>
In Primary LOOP immediately after NEXT

Code  placed in this window executes immediately after  each
Primary file record is read and before any group break  code
is  executed.   If you code your own record filter  at  this
point instead of using a Pre:FILTER class Formula, it  would
be  a  good idea to check ERRORCODE() to detect the  end  of
file  condition (if you don't, you could create an  infinite
loop).

<Inside Total Loop After Filter>
Inside Total Loop After Filter

After each record is read and filter conditions are
evaluated in the total calculation LOOP.

<Inside Total Loop, Immediately after NEXT>
Inside Total Loop, Immediately after NEXT

Immediately after each record is read in the total  calcula-
tion LOOP.

<Last-Page Button Press>
Last-Page Button Press

Code  is  inserted  to execute as soon as  the  "Last  Page"
button  is  pressed,  before going into  non-stop  mode  and
calling the last page procedure.

<Line Entry CtrlEsc>
Line Entry CtrlEsc


<LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas. This embedded  code
window  may  be used instead of LIST class  formulas.   This
will allow setting up any fields which are displayed  within
the scrolling list box.

<Next-Page Button Press>
Next-Page Button Press

Code  is  inserted  to execute as soon  as  the  "Next-Page"
button  is  pressed,  before going into  non-stop  mode  and
returning  to  the  next page procedure.   If  Next-Page  is
pressed  on the last page, the user is placed on  the  first
page (MultiPage) procedure.

<Next Page Button Press>
Next Page Button Press

Code  is  inserted  to execute as soon  as  the  "Next-Page"
button is pressed, before going accessing the next page.

<NEXT Record Error Check >
NEXT Record Error Check

Immediately  after the NEXT command. This allows a check  of
the  ERRORCODE() function to insure that there were  no  er-
rors.

     WARNING: If no error check is made here to allow a
     BREAK out of the loop, you WILL get an infinite loop!

<Ok Button Press>
Ok Button Press

Code  is inserted to execute as soon as the "Ok"  button  is
pressed, before going into non-stop mode.

<On Add After Record Buffer Is Cleared>
On Add After Record Buffer Is Cleared

Immediately after the record buffer is cleared for an AddRe-
cord and just before auto-incrementing fields are increment-
ed or fields with initial values are initialized.

<POINT Class Formula>
POINT Class Formula

<Previous-Page Button Press>
Previous-Page Button Press

Code  is inserted to execute as soon as the "Previous  Page"
button  is  pressed,  before going into  non-stop  mode  and
returning to the prior page procedure.

<Prior to Add Queue Element>
Prior to Add Queue Element

<Prior to Return>
Prior to Return

After exiting the main loop, but prior to freeing the Queue.
This  would be a good place to add code which needs to  loop
through the RecordQueue for information before exiting.

<Prior to Update Procedure>
Prior to Update Procedure

Immediately before the Update Procedure is called.

<Process Selected Record>
Process Selected Record

When  Enable Hot Records has been checked, code within  this
embedded source window is executed upon any movement of  the
list box highlight bar. The highlighted record is  retrieved
into  memory,  any Many to One secondary  file  records  are
retrieved, and any general formulas are computed just  prior
to this embedded source code.

<Pulldown Item Code for: ?Item>
Pulldown Item Code for: ?Item

In  the CASE FIELD() structure, executed when the menu  item
is selected by the user.

<PUT/DELETE Record Error Check >
PUT/DELETE Record Error Check

Immediately after the PUT or DELETE commands. This allows  a
check of the ERRORCODE() function to insure that there  were
no  errors replacing a record.  If you are  changing  fields
which  are  the  components of unique keys, or  if  you  are
running this C3Batch process on shared files, you may  enter
your  own  error handling scheme here.  If 'No  Action'  was
selected for this C3Batch process, this embedded code window
is not needed.

<Return from Next Procedure>
Return from Next Procedure

If  a 'Next Procedure' was defined, code is  inserted  after
the procedure is executed.

<Screen Field Declare>
Screen Field Declare


<Screen String Declare>
Screen String Declare

<Set Color codes for Records>
Set Color Codes for Records

See the section on color records for more details on this.

<Set to First Record>
Set to First Record

When using Range Limits, a SET statement is issued to locate
the  first record. This embedded source code window  appears
just  after  the generated SET statement and allows  you  to
override the SET.

<Set to Last Record>
Set to Last Record

When  using Range Limits, a SET statement is used to  locate
the closest match to the last record.  This embedded  source
code  window  appears just after the SET and allows  you  to
override the SET.

<Set to First Record Before Total Loop>
Set to First Record Before Total Loop

After the SET(key,key) for Range limits before beginning the
total calculation LOOP.

<Setup Next Procedure>
Setup Next Procedure

If  a 'Next Procedure' was defined, code is inserted  before
the procedure is called.

<Setup Procedure>
Setup Procedure

Immediately after the CODE statement.

<Setup Pulldown>
Setup Pulldown

After OPEN(PullDown) statement.

<Setup Screen>
Setup Screen

After the OPEN(Screen) statement.

<Start of Fill Queue Routine>
Start of Fill Queue Routine

Self Explanitory.

<Top of ACCEPT Loop>
Top of ACCEPT Loop

After LOOP statement and prior to generating formula
fields.

<Top of BrowseAction LOOP>
Top of Browse Action LOOP

<Top of Primary LOOP>
Top of Primary LOOP

Immediately  after  the LOOP statement which  processes  the
Primary  file  and before any other statement in  the  LOOP.
Code placed here will execute every time through the LOOP.

<UNREFERENCED #EMBED>
UNREFERENCED #EMBED

Errorcode  check within LOOP, this has been written  already
but may be deleted or modified if needed.

<When Screen Field is Completed:>
When Screen Field is Completed:

In  the CASE FIELD() structure, executed when the field  has
been completed.

<When Screen Field is Selected:>
When Screen Field is Selected:

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<Within LOOP >
Within LOOP

After  the GET to any secondary files. This is the heart  of
the  processing LOOP.  If using a record filter,  this  code
may not always be executed if the record is filtered out. If
Many  to  1 relationships exist in the File  Schematic,  the
lookups  will have already been done.  Any formulas  created
with  the formula formatter (except FILTER) will  have  been
executed just prior to this embedded source code.  The  next
statement  which  executes  after this code is  the  PUT  or
DELETE  of the record if Change or Delete has been  selected
for this C3Batch.

<<Global Settings>>

The  information  you provide in the prompt  fields  on  the
Global Settings window are used throughout the  application.
The values given in this portion of the application  genera-
tor affects the entire application.

<Application Properties Screen>
Application Properties Screen

As of version .112 the templates are designed with no  style
file  and you should no longer have to use the  styles  file
with your applications.  Some problems may be encountered if
you  add templates an application you already have  C3  Tem-
plate  defined procedures, sorry for the inconvenience,  but
the  change  was implemented due  to  overwhelming  customer
requests.

<Enable Shared Files>
Enable Shared Files

C3  has maintained the basic function and expanded on it  in
the  C3  Equates Section, under the [Source] Button  on  the
Global Settings Screen.  No only do you have the ability  to
implement shared access, but you can also specify the number
of  users as well.  At present the number of items that  can
be put on the Global Settings screen is limited, thus we had
to move certain things to get our features on the screen.

     See the C3 Equates Section below.

<Enable Mouse Support>
Enable Mouse Support

If  your  looking for the check box, well it's  gone  on  C3
Templates, you can find the same function in the C3  Equates
Section.  See the C3 Equates Section Below.

<Enhanced Background>
Enhanced Background

This  feature indicates that the application will be run  on
an  EGA, VGA, or SVGA monitor which allows the Blink bit  to
be  used as background color Enhance bit (see SETNOBLINK  in
the  Language  Reference).   C3 has moved  this  to  the  C3
Equates Section as well.

<C3 Auto Lookup Key>
C3 Auto Lookup Key

Placing  a keycode in this field will result in a key  being
available in all procedures to force the lookup procedure to
be  called.  That is, if you are in a field where  a  lookup
has  been defined for it.  If you declare a local  procedure
for  this  keycode it will override the  global  definition.
This must be used with the automatic lookup coding described
in the manual.

The  goal in C3 templates is that you should never  have  to
define  a lookup.  All you need to do is create a  relation-
ship  in the Dictionary between the two fields and the  tem-
plates take care of the rest.  The way the a field is deter-
mined  to be a lookup field is the presence of a  C3  Browse
procedure  in  the fields Procedure (When Selected  or  When
Completed) call area.

<C3 Many Key Cycle Key>
C3 Many Key Cycle Key

Once  again this is a key code definition which will  result
is  a  function being called.  This will be the  key  stroke
which  will  cause a browse to rotate between  the  multiple
keys (as in file keys) you have defined.  See the manual for
defining rotating displays based on file keys.

<C3 Glb Hotkey Proc Name>
C3 Glb Hotkey Proc Name

If you are defining a global hotkey procedure, this is where
you define procedure name at.  Later you will use the global
hotkey  template to define procedures and assign keys.   You
can put several hotkey procedures in an application.

<Close Unused Files>
Close Unused Files

Check this box to indicate that each procedure should  close
the  data files which it opens.  When this box  is  checked,
CheckOpen() is generated as a FUNCTION returning one (1)  if
it  actually  opened the file, or zero (0) if the  file  was
already open or unable to be opened.  If not checked, Check-
Open is generated as a PROCEDURE.

The return value from the CheckOpen() function is saved in a
local  variable  by  each procedure.  That  saved  value  is
checked  just before RETURN to its calling procedure  --  if
the procedure opened the file, it also closes the file.

<C3 String Len File Name>
C3 String Len File Name

The number entered at this prompt designates the length of a
string  to  be used in a file's Name attribute.  The  string
will  be  declared just above the file  structure.   If  the
filename  begins with a "F-" the path variable will  be  ap-
pended to the front on the file label. If you will be  using
the  File Name and Path Specification feature,  declare  the
length of the string to hold that specification here.   This
must be used with first procedure.

<C3 Create if No File  (Replaces If File Not Found)>
C3 Create if No File  (Replaces If File Not Found)

Select - Attempts to create the file if not found.
Un-Select - Will not create files at run-time.

Select  the action to take when the application attempts  to
open a non-existing data file.  This determines if the  code
will  be included in the application to create the files  at
run-time  for  the  application if none  exists.   You  will
probably  want  to  have the application  create  the  files
during programming and testing.  Later when the  application
is complete you may want to create a blank set of the  files
then put them aside.  Now go in and turn off the file  crea-
tion.  This will make you application smaller, and it you
are  attempting to make you application  less  'bootlegable'
this might help.
     () Create  -- Attempts to CREATE the file
     () Halt -- Displays a warning then returns to DOS.

<Embedded Source Points>
Embedded Source

<C3 Equates>
C3 Equates

This  area contains many of the equates which  C3  Templates
uses to achieve increased power and flexibility.  You  could
use  this  area to add some of your own equates  if  needed.
Here  is a list of features you can enable from the  equates
section.

G-e-MouseSupport    Mouse support enable.
G-e-EnhanceBckgrd   Enhanced Background Enable.
G-e-NetUsers        Specify number of users allowed.

     See Soundex for info on next 2 features.
G-e-AllowLike       Allows close matches in locator.
G-e-AllowSound      Allows for close, but not quite matches.

     See More and No More for info on next 2 features.
G-e-EBMoreInd       What is to display if more records.
G-e-EBMoreNot       If no more records display selector.

     See Hot Key Enhancements for info on next feature.
G-e-MenuKey         Allows hotkey to pulldown.

     See More and No More for info on next 2 features.
G-e-mkRight         More information to the right indicator.
G-e-mkLeft          More information to the left indicator.

     See Multi-Key Function for info on next feature.
G-e-mkSpace         Spaces on button text. (See Below)

As  a  rule  of thumb if you put a 0 in  for  the  value  of
the  equate  it  will disable this function.   If  you  want
to  enable  it  then set the value  at  1.   Other  features
are looking for a character.

G-e-mkSpace  -  This  feature is used  in  conjunction  with
Multi-Key Buttons.

<Inside Global MAP>
Inside Global Map

In the Global data section of the program at the end of  the
MAP  structure.   This  may be used to  declare  any  Global
procedure  prototypes  (or INCLUDE a file  containing  them)
that  the Application Generator does not  automatically  in-
clude in the MAP.

<Before File Declarations>
Before File Declarations

In  the  Global  Data section of  your  program,  after  the
MAP  and  %GlobalData (Data declared in the Data  Button  of
Application  Properties), and before the file  declarations.
This  source can be used to declare any variables  that  you
didn't  desire to declare as part of %GlobalData, or  varia-
bles  that don't need to be visible in the  Generator.   The
placement  of this #EMBED allows the declarations made  here
to be visible to your File Declarations.

Example:  You have twenty files, each of which uses a varia-
ble  as  the file location.  You could either  declare  each
variable  in  the Global Data button, or use this  EMBED  to
write  one, declaration, copy it 20 times, and make  the  to
the copies.

<Data Section>
Data Section

In  the  Global  data section of the  program  after  Global
data  and  all data file definitions.  This may be  used  to
declare  any Global data which you may want to use  only  in
your embedded source code.

<Setup Program>
Setup Program

     Immediately after the CODE statement.

<Before Return to DOS>
Before Return to DOS

After  the  call  to the  first  procedure  and  immediately
before  the  RETURN  statement which  takes  the  user  back
to DOS.

<<Multiple Lookups into same file>>

You can still use the old c3lookup as needed but if you need
to preform several lookups on the same screen using the same
lookup file field you need to use this method.

You need to create a file "GD-Valid" with a prefix of "gdv"
This file will create a local data variable in each procedure
where the field is used on the screen. So this can be reused
on as many screens as needed.

You must place this file in the other data section of any
procedure file schematic where the fields are used.

Create each field in the GD-VALID file as follows:

The Field Label can be anything you like

The Type and character count should equal that of the field
in the lookup file. The display picture should be as required.

The description should be the field to be entered to preform
the lookup on out of the lookup file and the key to use to
validate the data (it may be a multi part key if you use the
LU-SET formulaclass on the procedure) The Field and The Key
must be seperated by a | "vertical bar" on the description
line.

Example:   pre:Name|pre:Name-Key

The Initial Value should contain the field in the file that
is to recieve the value from the lookup file and the field
which contains the value from the lookup file. Seperate the
fields using = "equal sign".

Example:   pre:Sys-ID = fil:Company|pre:Sys-ID-Key

<<Reducing Screens, Embedded Browses and Line Entry>>

C3  templates has two features which cut down on the  number
of separate visual screens needed to implement the inputting
of  variables  into multiple files.  The first  was  covered
earlier  in the manual and that is the Embedded Browse  fea-
ture.  Line Entry is the second.

In  the Demo.APP we have a screen which allows 2 list to  be
associated  with a main list.  Not only can you get a  quick
view of what is available, through line entry you can  input
new data on the same screen.  Only the Phones list is imple-
mented with line entry, however, you could make all of  them
line entry if desired.

   Ŀ
    Ŀ  Ŀ        A solution might be
    Names         Type          to place 2 minor file
                          list in embedded
                  Ŀ        browses, and make
                  Phone         them line entry.
        
   

IMPLEMENTATION of Line Entry:

APPLICABLE TEMPLATE(S):  Primary - C3Form21
                         Associated - Browse type screens.

FILE(S):  Selection  of a single data  file  is  sufficient,
however,  the  line entry will also handle  lookups  through
related files as well.

FIELD(S): This feature is primarily designed for  situations
where there are a small amount of data needs to be displayed
and updated.

RELATIONSHIPS:   The file being updated must be  related  to
the  primary file, and if you have lookup fields there  must
be a relationship.

PROCEDURES PROPERTIES SCREEN:  Select the Line Entry Option.

SCREEN  MODIFICATIONS:   On the C3Form itself  you  need  to
perform the following:

1.  Reduce the size of the screen to the size of one line of
    the associated list box. This can be adjusted for custom-
    ization see instructions below.

2.  Place the fields in the identical spacing and layout  as
    the associated list box.

3.  Color as desired, coloration has a great deal to do with
    the user knowing when he is in the edit mode.

4.  Ensure that the float option is selected for the screen.
    HAND CODE POINTS: In the Source section of the  C3Form21
    template there are two variables. These variables are used
    adjust the position of the Line Entry Form in relation to
    the list box on the browse screen. See RESTRICTIONS section
    below. The row and column equates are listed below:

         L-e-AdjRows   equate(1)
         L-e-AdjCols   equate(1)

The  default  adjusts the position from  the  clarion  float
offset up one line and left 1 column.  Changing the value in
the equate adjust the form position as follows:

         Rows      + up      - down
         Cols      + left    - right

INSTRUCTIONS: The basic implementation is relatively simple,
implement  each  of  the elements in this  section  and  you
should get the desired results.

TIP:  In some color schemes it may be difficult to determine
if  you are in the browse mode or in the modify  mode  espe-
cially  on a monochrome monitor or paper white VGA  Monitor.
A simple way to let the user know is to use a special  char-
acter on the first and last column of your form, not between
fields.

    List Box                           Form
  Ŀ              Ŀ
   Commercial Auto                  ################# 
   Commercial Air                  
   Commercial Truck    When selected or in modify mode
   Private Air       < the record will be reversed text,
   #################   when arrows are present means
    modify mode.

You  will need to have a blank column on the first and  last
line of your browse to make it visually appealing.

RESTRICTIONS:  Avoid placing the last line of your browse on
the  bottom  3 lines of the screen.  Due to  clarions  float
offset  on  these rows the offset is changed  from  normally
below to normally above.  The offset is designed to keep the
called from displaying on top of the selected record in  the
browse  table.    This is fine except when you  want  it  to
display  on  top  of the record.  On the other  hand  it  is
customary to have some controls on the screen and more often
than  not they are placed at the bottom of the screen so  to
some  extent this is a moot point. This problem only  occurs
when  you are updating or deleting a record in the bottom  2
lines of the browse or any time you add a record.  Approach-
ing  the  right side of the screen within 2  columns  has  a
similar  result as well.  The difference is that  since  all
records will be in the same relative position the adjustment
made in the C3 equate will be a permanent fix.

You can place the browse on the 3rd line from the bottom  of
the  screen, the update action still displays on top of  the
records, however, the insert action will be on the 4th  line
from the bottom.

RESULTS:  The procedure will use Clarion's float  offset  to
locate  the form, along with the adjuster in the  C3  Equate
section  you can have a line edit browse which  appears  one
screen.

The  Insert action will use the bottom line of the list  box
as  an entry area.  Depending on the you adjustment  as  de-
scribed under hand code points, the change and delete should
occur super-imposed over the associated entry.

RELATED TOPICS:  Embedded Browse

<<Calendar, Pop-Up>>

The procedure "CALNDATE" can be declared as the "when  field
selected"  procedure to generate the code to call a  pop  up
calendar when:

- The auto lookup key is hit.

- An auto mouse lookup is present for the date field.

If  you wish to use your own calendar, change  the  function
name  to Caln-Date in template scrnflds.c3s C3tmpl14.tpx  to
your own function name.

<<Global Hot Keys>>

Allows hot keys to be global to the application  They may be
disabled  for  any  procedure by checking  the  Disable  Glb
Hotkeys prompt.

Create  a  procedure using the template  C3-G-HotKeys,  this
must  be placed in the main application module  appname.cla.
Select the screen for this procedure and in the screen  menu
select  the Hotkey procedures.  Insert any hotkeys  and  the
associated  procedures  that will be called  globally.   The
screen or any other members of the global hot key  procedure
should be left blank.  In the Global Properties Screen place
the name of the global hot key procedure in the Glb Hot  Key
Proc Name  there are 2 embedded code sections for global hot
keys that may be used:

ALERT  embed

This  is a convenient way for alerting a range of hot  keys,
this way you don't have to worry about doing each one  inde-
pendently.

 Example:         ALERT(F2Key,F10Key)

Global Procedures:    EMBED

This  embed point allows hand code to be placed in the  case
keycode loop.

Example:

    OF F9Key
    IF UPPER('your-proc') <> UPPER(L-s-CalledFrom)
    your-proc
                             .
Note: The checking of the called from procedure will prevent
a procedure from calling itself.

<<System ID Style Programming>>

System ID Style Programming:  Quite often times  programmers
create an employee number, process code, nick name or  other
unique  identifier for persons, persons or things  just  for
the sole purpose of having a unique identifier. Often  times
the  user does not need a unique identifier for  his  normal
work,  however, due to program requirements one is  created.
Often times you wish the user did not have to look at it and
more  importantly sometimes it would better if they  had  no
access to it.

System  IDs  are  generated by many data  bases  where  each
record  is  given  a record number, like it  or  not.   This
number  is permanently associated with that record  for  all
time.   In some cases you don't really need to know and  may
never even see that system record number.

You will notice throughout the DEMO.APP that there are forms
for  the creation of records, and you will notice also  that
no  where  on these forms are there fields  for  the  Sys-ID
numbers.   The  only thing that you need to do in  order  to
create  the auto numbering field is to make it thus in  when
you create the key like standard clarion. The improvement is
that when you implement the file you do not have to have the
Sys-ID number on your input anywhere.

A  general note  names should be kept as short as  practical
as  some of our coding structures need the  prefix:fieldname
along with some coded characters.

<Sys-ID Implementation Requirements>
Sys-ID Implementation Requirements

APPLICABLE TEMPLATE(S): Any entry field on any template.

FILE(S): Any Data File.

KEY REQUIREMENTS: Optimum on a single component key,  cannot
exceed 4 components.  Must be last component in key.

Remember: In Clarion 3 a multi-part key with auto numbering,
the  last  component  of the key is the one  which  will  be
auto-numbered.

        Undesirable Implementation

                K-Sys-ID     (Key Name, Unique, Auto-Number)
                 -Last
                 -First
                 -Sys-ID     (Auto Numbered Component)

        Good Implementation

                K-Sys-ID
                 -Sys-ID     (Unique Auto Number)

                K-Name
                 -Last
                 -First

The  lookup field is used for the lookup(browse)  that  will
allow  you to select the proper record the sys-id.  This  is
what is actually stored in the record being updated.

C3 EQUATES: None

RELATIONSHIPS: It is good to use the prefix of the file  and
field name combined for the related field name in the relat-
ed  files.  If you were tying the EMPLOYEE file to  the  PAY
file then you might want to create the field emp-Sys-ID  for
the related field.  Create the this is just for  convenience
and then you know the emp-sys-id is the employee file.

PROCEDURES PROPERTIES SCREEN:  No particular requirements.

SCREEN  MODIFICATIONS:  There is no need to have  the  field
display on the screen, however, this is not a requirement.

Most  often  the  user should not be  allowed  to  LOOK  AT,
CHANGE,   DELETE   or   in any way interact with the  SYSTEM
ID.  The Sys-ID is totally meaningless to the user and  thus
often times all it's presence does is confuse the  operator.
For  instance let's say there is a Sys-ID field and  an  em-
ployee number.  What if the user confuses the Sys-ID  number
with  the Employee number.  Updating, editing or other  wise
modifying it can be even more disastrous.

Updating this value in the parent or system record therefore
changing the reference record, the system will not  reassign
the corresponding child files the correct System-ID.  (As of
3006  referential  integrity is not all it should  be.)  The
basic  Idea  behind Sys-ID Programming is that there  is  at
least  one unique value which is under sole control  of  the
program, not having to worry about human error.

INSTRUCTIONS:  This  is one of the  simplest  procedures  to
implement,

RESULTS:  The  file will have the Sys-ID  attached  to  each
record transparent to the user.  The Sys-ID can then be used
to implement Auto-Lookup and locator stuffing.

RELATED TOPICS: Auto-Lookup, Locator Stuffing, Entry Fields

Note:  The template will now automatically generate code  to
handle system ID style programming and look ups. Used  where
the  user  should  not access the  internally  generated  ID
number.  Establish the relationship between files  by  using
only the system ID fields.

-  The lookup field must be the last in the key -  You  must
create  a computed formula with a class of "lu-set"  in  the
C3Form. Select the variable to be set and use the formula to
set the value using a value or a variable.  - On the  C3Form
declare a local data variable using  the field name that the
user  will input to select the proper choice from  a  lookup
browse with the first three letters of "LU-" or "LUO"  field
name.

The  difference between  LU-  and  LUO  are that LU-  stuffs
the locator with the entry value where LUO does not.

For  hand code prior to using the C3SELECT or C3BROWSE  tem-
plate  to select a record use the global variable  Gby-Valid
set  to 1 to stuff the current entry field's  contents  into
the locator or set it to 2 for to call the C3select  without
stuffing the locator.

               Example:

           COMPANY FILE
           fields
               cnm:Sys-ID         !internal system ID field
               cnm:Name           !company name
           keys
               K-Sys-ID
               +Sys-ID
               K-Name
               +Name

           PROJECT FILE
           fields
               prj:cnm:Sys-ID           !project client

           RELATIONS
               prj:cnm:Sys-ID                   MANY:1
               + cnm:Sys-ID(no action)

           PROJECT FORM
           data
               LU-cnm:Name          !size equal to cnm:Name
               or
               LUOcnm:Name          !size equal to cnm:Name

           screen

Button Field PropertiesĿ
    Button Text  :' '                                       
    Equate Label :PU-LU-cnm:Name                            
                                                            
    Hot Key      : blank                                    
                                                            
     When Button is Pressed                                 
       Procedure : blank                 Source             
                                                            
     When Button is Selected                                
       Procedure : blank                 Source             
                                                            
                         With Shadow                        
                                                            


       Contract With Company:

Entry Field PropertiesĿ
                                                           
       Picture      : @s20                                 
                                                           
        When Button is Pressed                             
          Procedure : Com-Select *          Source         
                                                           
        When Button is Selected                            
          Procedure : blank                 Source         
                                                           


* C3Select procedure for company name.

This  is  all that is needed to generate  all  the  required
code. The required attribute can be used if needed.
 Auto mouse look ups must be used with the above LU.   Place
a  button on the screen that will act as the  lookup  symbol
for  a field.  In declaring the button use a  variable  with
the  same name as the field you want it to work  with,  but,
with a prefix of "pu-". Place the button directly after  the
field  that  will  be looked up. If you use  the  old  style
keystroke handling the tab key will select the lookup  char-
acter  automatically whether you want it or not.  Using  the
enter  key  to cycle through the fields  will  automatically
pass up the lookup character.

<<Converting Existing Applications>>

  Note: These instructions apply only to developers
        converting applications already created using
        another template set.

  1)    On the application's Application Properties Screen,
        change the default template to C3TMPL.TPL

  2)    Import C3 equates:

        In the Application Properties, Global Settings,
        Source area, open the C3 Equates Embedded Source
        area and copy or import (using the Editor's Import
        function) Include('C3EMBED.EQU').

  3)    Change any embedded source you have created and
        replace Return with

                      Do ProcedureReturn

  4)    In all browses which display a related field in
        the List Box, add a Computed Field using the LULIST
        Formula Class for each related file, as follows:

                  Field Name :    (Not used)
                  Formula Class : LULIST
                  Description :   Name of related file
                  Formula :       (Not used)

        Note: (N.B.: "(Not used)" does not mean that you can
              leave these fields blank; you cannot.  It means
              that the contents of the field are not used by
              the templates. Therefore you may complete these
              fields however you wish.)

  5)   Make sure your application does not use a C3 reserved
       word, expression, variable or prefix.  These can be
       found in the Appendixes.

            Reports:    Dis:Date and Dis:Time (Long)

            Forms:      Loc:InsertMsg
                        Loc:ChangeMsg
                        Loc:DeleteMsg
                                      -- all are String(30)
        (Use the initial value to set any default messages)

If you wish to use the Automatic Lookup feature, you will
need to change the template for the procedure to C3BrowsE.

<<Third Party Product Support>>

Using Third Party Products

IMPORTANT!!!! C3 Templates do not contain these third  party
products,  neither does the purchase of C3 templates in  any
way authorized you to use these third party products without
first purchasing them.

C3  Development  includes support for third  party  products
merely  as a service to our customers.  We do not  guarantee
the third party product interface for obvious reasons.

IMPORTANT!!!!!   We will only maintain support for the  most
current version of these programs in our templates.

The hooks and switches we have placed in the templates are a
convenience and available only when using a C3 Template.  If
the third party product is a "library only" then it will  be
available for use anywhere in your code.

Any  code C3 Development Provides for third  party  products
will not allow you to use the product until you have actual-
ly purchased the product from the applicable vendor(s).

At  present we have you create a module and a procedure  (in
most  cases this is a dummy procedure.  The purpose of  this
is  to provide a place to properly include the map  and  the
required LIBs or DLLs. This will changed to a easier  method
in  the  future  when Clarion allows  us  to  "Conditionally
Include" these required items.

NOTE: When using ANY third party product you must do one  of
the  following:

1.   Make all the required LIBs and or DLLs for the  product
     then place them in the appropriate sub directory.

     DLLs in the clarion3 subdir
     LIBs in the clarion3\lib subdir

        ANY Include, Equate, or Global Variable

     In the clarion3 subdir.

2.   If you do not want to copy these files to the  clarion3
     or clarion3\lib subdir make sure your redirection file is
     updated accordingly.

3.   Any third party templates must be placed in the   Clar-
     ion3\C3D subdir according to any specific  instructions
     provided by C3.

Please note that many of these products are trademark  names
and  all  trademarks are the property  of  their  respective
owners.

C3  Development  makes no statement as to  our  approval  or
opinion of these products in any manner.

The actual function and or performance is not the  responsi-
bility of C3 Development Inc.

Developer                          Product(s)

C3 Development                     C3Fax

Bobcat Systems                     MemoEdit

Keystone Computer Resources        NetTools
                                   WordPerfectTools
                                   FaxTools
                                   SoundBlasterTools

Database Technologies              Laser Tools for Clarion

<General Third Party Product Implementation>
General Third Party Product Implementation

In  general  the implementation of the third  party  product
requires  you to declare a procedure (name of  your  choice)
and  create  this  procedure based on the  template  of  the
corresponding name.

Then  follow  the instructions of the  third  party  product
literature.  You will find for the most part that  implemen-
tation with C3 templates is easier than if implemented  with
standard clarion.

<<Naming Conventions>>

C3  has a few variable naming conventions used in  both  the
templates  and the variables available for your use.  Knowl-
edge  of these conventions will assist you in  understanding
what  variables mean and, therefore, make their  use  easier
for you.

<    First Letter>
        First Letter

If a variable's first character is:

         L the variable is local
         G the variable is global

The second and third characters define:

         s- a string
         ul an unsigned long
         by a byte
         -e an equate
         d  data

The  fourth character is always an underscore ('-') and  the
balance  of  the variable label will be descriptive  of  the
variable's  purpose.  (No guarantee, however, is  made  that
what  C3  Development finds descriptive  is  descriptive  to
you.)

So, for example, a variable named Lby-Ok-Pressed is a local,
byte variable that pertains to the Ok button being pressed.

Indeed  C3 has created such a variable and, knowing that  it
is local, you also know where its values will be useful  and
where they will not be.

<    DS>
        -DS

When used at the end of a variable label, the characters -DS
invoke  a C3 Formula Class. This Formula Class allows  unre-
stricted entry in Formula Generator Computed fields.

<    BM->
        BM

The  characters BM-, at the beginning of a  variable  label,
declares a Bit Mapped Switch.

<    EB>
        EB

The letters EB, at the beginning of an equate label are used
to create an embedded browse.  At the beginning of a  varia-
ble  label,  EB invokes the Formula  Class  identifying  the
fields in an Embedded Browse.

<    GD>
        GD

At the beginning of a file label, the letters GD will  cause
a file specification to be treated as a Group (i.e., similar
to a global variable and there will be no disk I/O).

<    MK>
        MK

When  used at the beginning of a button equate, the  charac-
ters MK trigger the many key feature.

<    MQ>
        MQ

These  characters, at the beginning of a file  label,  cause
the file specification to be treated as a Memory Queue.

<    PU->
        PU-

When  appended  to the beginning of a button  equate  label,
activates  AutoMouse Lookups. PU- with Automatic Lookups  to
create Automatic AutoMouse Lookups.

Therefore,  never  use these characters,  in  the  positions
indicated, for developer declared variables.

<<Procedures and Functions>>

<Chk-Bit(Position,Variable)>
Chk-Bit(Position,Variable)

- Reads the value at Position.

<Cmp-Bit(Variable,Operation,Constant)>
Cmp-Bit(Variable,Operation,Constant)

-  Compares  the  bit values in  Variable  against  Constant
according to the operation specified in Operation.

<Delay(n)>
Delay(n)

-  Suspense  program  execution for the  number  of  seconds
specified by n.

<Join-String(String1,St ring2,..., String6)>
Join-String(String1,St ring2,..., String6)

Returns a string of up to 1536 characters containing all the
strings passed to it. A minimum of two strings (String1  and
String2)  are required;  up to four additional  strings  may
also be passed.

Strings  are concatenated with a single blank space  between
strings.

<Like-Str(String1,String2)>
Like-Str(String1,String2)

Compares String1 to String2 and returns 1 if strings  match,
otherwise 0. Both strings are required.  String2 may contain
DOS wildcards.

  Parameters:
String1:  the string to be compared
String2:  The string to compare String1 to.

String2 may contain DOS wildcard characters (* or ?).

However,  if you use both wildcard  characters  sequentially
(i.e.,  "*?,"  or  "?*"), Like-Str will  return  false  even
though  the  expression is actually true.  Expressions  like
"?a*" will work, but "?*a" will not.

<Msg-Func(Hdr-,Ln1-, Ln2-,Y- N,Bp-,Cs-)>
Msg-Func(Hdr-,Ln1-, Ln2-,Y- N,Bp-,Cs-)

Returns  1 if left button is pressed, 0 if right  button  is
pressed.

Parameters:  Hdr-  optional:   |0 character  header  (title)
string  in  first  available line of the  message  box  Ln1-
required:50  character  message to user on  third  available
line of the message box Ln2-

Optional:   50 character message to user on fourth available
line of the message box Y-N

Optional: Defaults to 0 Selects contents of buttons and sets
the default choice, as follows:

Y-N             Button Strings

0 or 1          Yes             No
2 or 3          Insert          Exit
4 or 5          Continue e       Halt
6 or 7          Go              Stop

Note  that  even  numbers default to the  left  button,  odd
numbers  select  right button. So, Msg-Func  passed  with  a
fourth  parameter  of 3 will display  two  buttons,  labeled
"Insert" and "Exit," and "Exit" will be selected.

Bp-  optional: Beep;  1 = beep 0 = no beep
Cs-  optional: colors, not yet implemented

The  Msg-Func screen declaration is located in main  program
module, should you wish to change it.

You  may also add your own buttons and prompts to  the  case
Y-N  structure  which you will find  immediately  below  the
screen declaration in the main template (C3TMPL.TPL).

<ReadButton(MouseRow,Mous eCol)>
ReadButton(MouseRow,MouseCol)

Reads the screen starting at current mouse position until  a
space is encountered.

Returns an upper case string (up to 50 characters)  contain-
ing any characters found on the screen (this includes screen
literals, ASCII characters and the contents of data fields).

<Rev-All-Bit(Variable)>
Rev-All-Bit(Variable)

- Toggles all bits in Variable.

<Set-Bit(Position,Variable,Value)>
Set-Bit(Position,Variable,Value)

- Writes Value to Variable at Position.

<Str-Bit(Variable,In-Str )>
Str-Bit(Variable,In-Str )

- Returns a 32 bit string containing the values in Variable.
The characters displayed are controlled by the In-Str param-
eter.

<Tog-Bit(Position,Variable)>
Tog-Bit(Position,Variable)

- Toggles the value of the bit at Position in Variable.


<<C3 Variables>>
C3 VARIABLES

The C3 Templates are supplied with the following variables:

<    dis:Date & dis:Time>
        dis:Date & dis:Time

These two variables are used in reports to display the  date
and  time.  These variables are supplied to  save  you  from
having  to create a formula or write code to print the  date
or time.

<    Loc:AddMsg, Loc:ChangeMsg, Loc:DeleteMsg>
        Loc:AddMsg, Loc:ChangeMsg, Loc:DeleteMsg

Used in the C3Form Template.  You may load an initial  value
in  the C3Form's Data section. These variables  replace  the
prompts  that Clarion provides on the  Procedure  Properties
Screen. Because only a limited number of prompts are  avail-
able,  these three strings were moved to variables to  allow
programming options on the Properties Screen.

<    L-s-ProcName>
        L-s-ProcName

Only valid when the called and calling procedure are using
C3 Templates

This variable contains the label of the current procedure.

<    L-s-CalledFrom>
        L-s-CalledFrom

Only valid when the called and calling procedure are using
C3 Templates

This  variable  contains the label of  the  procedure  which
called  the current procedure. You may test the contents  of
L-s-CalledFro m, if a certain procedure is called from  more
than  one  other procedure, and vary the  current  procedure
accordingly.

For  example, when C3Form1 is called from Browse2, you  want
to preload certain of its fields, but not when it is  called
from  Browse1.  You might place the following  code  in  the
Setup Screen embedded source point for C3Form1:

If Upper(L-s-CalledFrom) = 'BROWSE2'
 field-label = value       !Repeated as often as necessary
End

<    Gby-Valid>
        Gby-Valid

If set to 0, browses are placed in standard, data entry mode
and the "Select" button is disabled.

If  set to 1, browses are placed in select/validate/  lookup
mode; the "Select" button is enabled and the locator is
stuffed with the current entry field value

If  set to 1, browses are placed in select/validate/  lookup
mode; the "Select" button is enabled and the locator is NOT
stuffed with the current entry field value

Normally, values for this variable are handled automatically
by  the C3 Templates. However, you may use this variable  to
force validate mode or to prevent a browse from operating in
validate mode.

For  example, when a browse is called from a menu,  pulldown
or  another  browse, it will normally be  in  standard  mode
(Gby-Valid  =  0).  If you need the browse to be  in  select
mode, set it to 1:

        Gby-Valid = 1   !Force Select Mode
        procedure label !Name of "select" browse
        Gby-Valid = 0   !Reset to default mode

(Resetting Gby-Valid after selection is required when called
from  another  browse to prevent the  calling  browse  being
forced  into  validate mode when it should  be  in  standard
mode.)

<    Lby-Ok-Pressed>
         Lby-Ok-Pressed

Is set to 0 on entering a C3Form.  Is set to 1 only when the
Ok Button is pressed. You may test the value of this  varia-
ble,  at procedure end, to determine whether or not  the  Ok
Button  was  pressed. You may determine  what  happens  next
based on the value returned.

        For example:

If ~Lby-Ok-Pressed     !User exiting without pressing OK
If Msg-Func('Exiting ' & | Clip(G-s-ProcName),'
Are you sure?',,1) <> 1 Select(?) . .

<    Lby-AutoNumber>
        Lby-AutoNumber

If  a C3Form contains AutoNumber fields, this variable  con-
tains the original value of the Action variable.  Regardless
of  what Clarion does to Action (e.g., changing it to  Chan-
geRecord , i.e. 2), Lby-AutoNum ber will always contain  the
value of Action as it was when the C3Form was opened.   This
variable  is  supplied in addition to  Clarion's  AutoIncAdd
local variable; you may use either.

<<C3 Buttons>>
C3 Buttons

The following words are reserved button equates:

<    EBnn-Ind>
        EBnn-Ind

See section on C3 Equates for details.

<    Tag>
        Tag

Reserved Button Equate to turn on tagging in a browse.

<    Flag>
        Flag

Reserved Button Equate to turn on Flagging in a browse.

<    UnTag-All>
        UnTag-All

Reserved  Button  Equate to untag all tagged  records  in  a
browse.

<    Tag-All>
        Tag-All

Reserved  Button Equate to tag all records in a browse  (all
qualifying records if the browse has a filter or range).

<    Rev-Tags>
        Rev-Tags

Reserved  Button  Equate  to reverses  tags;  tags  untagged
records and untags tagged records.

<    MKnKeyName>
        MKnKeyName

When  used at the beginning of a button equate, the  charac-
ters MK trigger the many key feature (where n is the ordinal
number  of the key node in KeyName to use as a  locator  and
KeyName  is  the name of the desired key,  not  include  the
prefix).

This is also the label of the routine that invokes the proper
sort order

<    PU->
        PU-

When  appended  to the beginning of a button  equate  label,
activates AutoMouse Lookups. PU- may be combined with  Auto-
matic Lookups to permit Automatic AutoMouse Lookups.

Do  not  use these words as button equates  except  for  the
purpose indicated.

<<C3 Files>>
C3 Files

The following file labels and prefixes are reserved for  the
uses specified:

<    GD>
   GD

When  a file label (the name by which Clarion refers to  the
file, internally, not the DOS name of the file) begins  with
the  letters  GD, the file will be treated as a  Group.   No
file  I/O will occur, there will be no disk  activity.   The
file may be accessed as if it were a global variable.   Data
in the file may be accessed by pre:RECORD and its fields may
be referenced in standard prefix:label manner.

<    MQ>
   MQ

When a file label begins with the letters MQ, the file  will
be treated as a Memory Queue.  There is no file I/O or  disk
access  and  the  fields  may  be  referenced  in   standard
prefix:label manner, as well as by pre:RECORD.

<    Gd-Filters (prefix, Gdf)>
   Gd-Filters (prefix, Gdf)

This  file  is used for passing filters  from  procedure  to
procedure (global passing of filters).

<    Gd-KeyEqual (prefix, Gde)>
   Gd-KeyEqual (prefix, Gde)

This  file  is  used to pass key values  from  procedure  to
procedure.

<    Gd-KeyRange (prefix, Gdr)>
   Gd-KeyRange (prefix, Gdr)

This file is used to pass key ranges globally.

<    Gd-Tag (prefix, Gdt)>
   Gd-Tag (prefix, Gdt)

Used for tagging, this file holds the tag values.

<    Flag-Header (prefix, fgh)>
   Flag-Header (prefix, fgh)

Used for flagging.

Do not use these file labels, prefixes or conventions except
for the purpose described.

<    Flag-Items (prefix, fgi)>
   Flag-Items (prefix, fgi)

Used for flagging.

Do not use these file labels, prefixes or conventions except
for the purpose described.

<Other Products File>
Other Products File

The otherproducts file is a device used by C3 to talk to our
templates.   The  other  products file  is  located  in  the
C3FILES.DCT,  located  in the \C3D subdirectory  under  your
Clarion3  subdirectory.  This Dictionary contains a copy  of
the  Tag  and  Flag files, but also there  is  a  file  name
"OtherProducts".   This file contains certian  fields  which
turn on and off various third party products.

In  order to implement some of the features see the C3  help
written specifically for each of these third party  products
under the templates section of the help.

USING THE OTHERPRODUCTS FILE:

Go  into the dictionary editor which contains the files  for
the  application  you  wish to  implement  the  third  party
product  in  and  import the  otherproducts  file  from  the
C3FILES.DCT.

Once  you  have the file in place, edit the  file/fields  as
described in C3 template help.

Other instructions on implementing the third party  products
are  contained  in the documentation which  comes  with  the
third party products.

<<C3 Equates>>

These  variables set global options and are declared in  the
Application Properties, Global Settings, Source Code area.

If  you wish to change any of these, you have the  following
options:

In Application Properties, Global Settings, Source code  for
your  application, you may change the equate value;  if  you
are certain that you will always want a value different from
the  default value, you may make the change in  the  default
application (C3TMPL.APP);

<    G-e-MouseSupport>
G-e-MouseSupport

        Default value: 1
               Option: 0

Use  G-e-MouseSupport to turn mouse support on or  off.   By
default  mouse  support is on. This  variable  replaces  the
Clarion Application Properties prompt;  the prompt space was
needed for other purposes.

<    G-e-EnhanceBckgrd>
G-e-EnhanceBckgrd

        Default value: 1
               Option: 0

G-e-EnhanceBckgrd  turns enhanced color bit on or  off,  re-
placing  the Clarion Application Properties prompt  as  this
prompt wars needed for other purposes.

<    G-e-AllowLike>
G-e-AllowLike

        Default value: 1
               Option: 0

Enables or disables DOS wildcards in locators.

<    G-e-AllowSound>
G-e-AllowSound

        Default value: 1
               Option: 0

Enables or disables soundex locators.

<    G-e-EBMoreInd>
G-e-EBMoreInd

         Default value: 'more'
                option: any ASCII character or string

This  is the indicator that more records exist than  can  be
displayed on an Embedded Browse.

The  following variables can be used locally, on a  specific
embedded browse, instead of the G-e-EBMoreInd global equate.

<    EBnn-ind>
EBnn-ind

Where  nn  is the equate for an  embedded  browse,  EBnn-ind
performs the same function as G-e-EBMoreInd but effects only
the embedded browse referred to by nn.

<    EBnn-indL>
EBnn-indL

Where  nn  is the equate for an embedded  browse,  EBnn-indL
performs  the  same function as G-e-EBMoreIn d  but  effects
only the left side of the embedded browse referred to by nn.

<    EBnn-indR>
EBnn-indR

Where  nn  is the equate for an embedded  browse,  EBnn-indR
performs the same function as G-e-EBMoreInd but effects only
the right side of the embedded browse referred to by nn.

<    G-e-EBMoreNot>
G-e-EBMoreNot

         Default value: ''
                option: any ASCII character or string

If G-e-EBMoreIn d has been placed on screen for an  Embedded
Browse,  the  contents of G-e-EBMoreN ot will  be  displayed
when the number of records available for the Embedded Browse
do not exceed the size of the List Box.

(Note:   local  equivalents  of  G-e-EBMoreNot,  similar  to
EBnn-ind, are not necessary; the template will pick up  your
tracking characters, if any.)

<    G-e-MkRight>
G-e-MkRight

        Default value: '-'
               Option: any ASCII character

<    G-e-MkLeft>
G-e-MkLeft

        Default value: '-'
               Option: any ASCII character

<    G-e-MkSpace>
G-e-MkSpace

        Default value: 1
               Option: any byte value

These  variables  define the marks that will appear  to  the
left and right of multi-key buttons and the number of spaces
between the button and the mark.

<<Generation Time Errors>>

Few  problems  will  arise using the C3  Templates,  if  you
follow  the implementation instructions in this manual.  The
most common development errors are:

<    Totals Do Not Total>
Totals Do Not Total

Did  you filter the browse with code in an  Embedded  Source
area?

<    Tagging errors>
Tagging errors

Did you use the External Name attribute when declaring  each
field in Gd-Tag?

Did you place the locator for the key on the screen?

<You may get an error of "LU-LIST too many levels">
"You may get an error of "LU-LIST too many levels"

This occurs under obscure conditions and can be ignored.

<"Field is not part of key">
"Field is not part of key"

Check the procedure if you are using
Many Keys to be sure that locator Digit is correct

<<Compile Errors>>

<Source Not Found>
Source Not Found

If  using Global Hot Keys be sure the Global Hot Key  proce-
dure is in the main program module.

<GET(,0) INVALID STRUCTURE>
GET(,0) INVALID STRUCTURE

  when using c3lookup be sure you are using a single part key
  If the lookup is into a multi part key you must use a LU-SET
  formula. To set the values of the fields above the entered
  field value.

<SET(,) INVALID STRUCTURE>
SET(,) INVALID STRUCTURE

  When using an embedded browse make sure you have a EBnn
  formula for each file involved in the embedded browse

<gdt:  UNKNOWN VARIABLE>
gdt:  UNKNOWN VARIABLE

  if tags have not been fully implemented be sure the TAG button
  is removed from the browse
  if you have implimented tags be sure the file GD-Tag is in a
  file schematic of any procedure in the app

<UNRESOLVED ?????????? PROCEDURES>
UNRESOLVED ?????????? PROCEDURES

  make sure you unzipped the C3USERS.ZIP using the -d option
  from the CLARION3 sub dir

<<Runtime Errors>>

<Files Not Found runtime error>
Files Not Found runtime error

If using C3FirstProc or GUIFirstProc it must be in the  main
program module.

<Fields from related files are not displaying on a browse.>
Fields from related files are not displaying on a browse.

Did you create an LULIST Formula Class for each related file?

<Embedded browse will not compile or display properly>
Embedded browse will not compile or display properly

Did you create an EBnn Formula Class for each field in  each
Embedded Browse?

<List box on a browse is not displaying proper lookup records.>
List box on a browse is not displaying proper lookup records.

Be sure you have declared a LU-LIST formula for all related
files that have to be looked up each time a record is
processed

<Child Embedded browses not updating properly>
Child Embedded browses not updating properly

Be sure you have added the -DS formulas with the do EBnn-rtn

<Automouse lookup character not functioning.>
Automouse lookup character not functioning.

Be sure you have alerted the TabKey on the Automouse button
field.

<C3lookups not functioning properly>
C3lookups not functioning properly

Be sure you have placed the field from the lookup file on
the screen NOT the field from the forms primary file also
make sure the lookup file is in the procedures file schematic

<Scrolling on the embedded browse does not display records
below the list box.>
Scrolling on the embedded browse does not display records
below the list box.

You do not have an update procedure
declared for the embedded browse list box. You must add a
EBnnNoLimit formula for the embedded browse.

<Invoice items not updating properly>
Invoice items not updating properly

Make sure your MQ(Item) file is IDENTICAL to the Item data file

<File Path Not Found if using the C3First/GUIFirstProc>
File Path Not Found if using the C3First/GUIFirstProc

be sure it is in the main module "AppName.cla"

<Button Range or Filter setting not passing to the report>
Button Range or Filter setting not passing to the report

Be sure the GD-???????? file has a key named with the
related file name and all applicable fields are in the
key structure per the documentation

<Keycodes responding improperly>
Keycodes responding improperly

Be sure of the keys alerted to various buttons especially
the    OK   and     CANCEL   buttons
the    ESC  and     ENTER    keys

<Formulas not calculating properly>
Formulas not calculating properly

Clarion writes the code for formula fields in alphabetical
order. Be sure the fields process in the required logical
order or rename the fields to place allow them to generate
in the proper order.

<Embedded browse does not update with the enter key>
Embedded browse does not update with the enter key

Make sure the enter key is alerted in the embedded browse's
attributes

<Browse not responding properly to features, etc....>
Browse not responding properly to features, etc....

Make sure hot records are checked on the browse properties
screen

<Radio buttons not retaining or initializing proper values>
Radio buttons not retaining or initializing proper values

The string variable for the radio button must be as long as
the longest choice

<Variable browses not working>
Variable browses not working

Did you run the DCT2CLA.EXE for your dictionary

<<Getting Help>>

<Technical Support>
Technical Support

Methods of Tech Support in preferred order.

                   1. Email, Compuserve:
                             MHS:Support@C3Dev
                   2. support@c3-il.arrowlg.com
                   3. Fax    (312) 288-5389
                   4. Phone  (312) 288-5388

Updates

     Updates will be furnished periodically in a patch file.
     These will be available on CIS and other BBS's.

